sonic-utilities icon indicating copy to clipboard operation
sonic-utilities copied to clipboard

Support for aggregrate VOQ Counters.

Open vivekverma-arista opened this issue 1 year ago • 6 comments

What I did

Added CLI support for aggregate VOQ counters according to HLD #1578

How I did it

Extended the existing CLI command show queue counters [interface] --voq for the SSI.

How to verify it

Sent traffic destined to egress out of different queues of a interface through multiple ingress interface chosen across FSIs and verified that the command displays the correct aggregate view of the counters when run from the SSI

From FSI-3

admin@nfc404-3:~$ show queue counters "nfc404-3|Asic0|Ethernet4" --voq
                    Port    Voq    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
------------------------  -----  --------------  ---------------  -----------  ------------
nfc404-3|Asic0|Ethernet4   VOQ0              45            12386            0             0
nfc404-3|Asic0|Ethernet4   VOQ1               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ2             204            10200            0             0
nfc404-3|Asic0|Ethernet4   VOQ3               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ4              21             1050            0             0
nfc404-3|Asic0|Ethernet4   VOQ5               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ6              29             1450            0             0
nfc404-3|Asic0|Ethernet4   VOQ7               0                0            0             0

From FSI-8

admin@nfc404-8:~$ show queue counters "nfc404-3|Asic0|Ethernet4" --voq
                    Port    Voq    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
------------------------  -----  --------------  ---------------  -----------  ------------
nfc404-3|Asic0|Ethernet4   VOQ0               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ1               1               50            0             0
nfc404-3|Asic0|Ethernet4   VOQ2              51             2550            0             0
nfc404-3|Asic0|Ethernet4   VOQ3               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ4              16              800            0             0
nfc404-3|Asic0|Ethernet4   VOQ5               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ6             143             7150            0             0
nfc404-3|Asic0|Ethernet4   VOQ7               0                0            0             0
From SSI

admin@nfc404:~$ show queue counters "nfc404-3|Asic0|Ethernet4" --voq
                    Port    Voq    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
------------------------  -----  --------------  ---------------  -----------  ------------
nfc404-3|Asic0|Ethernet4   VOQ0              45            12386            0             0
nfc404-3|Asic0|Ethernet4   VOQ1               1               50            0             0
nfc404-3|Asic0|Ethernet4   VOQ2             255            12750            0             0
nfc404-3|Asic0|Ethernet4   VOQ3               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ4              37             1850            0             0
nfc404-3|Asic0|Ethernet4   VOQ5               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ6             172             8600            0             0
nfc404-3|Asic0|Ethernet4   VOQ7               0                0            0             0

Previous command output (if the output of a command-line utility has changed)

New command output (if the output of a command-line utility has changed)

admin@nfc404:~$ show queue counters "nfc404-3|Asic0|Ethernet4" --voq
                    Port    Voq    Counter/pkts    Counter/bytes    Drop/pkts    Drop/bytes
------------------------  -----  --------------  ---------------  -----------  ------------
nfc404-3|Asic0|Ethernet4   VOQ0              45            12386            0             0
nfc404-3|Asic0|Ethernet4   VOQ1               1               50            0             0
nfc404-3|Asic0|Ethernet4   VOQ2             255            12750            0             0
nfc404-3|Asic0|Ethernet4   VOQ3               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ4              37             1850            0             0
nfc404-3|Asic0|Ethernet4   VOQ5               0                0            0             0
nfc404-3|Asic0|Ethernet4   VOQ6             172             8600            0             0
nfc404-3|Asic0|Ethernet4   VOQ7               0                0            0             0

Should merge after #908, #20057 and #3271

Tracked by #1543

HLD: #1578

vivekverma-arista avatar Feb 13 '24 07:02 vivekverma-arista

@kenneth-arista @saksarav-nokia

vmittal-msft avatar May 24 '24 19:05 vmittal-msft

@ysmanman @jfeng-arista

kenneth-arista avatar Aug 28 '24 17:08 kenneth-arista

@arlakshm

kenneth-arista avatar Aug 28 '24 17:08 kenneth-arista

  1. Based on my understanding,
  • Sysport is the one where VoQ pointing to and we are aggregating the stats for ?
  • fap id is the source asics where we are getting the count and aggregating for all faps ?
  • idx is the VoQ id 0-7 ? or real VoQ id ?
  1. Do we support "show queue counter --voq" without any interface info ?
  2. Can you please add test case for this ?

Yes the understanding of the key is correct. Refer https://github.com/vivekverma-arista/SONiC/blob/aggVoq/doc/voq/aggregate_voq_counters.md#database-changes for more details.

show queue counter --voq is also supported on SSI and it will aggregate VOQ counters for all interfaces. The command is however not available for FSI as we need to specify asic there -n aiscX

vivekverma-arista avatar Aug 29 '24 05:08 vivekverma-arista

When the Line card is reset or goes offlline, are these counters cleared from SUP?.

saksarav-nokia avatar Sep 09 '24 15:09 saksarav-nokia

When the Line card is reset or goes offlline, are these counters cleared from SUP?.

We are not doing anything explicit to clear this, but when the LC comes up online, it will overwrite the counters for it's own VOQs so it will happen naturally.

So aggregation on SSI show voq counters --voq will always be consistent with counters presented on FSI show queue counters -n <asic> --voq

swss changes -> https://github.com/sonic-net/sonic-swss/pull/3271

vivekverma-arista avatar Sep 09 '24 15:09 vivekverma-arista