Skip to content
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

Merged
merged 1 commit into from
Jan 12, 2021

Conversation

kishorekunal01
Copy link
Contributor

What I did

  1. While extracting the RT Attribute from netlink message, If the message is NESTED msg remove the NESTED flag and extract the msg.
  2. Get nexthop ifindex from Netlink msg RTA_OIF attribute and use the name based on the ifindex program in the APP_DB.

Why I did it

  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.

How I verified it
Verified using vsonic

Signed-off-by: Kishore Kunal kishore.kunal@broadcom.com

@kishorekunal01
Copy link
Contributor Author

test vs please

@lguohan
Copy link
Contributor

lguohan commented Jan 8, 2021

does this only impact vxlan route, or normal route as well?

@lguohan lguohan requested a review from prsunny January 8, 2021 20:07
@kishorekunal01
Copy link
Contributor Author

does this only impact vxlan route, or normal route as well?

Only Vxlan routes

@@ -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*/
Copy link
Collaborator

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

Copy link
Contributor Author

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]);
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

@prsunny
Copy link
Collaborator

prsunny commented Jan 11, 2021

@kishorekunal01 , does it require this patch (sonic-net/sonic-buildimage#4806) to be merged before we can merge this PR?

@kishorekunal01
Copy link
Contributor Author

@kishorekunal01 , does it require this patch (Azure/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.
@prsunny prsunny merged commit 850001f into sonic-net:master Jan 12, 2021
DavidZagury pushed a commit to DavidZagury/sonic-swss that referenced this pull request Mar 4, 2021
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants