Skip to content

Comments

Fix switch stat counters by using get_stats_ext instead of get_stats#1757

Merged
tjchadaga merged 1 commit intosonic-net:masterfrom
rgarofano-arista:fix-switch-stat-counters
Feb 10, 2026
Merged

Fix switch stat counters by using get_stats_ext instead of get_stats#1757
tjchadaga merged 1 commit intosonic-net:masterfrom
rgarofano-arista:fix-switch-stat-counters

Conversation

@rgarofano-arista
Copy link
Contributor

We were seeing N/A for switch trimming counters in sonic-mgmt testing with th5. It turns out Broadcom only supports get_stats_ext in their SAI implementation. This PR switches from using get_stats to get_stats_ext to retrieve counters that are object type switch. This PR may be breaking to other vendors if they need to use get_stats.

Backport Request

  • 202412
  • 202511

Signed-off-by: Ryan Garofano <rgarofano@arista.com>
@rgarofano-arista rgarofano-arista force-pushed the fix-switch-stat-counters branch from 33b8944 to b175979 Compare February 2, 2026 19:33
@mssonicbld
Copy link
Collaborator

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@rgarofano-arista
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Commenter does not have sufficient privileges for PR 1757 in repo sonic-net/sonic-sairedis

@r12f
Copy link
Contributor

r12f commented Feb 3, 2026

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@r12f r12f requested a review from nazariig February 3, 2026 23:13
@r12f
Copy link
Contributor

r12f commented Feb 3, 2026

hi @nazariig , do you mind to help check this PR?

@nazariig
Copy link
Collaborator

nazariig commented Feb 4, 2026

hi @nazariig , do you mind to help check this PR?

@r12f sure

Copy link
Collaborator

@nazariig nazariig left a comment

Choose a reason for hiding this comment

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

LGTM

@delnas
Copy link

delnas commented Feb 10, 2026

@r12f are we good to kick off?

@tjchadaga tjchadaga merged commit 6f06210 into sonic-net:master Feb 10, 2026
16 checks passed
@mssonicbld
Copy link
Collaborator

Cherry-pick PR to msft-202412: Azure/sonic-sairedis.msft#105

@mssonicbld
Copy link
Collaborator

Cherry-pick PR to 202511: #1775

@mssonicbld
Copy link
Collaborator

@rgarofano-arista cherry pick PR didn't pass PR checker. Please check!!!
#1775

@mssonicbld
Copy link
Collaborator

@rgarofano-arista cherry pick PR didn't pass PR checker. Please check!!!
#1775

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.

7 participants