Skip to content

SRv6: Allow configuring node-len 0 #18774

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

Merged

Conversation

raja-rajasekar
Copy link
Contributor

@raja-rajasekar raja-rajasekar commented May 8, 2025

Zebra: Allow configuring node-len 0

Currently the node-len for a locator can only be configured between the range 16-64. However, as per the RFC draft
https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression-23#name-recommended-installation-of

The SID 2001:db8:b1:f123:: bound to the End.X behavior for its local IGP adjacency 123 with the NEXT-CSID flavor is instantiated from LIB with
Locator-Block length (LBL) = 48 (Locator-Block value 0x20010db800b1),
Locator-Node length (LNL) = 0,
Function length (FL) = 16 (Function value 0xf123), and
Argument length (AL) = 64.

End.X should be able to handle 0 node length.

Fixing this by allowing the user to configure the node-len 0-64. Also distinguishing the not configured node-len and node-len 0 configuration.

@raja-rajasekar raja-rajasekar force-pushed the rajasekarr/nfl_len_node_len_0 branch 2 times, most recently from 8844a9f to a9beda5 Compare May 8, 2025 20:37
@raja-rajasekar raja-rajasekar changed the title SRv6: Include func-len as well in the node-fun-len calculation + Allow configuring node-len 0 SRv6: Allow configuring node-len 0 May 8, 2025
@raja-rajasekar
Copy link
Contributor Author

raja-rajasekar commented May 8, 2025

The current change is a needed/basic one and can go in irrespective of the below query.

But the next set of changes to be built on top of it is tricky, and I need your help.

Ideally speaking, for a F1616(for example), we should be able to configure

  • 16,0,16 (Block, node, func) for End.x/uA.

However in today's code, we have ctx.flv.lcnode_func_len = node-len , while rather it should have been ctx.flv.lcnode_func_len =node-len + func-len

I tried to fix this, but it breaks existing testcases (isis-ping and srv6 ping) because formats/e-wlibs have a default func-len as 16, and this is also being used for other purposes.

How do we proceed with the next set of changes to make ctx.flv.lcnode_func_len =node-len + func-len?

Would it be considered a breakage of backward compatibility, or should we fix it? if so, I can open an issue

@cscarpitta @pguibert6WIND @ton31337 @donaldsharp can you please comment on this and let me know the way to go

Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

LGTM, because even the YANG model does not restrict the length to be < 16.

@cscarpitta cscarpitta self-requested a review May 9, 2025 14:15
@jefftant
Copy link

jefftant commented May 9, 2025

Carmine - please review ASAP.
Thanks!

Currently the node-len for a locator can only be configured between the
range 16-64.
However, as per the RFC draft
https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression-23#name-recommended-installation-of

``
The SID 2001:db8:b1:f123:: bound to the End.X behavior for its local IGP adjacency 123 with the NEXT-CSID flavor is instantiated from LIB with
Locator-Block length (LBL) = 48 (Locator-Block value 0x20010db800b1),
Locator-Node length (LNL) = 0,
Function length (FL) = 16 (Function value 0xf123), and
Argument length (AL) = 64.
``

End.X should be able to handle 0 node length.

Fixing this by allowing the user to configure the node-len 0-64. Also
distinguishing the not configured node-len and node-len 0 configuration.

Signed-off-by: Rajasekar Raja <[email protected]>
@raja-rajasekar raja-rajasekar force-pushed the rajasekarr/nfl_len_node_len_0 branch from a9beda5 to 5f00926 Compare May 9, 2025 17:26
@raja-rajasekar raja-rajasekar requested a review from ton31337 May 9, 2025 18:06
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good

@riw777 riw777 merged commit cc1063e into FRRouting:master May 20, 2025
13 checks passed
@jefftant
Copy link

Thanks Donatas and Russ!

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.

4 participants