Skip to content

SRv6 dataplane test for counter and crm and 128 my sids#18173

Closed
echuawu wants to merge 0 commit intosonic-net:masterfrom
echuawu:srv6_counter_crm
Closed

SRv6 dataplane test for counter and crm and 128 my sids#18173
echuawu wants to merge 0 commit intosonic-net:masterfrom
echuawu:srv6_counter_crm

Conversation

@echuawu
Copy link
Copy Markdown
Contributor

@echuawu echuawu commented Apr 29, 2025

Description of PR

Including configuration and function coverage:

1.Auto generate 128 SRv6 locators and sids
2.Auto generate 128 matching packets
2.1.Test DIP shift
2.2.Test uSID container copy action
2.3.Test USD flavor
2.4.Test DSCP mapping
2.5.Test ttl and hop limit change
3.Split SRH and non SRH packets test into two test cases required by MSFT
3.1.Test reboot and BGP restart test randomly to save time
4.Test SRv6 counter
5.Test SRv6 CRM resource
6.Add static route for 128 sids validation
7.Add check for route asic db installation
8.Add timeout when captureing packet to override large scale of BGP update packets affection

This PR should be merged after the design PRs merged:

Summary:
Fixes # (issue)

Type of change

  • Bug fix
  • Testbed and Framework(new/improvement)
  • New Test case
    • Skipped for non-supported platforms
  • Test case improvement

Back port request

  • 202012
  • 202205
  • 202305
  • 202311
  • 202405
  • 202411

Approach

What is the motivation for this PR?

Enhance the SRv6 test coverage for the counter and CRM and 128 my sids

How did you do it?

Add validations for SRv6 counter and CRM and 128 my sids

How did you verify/test it?

Run it in local setup

Any platform specific information?

Mellanox SPC4 and later platforms

Supported testbed topology if it's a new test case?

Documentation

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@Yakiv-Huryk Yakiv-Huryk requested a review from BYGX-wcr April 29, 2025 08:35
@nhe-NV nhe-NV removed the request for review from BYGX-wcr April 30, 2025 13:12
@echuawu echuawu force-pushed the srv6_counter_crm branch from 4bfa970 to 33af006 Compare May 6, 2025 10:57
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@nhe-NV
Copy link
Copy Markdown
Contributor

nhe-NV commented May 18, 2025

@r12f can you help to review and merge it?

@r12f
Copy link
Copy Markdown
Collaborator

r12f commented May 18, 2025

Hi @nhe-NV , thanks for the PR. Looks like Swss one is not merged yet, so from your description, this one needs to wait.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@echuawu echuawu changed the title SRv6 dataplane test for counter and crm SRv6 dataplane test for counter and crm and 128 my sids May 28, 2025
@zhangyanzhao zhangyanzhao requested a review from r12f May 28, 2025 16:44
['locator_8', '2001:4001:800::'],
['locator_9', '2001:5000:900::'],
['locator_10', '2001:5001:a00::']
[f'locator_{i + 1}', f'{ROUTE_BASE}:{1001 + i}:{1 + i}::', f'{1 + i}'] for i in range(LOCATOR_NUM)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

we need all uSID being allocated under a single locator. do you mind to update the test case?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @r12f , do you mean the same requirement as @BYGX-wcr stated, use the same "locator block" here? From my understand, locator contains locator block and locator node, just double confirm.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, they are the same. : D

['locator_8', '2001:4001:800::'],
['locator_9', '2001:5000:900::'],
['locator_10', '2001:5001:a00::']
[f'locator_{i + 1}', f'{ROUTE_BASE}:{1001 + i}:{1 + i}::', f'{1 + i}'] for i in range(LOCATOR_NUM)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please keep the whole block locator unchanged here.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Hi @BYGX-wcr , per my understanding, you are refering this part "{ROUTE_BASE}:{1001 + i}" to be a fixed value, like "{ROUTE_BASE}:1001", please correct me if there is misunderstanding.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

yes, keep the first /32 the same for all the locators.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

)


@pytest.fixture(scope="class", params=['srh', 'no_srh'])
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this supposed to be specified using CLI option?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

ok, would update it accordingly.

def use_param(self, prepare_param):
self.params = prepare_param

def _validate_bgp_session(self, duthost):
Copy link
Copy Markdown
Contributor

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 validate BGP sessions?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We always use checking function instead of pure sleep, it always save time for us.


with allure.step('Validate SRv6 function after BGP restart'):

with allure.step('Execute BGP restart'):
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

BGP restart should be a type of the reboot as well. Basically, there are three types of scenarios where SRv6 functions will get reset: reboot/config_reload/BGP_restart

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Do you suggest to move the bgp restart into the step of 'Execute reboot test'?

@echuawu echuawu closed this Jun 3, 2025
@echuawu echuawu force-pushed the srv6_counter_crm branch from 152fc8f to a6cce68 Compare June 3, 2025 14:16
@echuawu
Copy link
Copy Markdown
Contributor Author

echuawu commented Jun 3, 2025

Closed this PR by mistake, please check the new PR #18775, @BYGX-wcr and @r12f , all the comments had been updated.

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