-
Notifications
You must be signed in to change notification settings - Fork 543
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FPMSYNCD] Change done to support FRR7.5 #1585
Conversation
test vs please |
does this only impact vxlan route, or normal route as well? |
Only Vxlan routes |
fpmsyncd/fpmlink.cpp
Outdated
@@ -18,6 +18,18 @@ void netlink_parse_rtattr(struct rtattr **tb, int max, struct rtattr *rta, | |||
{ | |||
tb[rta->rta_type] = rta; | |||
} | |||
else | |||
{ | |||
/* Latest FRR is sending RTA_ENCAP with NLA_F_NESTED bit set*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please rephrase the comment to mention FRR version or remove the comment itself. "Latest" may not be relevant sometime in future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, I will update the comment.
@@ -102,10 +101,9 @@ void RouteSync::parseEncap(struct rtattr *tb, uint32_t &encap_value, string &rma | |||
parseRtAttrNested(tb_encap, 3, tb); | |||
encap_value = *(uint32_t *)RTA_DATA(tb_encap[VXLAN_VNI]); | |||
memcpy(&mac_buf, RTA_DATA(tb_encap[VXLAN_RMAC]), MAX_ADDR_SIZE); | |||
vlan = *(uint32_t *)RTA_DATA(tb_encap[VXLAN_VLAN]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How do we get the vlan data if it is not nested? Do we need to handle that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Vlan information was used to create the nexthop, Similar to normal route(no evpn routes) nexthop information is extracted from tb[RTA_OIF] attribute.
@kishorekunal01 , does it require this patch (sonic-net/sonic-buildimage#4806) to be merged before we can merge this PR? |
No, this change is independent changes and doesn't depend on the FRR patch. |
1) With FRR7.5 upgrade Netlink Msg from FRR has NLA_F_NESTED flag set in RTA_TYPE while sending VNI and RMAC. 2) In the new patch to keep it in line with FRR upstreaming, we are not sending the VLAN ID from FRR as it can be extracted from ifindex inside the nexthop information.
96f6653
to
0350a5f
Compare
1) With FRR7.5 upgrade Netlink Msg from FRR has NLA_F_NESTED flag set in RTA_TYPE while sending VNI and RMAC. 2) In the new patch to keep it in line with FRR upstreaming, we are not sending the VLAN ID from FRR as it can be extracted from ifindex inside the nexthop information.
What I did
Why I did it
RTA_TYPE while sending VNI and RMAC.
sending the VLAN ID from FRR as it can be extracted from ifindex inside
the nexthop information.
How I verified it
Verified using vsonic
Signed-off-by: Kishore Kunal kishore.kunal@broadcom.com