Skip to content

[fpmsyncd]: Add support for SRv6#3123

Merged
prsunny merged 3 commits intosonic-net:masterfrom
cscarpitta:dplane_fpm_sonic
Nov 15, 2024
Merged

[fpmsyncd]: Add support for SRv6#3123
prsunny merged 3 commits intosonic-net:masterfrom
cscarpitta:dplane_fpm_sonic

Conversation

@cscarpitta
Copy link
Contributor

@cscarpitta cscarpitta commented Apr 24, 2024

HLD: sonic-net/SONiC#1620

What I did

Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).

Why I did it

fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).

How I verified it

This PR implements new set of test cases for SRv6 test_srv6.py
The sonic-mgmt tests for SRv6 are added in this PR: sonic-net/sonic-mgmt#15510

@cscarpitta cscarpitta requested a review from prsunny as a code owner April 24, 2024 17:30
@cscarpitta cscarpitta closed this Apr 25, 2024
@cscarpitta cscarpitta deleted the dplane_fpm_sonic branch April 25, 2024 16:46
@cscarpitta cscarpitta restored the dplane_fpm_sonic branch April 25, 2024 17:07
@cscarpitta cscarpitta reopened this Apr 25, 2024
@prsunny prsunny requested a review from kperumalbfn April 29, 2024 17:35
@cscarpitta
Copy link
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic branch 3 times, most recently from faf75e9 to 171fbfb Compare September 21, 2024 11:57
@eddieruan-alibaba
Copy link
Contributor

@cscarpitta can you rebase it to fix the compile issue? sonic-net/sonic-buildimage#18715 is merged.

@eddieruan-alibaba
Copy link
Contributor

This change has been cherry-picked into phoenix wing and used in daily run.

http://phoenixwing.com.cn/build

#define NH_ENCAP_SRV6_ROUTE 101

#define RTM_NEWSRV6LOCALSID 1000
#define RTM_DELSRV6LOCALSID 1001
Copy link
Contributor

Choose a reason for hiding this comment

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

These constants are defined in fpmlink.h, do we need it here? Pls remove if not needed.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed these constants are not needed here. I removed them.

m_vnet_routeTable(pipeline, APP_VNET_RT_TABLE_NAME, true),
m_vnet_tunnelTable(pipeline, APP_VNET_RT_TUNNEL_TABLE_NAME, true),
m_warmStartHelper(pipeline, &m_routeTable, APP_ROUTE_TABLE_NAME, "bgp", "bgp"),
m_srv6LocalSidTable(pipeline, APP_SRV6_MY_SID_TABLE_NAME, true),
Copy link
Contributor

Choose a reason for hiding this comment

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

minor: could we change the table name to mysidTable. I think we changed most of the reference of localSid to MySid.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the comment. I changed localSid -> mySid everywhere in the code.


if (vpn_sid.empty())
{
return false;
Copy link
Contributor

Choose a reason for hiding this comment

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

Error logs for debugging?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added an error message:
SWSS_LOG_ERROR("Received an invalid SRv6 route: vpn_sid is empty");

Thanks.

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic branch 3 times, most recently from a1671dc to b0c2f60 Compare October 6, 2024 13:05
@AlanYoush
Copy link
Contributor

@cscarpitta
Hi cscarpitta
I find that there is another PR: #2515 and it is also uesd to support SRv6. What is the difference between them both?
And I want to use srv6 feature in SONiC-202311, so I should merge SRv6 PR code into SONiC-202311, and which PR Code should I merge ?
Thanks.

Copy link

@ahsalam ahsalam left a comment

Choose a reason for hiding this comment

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

This changes are needed for programming SRv6 from FRR.

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic branch 3 times, most recently from ed29566 to 9df0769 Compare October 24, 2024 06:42
SRV6_LOCALSID_ACTION_END = 1,
SRV6_LOCALSID_ACTION_END_X = 2,
SRV6_LOCALSID_ACTION_END_T = 3,
SRV6_LOCALSID_ACTION_END_DX2 = 4,
Copy link
Contributor

Choose a reason for hiding this comment

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

Current SAI doesn't support L2 XConnect, does FRR support this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

No, currently FRR does not support L2 XConnect.

if (!parseSrv6MySidFormat(tb[SRV6_LOCALSID_FORMAT], block_len,
node_len, func_len, arg_len))
{
SWSS_LOG_ERROR("Invalid Srv6 MySid format");
Copy link
Contributor

Choose a reason for hiding this comment

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

could you add details about node/block/function in the error log message

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added. Thanks for the comment.

strlen((char *)RTA_DATA(tb[SRV6_LOCALSID_VRFNAME])));
}

action = mySidAction2Str(action_buf);
Copy link
Contributor

Choose a reason for hiding this comment

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

unknown action, return false?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. Thanks for the comment.

@cscarpitta cscarpitta force-pushed the dplane_fpm_sonic branch 2 times, most recently from d624557 to d9f662c Compare November 12, 2024 08:44
@eddieruan-alibaba
Copy link
Contributor

@cscarpitta can you rebase your branch ? "This branch is out-of-date with the base branch"

@cscarpitta
Copy link
Contributor Author

@cscarpitta can you rebase your branch ? "This branch is out-of-date with the base branch"

Done.

@cscarpitta
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@cscarpitta
Copy link
Contributor Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Contributor

@kperumalbfn kperumalbfn left a comment

Choose a reason for hiding this comment

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

@cscarpitta please include sonic-mgmt test PR(sonic-net/sonic-mgmt#15510) in the description.

@kperumalbfn
Copy link
Contributor

Changes LGTM

@cscarpitta
Copy link
Contributor Author

@cscarpitta please include sonic-mgmt test PR(sonic-net/sonic-mgmt#15510) in the description.

@kperumalbfn Thanks for the review. I updated the PR description.

* Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
* Add test cases to verify SRv6 functionality

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@prsunny prsunny merged commit 2e2d4e5 into sonic-net:master Nov 15, 2024
mlok-nokia pushed a commit to mlok-nokia/sonic-swss that referenced this pull request Nov 22, 2024
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
bradh352 pushed a commit to bradh352/sonic-swss that referenced this pull request Dec 4, 2024
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
divyachandralekha pushed a commit to divyachandralekha/sonic-swss that referenced this pull request Dec 12, 2024
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
shiraez pushed a commit to Marvell-switching/sonic-swss that referenced this pull request Feb 17, 2025
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
* [fpmsyncd]: Add support for SRv6
What I did
Extended fpmsyncd to process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).
Extend fpmsyncd to process SRv6 routes and local SIDs received from FRR
Add test cases to verify SRv6 functionality

Why I did it
fpmsyncd did not process Netlink TLVs containing SRv6 information (SRv6 local SIDs and routes).

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
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.

7 participants