sonic-swss icon indicating copy to clipboard operation
sonic-swss copied to clipboard

[fpmsyncd]: Linux netlink runtime option

Open qbdwlr opened this issue 3 years ago • 2 comments

What I did Added runtime option for fpmsyncd "-l net" to allow fpmsyncd to listen directly to netlink messages from Linux kernel rather than listening to FRR FPM TCP socket.

Why I did it FRR currently does not transmit any MPLS related information on its FPM TCP socket to fpmsyncd, not even MPLS attributes on IP routes. MPLS functionality verification had to be using alternate routing stacks (Juniper cRPD and MetaSwitch) but these routing stacks are not open-source and are not available to the community in general.
Some unit-testing during MPLS development was performed by switching fpmsyncd to listen directly to Linux kernel messages, so it was proposed to upstream this capability for general use.

How I verified it Unit-tests in sonic-swss/tests test_route.py and test_mpls.py were run with "fpmsyncd -l net".

Details if related Main difference between default fpmsyncd and "fpmsyncd -l net" behavior is related to VRF support. SONiC modifies actual netlink message from FRR to send VRF ifindex value in RTA_RT_TABLE_ID attribute, while Linux kernel netlink message is unmodified and contains the route table ID in RTA_RT_TABLE_ID attribute. This prevents "-l net" option being used in scenarios that test routes with VRF. Refer to HLD: https://github.com/Azure/SONiC/pull/706

qbdwlr avatar Jun 03 '21 13:06 qbdwlr

/azp run

prsunny avatar Jun 11 '21 16:06 prsunny

Azure Pipelines successfully started running 1 pipeline(s).

azure-pipelines[bot] avatar Jun 11 '21 16:06 azure-pipelines[bot]