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] updates for MPLS #1794

Closed
wants to merge 1 commit into from
Closed

Conversation

qbdwlr
Copy link
Contributor

@qbdwlr qbdwlr commented Jun 18, 2021

What I did
SONiC swss fpmsyncd support for MPLS:

  1. fpmsyncd support for routes with AF_MPLS and NHs with MPLS attributes.

Why I did it
SONiC swss fpmsyncd support for MPLS

How I verified it
Unit-tests in sonic-swss/tests/test_mpls.py
System tests in sonic-mgmt

Details if related
Build dependency on sonic-net/sonic-buildimage#8064
Refer to HLD: sonic-net/SONiC#706

@@ -897,6 +1004,123 @@ bool RouteSync::getIfName(int if_index, char *if_name, size_t name_len)
return true;
}

#ifndef LIBNL3_ENCAP_MPLS
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lets remove this and update azure pipeline to fetch libnl3 debian package from sonic-buildimaage

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaheshm I am not familiar with the azure pipeline infrastructure and will need input with exact changes required to fetch libnl3 debian packages from sonic-buildimage.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaheshm I have submitted a new PR sonic-net/sonic-buildimage#8064 that is the only other change required to make this PR work in the Azure pipeline as it is currently.

@@ -21,6 +21,9 @@ parameters:
- name: sonic_slave
type: string

- name: buildimage_artifact_name
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The value for this variable must be passed from "azure-pipelines.yml", I don't see that change in the PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaheshm Did you look at the pipeline details for this? Doesn't even get to the point where the .azure-pipelines stuff is needed. lgtm.yml is run first and fails... so this issue you have pointed out is irrelevant for now.

@qbdwlr qbdwlr force-pushed the fpmMpls branch 5 times, most recently from a6b6583 to 4a2617b Compare July 8, 2021 16:33
lgtm.yml Outdated
- sudo dpkg -i libnl-route-3-dev_3.5.0-1_amd64.deb
- sudo dpkg -i libnl-nf-3-dev_3.5.0-1_amd64.deb
- popd
- git clone https://github.com/qbdwlr/sonic-swss-common; pushd sonic-swss-common; git checkout azp; ./autogen.sh; fakeroot dpkg-buildpackage -us -uc -b; popd
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why using a personal repo?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess @qbdwlr was trying out if this change will fix the LGTM analysis. Looks like it didn't.

@qbdwlr qbdwlr force-pushed the fpmMpls branch 3 times, most recently from 979d608 to 06d3387 Compare July 12, 2021 20:03
@rlhui
Copy link
Contributor

rlhui commented Jul 13, 2021

/azp run

@azure-pipelines
Copy link

Azure Pipelines failed to run 1 pipeline(s).

/* Get the index of the master device */
uint32_t master_index = rtnl_route_get_table(route_obj);
/* if the table_id is not set in the route obj then route is for default vrf. */
if (master_index)
Copy link
Contributor

@smaheshm smaheshm Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How did you find out non-zero value implies a VRF table. "254" is the main table that ip route installs, 255 and 253 are local and default route table. All these are non-VRF tables.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smahesh You do know that SONiC has modified the fpm netlink message content from frr to something non-standard, right? The rtnl_route_get_table() function will not return the RT_TABLE value in SONiC fpmsyncd, it returns the VRF ifindex value instead because SONiC has patched this.
https://github.com/Azure/sonic-buildimage/blob/master/src/sonic-frr/patch/0003-Use-vrf_id-for-vrf-not-tabled_id.patch

Copy link
Contributor

@smaheshm smaheshm Jul 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the info, no I wasn't aware.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smaheshm Yes, this is the reason I have to disable VRF support in the other PR (#1765) where I provide the fpmsyncd runtime option to listen to kernel netlink instead of frr fpm. kernel netlink messages send the standard RT_TABLE ID in the netlink message, whereas frr fpm substitutes the patched VRF ifindex value.

@qbdwlr qbdwlr force-pushed the fpmMpls branch 6 times, most recently from c7a1cc2 to c978f74 Compare July 27, 2021 20:58
@qbdwlr qbdwlr force-pushed the fpmMpls branch 2 times, most recently from ddf91d7 to 66d7cf2 Compare July 30, 2021 13:18
@qbdwlr qbdwlr force-pushed the fpmMpls branch 5 times, most recently from 122ae51 to a626695 Compare August 12, 2021 18:16
@rlhui
Copy link
Contributor

rlhui commented Aug 23, 2021

@prsunny - would you please help review? thanks.

@smaheshm
Copy link
Contributor

@prsunny - would you please help review? thanks.

@rlhui We will use either #1870 or #1871 for the merge since it includes AZP pipeline changes too.

@rlhui
Copy link
Contributor

rlhui commented Aug 26, 2021

@qbdwlr - please close this if this PR is not to be used anymore.

@smaheshm
Copy link
Contributor

closing in favor of #1871

@smaheshm smaheshm closed this Aug 26, 2021
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
…nic-net#1794)

#### What I did
Implemented [JSON Patch Ordering using YANG Models Design Doc](https://github.com/Azure/SONiC/blob/master/doc/config-generic-update-rollback/Json_Patch_Ordering_using_YANG_Models_Design.md)

#### How to verify it
Unit-Tests

**NOTE: The code in this PR was [reverted](github.com/Azure/sonic-utilities/commit/0a145e8027380e8d4decb36bdfc647062c722612) before because of some [build issues](sonic-net/sonic-utilities#1761). Build issues have been fixed [here](sonic-net/sonic-buildimage#8632). To check the original PR comments please go [here](sonic-net/sonic-utilities#1599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants