Skip to content

[dplane_fpm_sonic]: Fix for SRv6 SIDs learnt from the kernel#21534

Merged
kperumalbfn merged 1 commit intosonic-net:masterfrom
cscarpitta:bugfix/fix_srv6_sid_format
Jan 27, 2025
Merged

[dplane_fpm_sonic]: Fix for SRv6 SIDs learnt from the kernel#21534
kperumalbfn merged 1 commit intosonic-net:masterfrom
cscarpitta:bugfix/fix_srv6_sid_format

Conversation

@cscarpitta
Copy link
Contributor

The current SRv6 test cases are implemented by installing the SRv6 SIDs in the kernel. Then the kernel notifies FRR about these SIDs. The current Netlink messages from the kernel does not provide the SID information (block length, node length, function length, argument length).

This PR extends the dplane_fpm_sonic to handle this issue by setting the SID information to the locator defaults.

Signed-off-by: Carmine Scarpitta <cscarpit@cisco.com>
@cscarpitta cscarpitta requested a review from lguohan as a code owner January 27, 2025 11:19
@mssonicbld
Copy link
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kperumalbfn
Copy link
Contributor

@abdosi Default SRV6 block length, node length, function length, argument length

@kperumalbfn kperumalbfn merged commit f833e86 into sonic-net:master Jan 27, 2025
20 checks passed
@kperumalbfn
Copy link
Contributor

@r12f This fix will be required in 202412 branch.

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-buildimage-msft#557

@r12f
Copy link
Contributor

r12f commented Jan 27, 2025

Thanks Kumaresh! I have added the 202412 tag for this one.

#define FPM_HEADER_SIZE 4

/* Default SRv6 SID format values */
DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN = 32;
Copy link
Contributor

Choose a reason for hiding this comment

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

I found that a compilation warning is triggered here,
../zebra/dplane_fpm_sonic.c:78:1: warning: data definition has no type or storage class 78 | DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN = 32; | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../zebra/dplane_fpm_sonic.c:78:1: warning: type defaults to 'int' in declaration of 'DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN' [-Wimplicit-int]
and I'm curious why the code is written this way. Can it be modified to be like this?
#define DEFAULT_SRV6_LOCALSID_FORMAT_BLOCK_LEN 32

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi @ouxlwhu
Thanks for reporting this.

I opened a PR to fix these warnings: #22909

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.

6 participants