sonic-utilities
sonic-utilities copied to clipboard
Support for aggregrate VOQ Counters.
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
@kenneth-arista @saksarav-nokia
@ysmanman @jfeng-arista
@arlakshm
- 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 ?
- Do we support "show queue counter --voq" without any interface info ?
- 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
When the Line card is reset or goes offlline, are these counters cleared from SUP?.
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