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

[snappi][2405] - 'get_egress_queue_count' should use CLI - show queue counter -n asic0 - to capture queue stats #15856

Open
amitpawar12 opened this issue Dec 3, 2024 · 2 comments
Assignees
Labels

Comments

@amitpawar12
Copy link
Contributor

Issue Description

In 2405, the 'sudo ip netns exec asic0 show queue counter' is being used in 'get_egress_queue_count' function to capture the egress queue count.

This CLI was good for 2205 as there was no support for ASIC in 'show queue counter' then. But in 2405, the CLI has support for '-n asic0' flag and hence should be used.

Affected functions/testcases:
get_egress_queue_count is being called following functions:

  1. tests/bfd/test_bfd.py
  2. run_traffic function in traffic_generation.py. This function creates dictionary, which is then also used by verify_egress_queue_frame_count. PFC testcases calls 'verify_egress_queue_frame_count' to ensure that no packets are sent out of DUT when egress port is stormed.

Results you see

The old CLI (with sudo ip netns exec) is/was workaround to capture statistics in multi-asic environment. However, with '-n asic0' flag available in show queue counter CLI, we should modify the function to use the above CLI in 2405 environment.

Results you expected to see

New CLI. The functionality, way to parse results and format of result (dictionary) should not change.

Is it platform specific

generic

Relevant log output

No response

Output of show version

No response

Attach files (if any)

No response

@sdszhang
Copy link
Contributor

sdszhang commented Dec 4, 2024

@auspham to work on this.

@auspham
Copy link
Contributor

auspham commented Dec 8, 2024

we have to check if this will be backward-compatible with 2205

Confirmed that 2205 support this sonic-net/sonic-utilities#2439

yejianquan pushed a commit that referenced this issue Dec 11, 2024
Description of PR
Previously we're using sudo ip netns exec asic0 show queue counter for showing the queue counter in multi-asic. However with the new apis, -n is supported natively in show queue counter -n asic0

This PR updates so that in get_egress_queue_count will use the new queue counters.

The queue counter support was added in the original PR:

suppport multi asic for show queue counter sonic-utilities#2439
Cherry-pick to 202205:

Double commit #2439 suppport multi asic for show queue counter sonic-utilities#2647
Summary:
Fixes # (issue) #15856

Approach
What is the motivation for this PR?
How did you do it?
Adjust the command to use the new format show queue counter -n asic0

Signed-off-by: Austin Pham <[email protected]>
mssonicbld pushed a commit to mssonicbld/sonic-mgmt that referenced this issue Dec 11, 2024
Description of PR
Previously we're using sudo ip netns exec asic0 show queue counter for showing the queue counter in multi-asic. However with the new apis, -n is supported natively in show queue counter -n asic0

This PR updates so that in get_egress_queue_count will use the new queue counters.

The queue counter support was added in the original PR:

suppport multi asic for show queue counter sonic-utilities#2439
Cherry-pick to 202205:

Double commit sonic-net#2439 suppport multi asic for show queue counter sonic-utilities#2647
Summary:
Fixes # (issue) sonic-net#15856

Approach
What is the motivation for this PR?
How did you do it?
Adjust the command to use the new format show queue counter -n asic0

Signed-off-by: Austin Pham <[email protected]>
mssonicbld pushed a commit that referenced this issue Dec 11, 2024
Description of PR
Previously we're using sudo ip netns exec asic0 show queue counter for showing the queue counter in multi-asic. However with the new apis, -n is supported natively in show queue counter -n asic0

This PR updates so that in get_egress_queue_count will use the new queue counters.

The queue counter support was added in the original PR:

suppport multi asic for show queue counter sonic-utilities#2439
Cherry-pick to 202205:

Double commit #2439 suppport multi asic for show queue counter sonic-utilities#2647
Summary:
Fixes # (issue) #15856

Approach
What is the motivation for this PR?
How did you do it?
Adjust the command to use the new format show queue counter -n asic0

Signed-off-by: Austin Pham <[email protected]>
@yxieca yxieca added the Triaged label Dec 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants