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

SRv6: add dscp_mode configuration for MySID entry #3443

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

Yakiv-Huryk
Copy link
Contributor

What I did
Added support for the "dscp_mode" MySID entry configuration:

  • add a sync with CONFIG_DB to store MySID entry dscp mode
  • create a tunnel/tunnel term entry for uDT46 MySID entry (the tunnel is reused for the same dscp_mode)
  • add a new vs test

Why I did it
To support "dscp_mode" MySID entry configuration

How I verified it
New vstest test_Srv6MySidUDT46TunnelDscpMode

Details if related

* add a sync with CONFIG_DB to store MySID entry dscp mode
* create a tunnel/tunnel term entry for uDT46 MySID entry (the tunnel is reused for the same dscp_mode)
* add a new vs test

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@Yakiv-Huryk Yakiv-Huryk requested a review from prsunny as a code owner December 25, 2024 16:15
@mssonicbld
Copy link
Collaborator

/azp run

@Yakiv-Huryk Yakiv-Huryk marked this pull request as draft December 25, 2024 16:15
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

dgsudharsan
dgsudharsan previously approved these changes Dec 26, 2024
Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

}

bool Srv6Orch::getMySidEntryDscpMode(const string& my_sid, sai_tunnel_dscp_mode_t& dscp_mode)
{
Copy link

Choose a reason for hiding this comment

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

this function need to be adjusted to adapt to the latest changes in CONFIG_DB schema

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 in the 5477a16

self.cdb.create_entry("SRV6_MY_SIDS", "fe00:0:2:ff05::", {"dscp_mode": "pipe"})

# Create MySID entry with dscp_mode uniform
dvs.runcmd("vtysh -c \"configure terminal\" -c \"segment-routing\" -c \"srv6\" -c \"locators\" -c \"locator loc1\" -c \"prefix fc00:0:2::/48 block-len 32 node-len 16 func-bits 16\" -c \"behavior usid\"")
Copy link

Choose a reason for hiding this comment

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

why do we need to add both FRR config and Linux Kernel Table config here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is how all the SRv6 vstests are done now, the new test is aligned to use the same approach

* align with the latest MySID config db schema
* use reverse locator lookup to derive the locator in case of ambiguity

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

auto blen = fvsGetValue(fvs, "block_len", true);
auto nlen = fvsGetValue(fvs, "node_len", true);
auto flen = fvsGetValue(fvs, "func_len", true);
auto alen = fvsGetValue(fvs, "arg_len", true);
Copy link

Choose a reason for hiding this comment

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

those fields are optional and have default values in CONFIG_DB|SRV6_MY_LOCATORS

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed in the a5cd890

Choose a reason for hiding this comment

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

Good

Signed-off-by: Yakiv Huryk <yhuryk@nvidia.com>
@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Collaborator

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

Copy link

@BYGX-wcr BYGX-wcr left a comment

Choose a reason for hiding this comment

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

LGTM and tested on VS

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.

5 participants