You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Deep-diving little more into this:
This clears the stats from the SW table (redis/FLEX) only and does not clear them at the PHY/device (HW) level.
Subsequent call of “show macsec Ethernet<>” CLI would display the delta stats (i.e. [stats fetched via/from platform/HW] – [stats cleared]).
Impact:
This approach can cause the mismatch of the stats between what SW is displaying vs what’s available in PHY!
During live traffic, this might complicate stats validation while debugging in case of traffic drop etc.
Mismatch:
After triggering “sonic-clear …” , stats in “show counters…” would be (HW – cached) counters whereas stats at the PHY (device) level would still be original HW stats/counters (without anyone invoking a clear to them), so this would be a mismatch
Proposal A:
“sonic-clear macsec” trigger can call the PHY-SAI API to clear the stats from the device (PHY/HW) and show the real stats fetched from the PHY without doing calculations at upper layer (SONiC/ SW table (redis/FLEX DB))
Or
Proposal B:
Do we have any command to display HW stats at SONiC (command) level?
If not, should we introduce one? At least, there would be a way to check and compare stats at SW and HW (device) level.
The text was updated successfully, but these errors were encountered:
Note: This issue applies to NPU/ASIC too.
i.e. current “show interface counters” behavior. Once we clear the counters – the counter data shown by SONiC will differ from counters present in ASIC.
Same proposal/mechanism can be applied to NPU as well
PR: https://github.com/sonic-net/sonic-buildimage/pull/11731
“sonic-clear macsec” is clearing the stats with above fix/PR, and we see that stats are getting cleared in subsequent “show macsec Ethernet<>” CLI.
Deep-diving little more into this:
This clears the stats from the SW table (redis/FLEX) only and does not clear them at the PHY/device (HW) level.
Subsequent call of “show macsec Ethernet<>” CLI would display the delta stats (i.e. [stats fetched via/from platform/HW] – [stats cleared]).
Impact:
This approach can cause the mismatch of the stats between what SW is displaying vs what’s available in PHY!
During live traffic, this might complicate stats validation while debugging in case of traffic drop etc.
Mismatch:
After triggering “sonic-clear …” , stats in “show counters…” would be (HW – cached) counters whereas stats at the PHY (device) level would still be original HW stats/counters (without anyone invoking a clear to them), so this would be a mismatch
Proposal A:
“sonic-clear macsec” trigger can call the PHY-SAI API to clear the stats from the device (PHY/HW) and show the real stats fetched from the PHY without doing calculations at upper layer (SONiC/ SW table (redis/FLEX DB))
Or
Proposal B:
Do we have any command to display HW stats at SONiC (command) level?
If not, should we introduce one? At least, there would be a way to check and compare stats at SW and HW (device) level.
The text was updated successfully, but these errors were encountered: