Skip to content

[T2] Everflow - "erspan_ip_ver" support for the new recycle port queue tests#19594

Merged
rlhui merged 2 commits intosonic-net:masterfrom
sanjair-git:eflow-queue-erspan
Jan 20, 2026
Merged

[T2] Everflow - "erspan_ip_ver" support for the new recycle port queue tests#19594
rlhui merged 2 commits intosonic-net:masterfrom
sanjair-git:eflow-queue-erspan

Conversation

@sanjair-git
Copy link
Copy Markdown
Contributor

Description of PR

Summary:
Fixes # (issue)

  • This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
  • It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Type of change

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

Back port request

  • 202205
  • 202305
  • 202311
  • 202405
  • 202411
  • 202505

Approach

What is the motivation for this PR?

How did you do it?

  • Added 'erspan_ip_ver' to the mirror session config for the test 'test_everflow_fwd_recircle_port_queue_check'

How did you verify/test it?

  • Ran the tests on T2 testbed and made sure all the respective tests are passing.

Any platform specific information?

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

Documentation

image

@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).

Comment on lines +711 to +731
for asic_index in duthost.get_frontend_asic_ids():
if asic_index is not None:
# Adding IPv6 ERSPAN sessions for each asic, from the CLI is currently not supported.
command = f"sonic-db-cli -n asic{asic_index} CONFIG_DB HSET " \
f"'MIRROR_SESSION|{session_info['session_name']}' " \
f"'dscp' '{session_info['session_dscp']}' " \
f"'dst_ip' '{session_info['session_dst_ipv6']}' " \
f"'gre_type' '{session_info['session_gre']}' " \
f"'type' '{session_info['session_type']}' " \
f"'src_ip' '{session_info['session_src_ipv6']}' 'ttl' '{session_info['session_ttl']}'"
if queue_num:
command += f" 'queue' {queue_num}"
if policer:
command += f" 'policer' {policer}"
else:
# Adding IPv6 ERSPAN sessions, from the CLI is currently not supported.
command = f"sonic-db-cli CONFIG_DB HSET 'MIRROR_SESSION|{session_info['session_name']}' " \
f"'dscp' '{session_info['session_dscp']}' " \
f"'dst_ip' '{session_info['session_dst_ipv6']}' " \
f"'gre_type' '{session_info['session_gre']}' " \
f"'src_ip' '{session_info['session_src_ipv6']}' 'ttl' '{session_info['session_ttl']}'"
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.

What's the reason for only setting the type attribute in multi-asic?
Won't we still need to set this for single-asic VOQ systems?

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.

Thanks for pointing it out. I missed adding it on the else part of the code. Updated the same.

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rlhui
Copy link
Copy Markdown

rlhui commented Oct 22, 2025

@arista-nwolfe , @abdosi reminder to re-review, thx

Comment on lines +748 to +774
for asic_index in duthost.get_frontend_asic_ids():
if asic_index is not None:
# Adding IPv6 ERSPAN sessions for each asic, from the CLI is currently not supported.
command = f"sonic-db-cli -n asic{asic_index} CONFIG_DB HSET " \
f"'MIRROR_SESSION|{session_info['session_name']}' " \
f"'dscp' '{session_info['session_dscp']}' " \
f"'dst_ip' '{session_info['session_dst_ipv6']}' " \
f"'gre_type' '{session_info['session_gre']}' " \
f"'type' '{session_info['session_type']}' " \
f"'src_ip' '{session_info['session_src_ipv6']}' 'ttl' '{session_info['session_ttl']}'"
if queue_num:
command += f" 'queue' {queue_num}"
if policer:
command += f" 'policer' {policer}"
else:
# Adding IPv6 ERSPAN sessions, from the CLI is currently not supported.
command = f"sonic-db-cli CONFIG_DB HSET 'MIRROR_SESSION|{session_info['session_name']}' " \
f"'dscp' '{session_info['session_dscp']}' " \
f"'dst_ip' '{session_info['session_dst_ipv6']}' " \
f"'gre_type' '{session_info['session_gre']}' " \
f"'type' '{session_info['session_type']}' " \
f"'src_ip' '{session_info['session_src_ipv6']}' 'ttl' '{session_info['session_ttl']}'"
if queue_num:
command += f" 'queue' {queue_num}"
if policer:
command += f" 'policer' {policer}"
commands_list.append(command)
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.

Could maybe reduce the code duplication here with:

if asic_index is not None:
   command = f"sonic-db-cli -n asic{asic_index} "
else:
   command = f"sonic-db-cli "
command += f"CONFIG_DB hset 'MIRROR_SESSION|{session_info['session_name']}' "\
<etc, all remaining commands should be common between single-asic and multi-asic>

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.

@arista-nwolfe , taken care. Removed the code duplication.

@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).

@rlhui rlhui merged commit b762374 into sonic-net:master Jan 20, 2026
15 checks passed
@rlhui rlhui added the Request for 202511 branch Request to backport a change to 202511 branch label Jan 20, 2026
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this pull request Jan 20, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.
@mssonicbld
Copy link
Copy Markdown
Collaborator

Cherry-pick PR to 202511: #22002

PriyanshTratiya pushed a commit to PriyanshTratiya/sonic-mgmt that referenced this pull request Jan 21, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Priyansh Tratiya <ptratiya@microsoft.com>
saravanan-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Jan 22, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Saravanan Sellappa <saravanan@nexthop.ai>
justin-oliver pushed a commit to justin-oliver/sonic-mgmt that referenced this pull request Jan 26, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.
ytzur1 pushed a commit to ytzur1/sonic-mgmt that referenced this pull request Feb 2, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Yael Tzur <ytzur@nvidia.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Feb 6, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.
Anirudh-nokia pushed a commit to Anirudh-nokia/sonic-mgmt-fork that referenced this pull request Feb 6, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: ayya <anirudh.ayya@nokia.com>
nnelluri-cisco pushed a commit to nnelluri-cisco/sonic-mgmt that referenced this pull request Feb 12, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: nnelluri-cisco <nnelluri@cisco.com>
rraghav-cisco pushed a commit to rraghav-cisco/sonic-mgmt that referenced this pull request Feb 13, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Raghavendran Ramanathan <rraghav@cisco.com>
anilal-amd pushed a commit to anilal-amd/anilal-forked-sonic-mgmt that referenced this pull request Feb 19, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Zhuohui Tan <zhuohui.tan@amd.com>
abhishek-nexthop pushed a commit to nexthop-ai/sonic-mgmt that referenced this pull request Mar 17, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.

Signed-off-by: Abhishek <abhishek@nexthop.ai>
venu-nexthop pushed a commit to venu-nexthop/sonic-mgmt that referenced this pull request Mar 27, 2026
…e tests (sonic-net#19594)

This PR adds erspan-ip-ver support to the newly added 'test_everflow_fwd_recircle_port_queue_check'
It adds 'erspan_ip_ver' to the mirror session configuration for the respective test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

7 participants