Skip to content

Commit e0f1129

Browse files
Added HLD for aggregate VOQ counters
1 parent 7cdaa12 commit e0f1129

File tree

3 files changed

+97
-0
lines changed

3 files changed

+97
-0
lines changed

doc/voq/aggregate_voq_counters.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
2+
3+
# Aggregate VOQ Counters in SONiC #
4+
#### Rev 1.0
5+
6+
## Table of Content
7+
* [Revision](#revision)
8+
* [Overview](#overview)
9+
* [Requirements](#requirements)
10+
* [Architecture Design](#architecture-design)
11+
* [High-Level Design](#high-level-design)
12+
* [CHASSIS_APP_DB Changes](#chassis_app_db-changes)
13+
* [SWSS Changes](#swss-changes)
14+
* [Repositories that need to be changed](#repositories-that-need-to-be-changed)
15+
* [SAI API](#sai-api)
16+
* [Configuration and management](#configuration-and-management)
17+
* [CLI](#cli)
18+
* [Restrictions/Limitations](#restrictionslimitations)
19+
* [Testing Requirements/Design](#testing-requirementsdesign)
20+
* [System Test cases](#system-test-cases)
21+
22+
### Revision
23+
| Rev | Date | Author | Change Description |
24+
|:---:|:-----------:|:----------------------------------------------------------------------------------:|-----------------------------------|
25+
| 1.0 | 11-Jan-2024 | Harsis Yadav, Pandurangan R S, Vivek Kumar Verma (Arista Networks) | Initial public version |
26+
27+
### Overview
28+
29+
In a [distributed VOQ architecture](https://github.com/sonic-net/SONiC/blob/master/doc/voq/architecture.md) corresponding to each output VOQ present on an ASIC, there are VOQs present on every ASIC in the system. Each ASIC has its own set of VOQ stats maintained in the FSI which needs to be gathered independently and can be hard to visualize, providing a non-cohesive experience.
30+
31+
### Requirements
32+
33+
Provide aggregate VOQ counters in a distributed VOQ architecture.
34+
35+
### Architecture Design
36+
37+
No new architecture changes are required to SONiC. An instance of SWSS runs on each FSI in a distributed VOQ architecture. SWSS can be used to poll VOQ stats for every ASIC and update CHASSIS_APP_DB which is accessible from every FSI module.
38+
39+
### High-Level Design
40+
41+
Figure 1: Gathering the VOQ stats in CHASSIS_APP_DB
42+
![Sequence Diagram](images/add_voq_seq.png "Figure 1: Sequence Diagram")
43+
Figure 2: Aggregation of VOQ stats
44+
![Aggregation of VOQ Stats](images/add_voq_cli.png "Figure 2: Aggregation of VOQ Stats")
45+
46+
47+
#### CHASSIS_APP_DB Changes
48+
49+
The following new VOQ counters should be available for each VOQ entry in the DB:
50+
* COUNTERS|fsi_id|asic_id|intf:VOQ_index
51+
* SAI_VOQ_STAT_PACKETS
52+
* SAI_VOQ_STAT_BYTES
53+
* SAI_VOQ_STAT_DROPPED_PACKETS
54+
* SAI_VOQ_STAT_DROPPED_BYTES
55+
56+
#### SWSS Changes
57+
##### PortsOrch Changes
58+
PortsOrch will periodically poll the VOQ stats through SAI call `get_queue_stats` and update them into `CHASSIS_APP_DB`
59+
60+
#### Repositories that need to be changed
61+
* sonic-swss
62+
* sonic-swss-common
63+
* sonic-utilities
64+
* sonic-mgmt
65+
66+
### SAI API
67+
No new SAI API is being added. PortsOrch will use the existing SAI API i.e. `get_queue_stats`.
68+
69+
### Configuration and management
70+
#### CLI
71+
CLI (VOQstat.py) aggregates the VOQ stats for a VOQ across ASICS and present a consolidated view. No new CLI command is being introduced for this rather the following CLI command is leveraged to provide this output on an SSI.
72+
73+
$ show VOQ counters [interface] --voq
74+
```
75+
admin@cmp217:~$ show VOQ counters Ethernet24 --voq
76+
Port Voq Counter/pkts Counter/bytes Drop/pkts Drop/bytes
77+
---------- ----- -------------- --------------- ----------- ------------
78+
Ethernet24 VOQ0 4 528 0 0
79+
Ethernet24 VOQ1 0 0 0 0
80+
Ethernet24 VOQ2 0 0 0 0
81+
Ethernet24 VOQ3 0 0 0 0
82+
Ethernet24 VOQ4 0 0 0 0
83+
Ethernet24 VOQ5 0 0 0 0
84+
Ethernet24 VOQ6 0 0 0 0
85+
Ethernet24 VOQ7 0 0 0 0
86+
```
87+
88+
89+
90+
### Restrictions/Limitations
91+
92+
* Since this feature doesn't use flex counter, the polling interval is not configurable.
93+
* The polling can't be disabled permanently as well.
94+
95+
### Testing Requirements/Design
96+
#### System Test cases
97+
Send traffic across different ASICs and ensure aggregate counters are correctly displayed.

doc/voq/images/add_voq_cli.png

1.25 MB
Loading

doc/voq/images/add_voq_seq.png

181 KB
Loading

0 commit comments

Comments
 (0)