-
Notifications
You must be signed in to change notification settings - Fork 574
ECMP Member Capability and Configuration #1461
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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,41 @@ | ||
| # ECMP Count Capability and Configuration | ||
|
|
||
|
|
||
| This document talks about the | ||
| - Capability query of MAX ECMP Count supported by silicon | ||
| - Configuration | ||
| - SAI adapter expectation | ||
|
|
||
| ## Problem Description | ||
| There is a mechanism to set the HW default of max ecmp member count using a Key-Value string SAI_KEY_NUM_ECMP_MEMBERS during the system boot time. This KV string can be set only once and either is based on prior knowledge of HW capability or assumed default. SAI adapter consumes this Key-Value string and sets the ecmp member count in HW. Set value can be queried by a read only attribute SAI_SWITCH_ATTR_ECMP_MEMBERS. | ||
|
|
||
| ## Spec Enhancement | ||
| Two new Switch attributes are introduced to address the abovementioned issue. | ||
|
|
||
| > SAI_SWITCH_ATTR_MAX_ECMP_MEMBER_COUNT (Read Only) | ||
| > This is a capability query during switch init to find out device specific max number of ecmp members supported. | ||
|
|
||
| > SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT (read/write) | ||
| > This attribute is set based on the query for MAX_ECMP_MEMBER_COUNT and can be changed dynamically. | ||
|
|
||
| ## SAI Adapter Requirements | ||
| Typical Workflow: | ||
|
|
||
| Switch object create | ||
| Switch get SAI_SWITCH_ATTR_MAX_ECMP_MEMBER_COUNT | ||
| Switch set SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT (either before configuring ecmp groups or during system runtime) | ||
|
|
||
| Following are the possible scenarios for SAI adapter to handle | ||
| 1. HW does not support the attribute SAI_SWITCH_ATTR_ECMP_MEMBER_COUNT: SAI adapter must return error SAI_STATUS_NOT_SUPPORTED. | ||
| 2. HW supports dynamic modification of ecmp count only and only if there are no ecmp groups configured | ||
| a. If there are no ECMP groups configured: SAI adapter must handle the update and return SAI_STATUS_SUCCESS | ||
| b. If there are ECMP groups configured: SAI adapter must return SAI_STATUS_INSUFFICIENT_RESOURCES | ||
| 3. HW supports dynamic modification of ecmp count irrespestive of ecmp group configuration) | ||
| a. If ecmp count is increased: SAI adapter must handle the update and return SAI_STATUS_SUCCESS | ||
| b. If ecmp count is decreased: SAI adapter can not handle the update as it doesn't know which members to purge. In this case SAI adaper must return SAI_STATUS_NOT_IMPLEMENTED | ||
|
|
||
| ## ECMP Type, Member Count and Next Hop Group Member Count | ||
| ECMP member count is a global configuration and controls the allocation of HW memory for carving out chunks of ECMP group with member count. This is used for all ECMP types. If there is a need for differentiating a specific ECMP type for max and configured scale as a separate HW resource, we should add a ecmp type specific attribute later on. | ||
|
|
||
JaiOCP marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| HW may support variable size member count configuration per nexthop group using the attribute SAI_NEXT_HOP_GROUP_ATTR_NEXT_HOP_COUNT. In this case SAI adapter must return attribute as not supported SAI_STATUS_NOT_SUPPORTED. | ||
|
|
||
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
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.