-
Notifications
You must be signed in to change notification settings - Fork 1.3k
HLD for aggregate VOQ counters. #1587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from 3 commits
Commits
Show all changes
35 commits
Select commit
Hold shift + click to select a range
e0f1129
Added HLD for aggregate VOQ counters
vivekverma-arista 9621b03
Update aggregate_voq_counters.md
vivekverma-arista f4d03c5
Update aggregate_voq_counters.md
vivekverma-arista b8ed520
Merge branch 'sonic-net:master' into aggVoq
vivekverma-arista f408549
Delete doc/voq/images/add_voq_seq.png
vivekverma-arista 82b925c
Add files via upload
vivekverma-arista 6e744b3
Update aggregate_voq_counters.md
vivekverma-arista a194c67
Update aggregate_voq_counters.md
vivekverma-arista bebc9f0
Delete doc/voq/images/add_voq_seq.png
vivekverma-arista 1c52f4b
Add files via upload
vivekverma-arista 7d38058
Update aggregate_voq_counters.md
vivekverma-arista cbc0322
Add files via upload
vivekverma-arista 70664c3
Delete doc/voq/images/add_voq_seq.png
vivekverma-arista 8010286
Add files via upload
vivekverma-arista 874e2d3
Update aggregate_voq_counters.md
vivekverma-arista 889ebc3
Delete doc/voq/images/add_voq_cli.png
vivekverma-arista 3910da2
Add files via upload
vivekverma-arista 8ed1774
Update aggregate_voq_counters.md
vivekverma-arista 8854b6c
Update aggregate_voq_counters.md with the latest approach.
vivekverma-arista 5b3592a
Update aggregate_voq_counters.md
vivekverma-arista 4353040
Update aggregate_voq_counters.md
vivekverma-arista c5bcbd3
Update aggregate_voq_counters.md
vivekverma-arista cfef7d2
Update aggregate_voq_counters.md
vivekverma-arista b55725b
Update aggregate_voq_counters.md
vivekverma-arista 84081cf
Delete doc/voq/images/voq_stats_seq.png
vivekverma-arista b668edb
Add files via upload
vivekverma-arista 4b27b4f
Update aggregate_voq_counters.md
vivekverma-arista 079f037
Delete add_voq_seq.png
vivekverma-arista cccd69d
Update aggregate_voq_counters.md
vivekverma-arista 8918480
Made correction in counter attributes.
vivekverma-arista a2f2367
Update aggregate_voq_counters.md
vivekverma-arista da9f789
Update aggregate_voq_counters.md
vivekverma-arista 82ae143
Update aggregate_voq_counters.md
vivekverma-arista 2b47d1b
Update aggregate_voq_counters.md
vivekverma-arista 2bdb431
Merge branch 'sonic-net:master' into aggVoq
vivekverma-arista File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,99 @@ | ||
|
|
||
|
|
||
| # Aggregate VOQ Counters in SONiC # | ||
| #### Rev 1.0 | ||
|
|
||
| ## Table of Content | ||
| * [Revision](#revision) | ||
| * [Overview](#overview) | ||
| * [Requirements](#requirements) | ||
| * [Architecture Design](#architecture-design) | ||
| * [High-Level Design](#high-level-design) | ||
| * [CHASSIS_APP_DB Changes](#chassis_app_db-changes) | ||
| * [SWSS Changes](#swss-changes) | ||
| * [Repositories that need to be changed](#repositories-that-need-to-be-changed) | ||
| * [SAI API](#sai-api) | ||
| * [Configuration and management](#configuration-and-management) | ||
| * [CLI](#cli) | ||
| * [Restrictions/Limitations](#restrictionslimitations) | ||
| * [Testing Requirements/Design](#testing-requirementsdesign) | ||
| * [System Test cases](#system-test-cases) | ||
|
|
||
| ### Revision | ||
| | Rev | Date | Author | Change Description | | ||
| |:---:|:-----------:|:----------------------------------------------------------------------------------:|-----------------------------------| | ||
| | 1.0 | 11-Jan-2024 | Harsis Yadav, Pandurangan R S, Vivek Kumar Verma (Arista Networks) | Initial public version | | ||
|
|
||
| ### Overview | ||
|
|
||
| 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. | ||
|
|
||
| ### Requirements | ||
|
|
||
| Provide aggregate VOQ counters in a distributed VOQ architecture. | ||
|
|
||
| ### Architecture Design | ||
|
|
||
| No new architecture changes are required to SONiC. An instance of SWSS runs for each ASIC on it's respective FSI instance, 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. | ||
|
|
||
| ### High-Level Design | ||
|
|
||
| Figure 1: Gathering the VOQ stats in CHASSIS_APP_DB | ||
|  | ||
| Figure 2: Aggregation of VOQ stats | ||
|  | ||
|
|
||
|
|
||
| #### CHASSIS_APP_DB Changes | ||
|
|
||
| The following new VOQ counters should be available for each VOQ entry in the DB: | ||
| * `COUNTERS|fsi_id|asic_id|intf@fsi_id|asic_id:VOQ_index` | ||
| * `SAI_VOQ_STAT_PACKETS` | ||
| * `SAI_VOQ_STAT_BYTES` | ||
| * `SAI_VOQ_STAT_DROPPED_PACKETS` | ||
| * `SAI_VOQ_STAT_DROPPED_BYTES` | ||
| * The first part of the key ( before @ ) `fsi_id|asic_id|intf` denotes the physical location of the interface. | ||
| * The second part of the key ( after @ ) `fsi_id|asic_id:VOQ_index` denotes the location of the VOQ and its index. | ||
|
|
||
| #### SWSS Changes | ||
| ##### PortsOrch Changes | ||
| PortsOrch will periodically poll the VOQ stats through SAI call `get_queue_stats` and update them into `CHASSIS_APP_DB` | ||
|
|
||
| #### Repositories that need to be changed | ||
| * sonic-swss-common: https://github.com/sonic-net/sonic-swss-common/pull/855 | ||
| * sonic-swss: https://github.com/sonic-net/sonic-swss/pull/3047 | ||
| * sonic-utilities: https://github.com/sonic-net/sonic-utilities/pull/3163 | ||
| * sonic-mgmt | ||
|
|
||
| ### SAI API | ||
| No new SAI API is being added. PortsOrch will use the existing SAI API i.e. `get_queue_stats`. | ||
|
|
||
| ### Configuration and management | ||
| #### CLI | ||
| CLI (queuestat.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. | ||
|
|
||
| $ show VOQ counters [interface] --voq | ||
| ``` | ||
| 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 | ||
| ``` | ||
|
|
||
|
|
||
|
|
||
| ### Restrictions/Limitations | ||
|
|
||
| * Since this feature doesn't use flex counter, the polling interval is not configurable. | ||
| * The polling can't be disabled permanently as well. | ||
|
|
||
| ### Testing Requirements/Design | ||
| #### System Test cases | ||
| Send traffic across different ASICs and ensure aggregate counters are correctly displayed. | ||
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.