-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add default ECMP/LAG hash offset values for T0 and T1 #18912
Merged
Merged
Conversation
This file contains 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
3 tasks
/azpw ms_conflict |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
prsunny
approved these changes
May 15, 2024
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw ms_conflict |
/azpw ms_conflict -f |
/azpw ms_conflict |
/azpw ms_conflict -f |
2 similar comments
/azpw ms_conflict -f |
/azpw ms_conflict -f |
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Jun 26, 2024
…net#18912) To avoid ECMP polarization, hash offset values are set from orchagent. Earlier, vendor SDK sets the hash_offset value internally with the same value as hash_seed. After introduction of SAI attributes(SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET/SAI_SWITCH_ATTR_LAG_DEFAULT_HASH_OFFSET), those changes in SDK were removed causing imbalance of traffic in T1s. This change will pass the ECMP/LAG HASH_OFFSET values from orchagent to SAI and set them in ASIC. Different ECMP/LAG hash_offset values are set for T0 and T1 in swss switch.json(ecmp_hash_offset and lag_hash_offset). Values are different for T0 and T1 to avoid ECMP/LAG hash polarization. As part of switch initialization, these values are passed to switch orchagent. Switch orchagent process these values and call SAI switch API to set these values. Will be merged after swss changes: sonic-net/sonic-swss#3138 sonic-mgmt - sonic-net/sonic-mgmt#12765 Microsoft ADO (number only): 25873808
Cherry-pick PR to 202311: #19397 |
yxieca
pushed a commit
that referenced
this pull request
Jun 26, 2024
#19397) To avoid ECMP polarization, hash offset values are set from orchagent. Earlier, vendor SDK sets the hash_offset value internally with the same value as hash_seed. After introduction of SAI attributes(SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET/SAI_SWITCH_ATTR_LAG_DEFAULT_HASH_OFFSET), those changes in SDK were removed causing imbalance of traffic in T1s. This change will pass the ECMP/LAG HASH_OFFSET values from orchagent to SAI and set them in ASIC. Different ECMP/LAG hash_offset values are set for T0 and T1 in swss switch.json(ecmp_hash_offset and lag_hash_offset). Values are different for T0 and T1 to avoid ECMP/LAG hash polarization. As part of switch initialization, these values are passed to switch orchagent. Switch orchagent process these values and call SAI switch API to set these values. Will be merged after swss changes: sonic-net/sonic-swss#3138 sonic-mgmt - sonic-net/sonic-mgmt#12765 Microsoft ADO (number only): 25873808 Co-authored-by: Kumaresh Perumal <kperumal@microsoft.com>
yxieca
added a commit
that referenced
this pull request
Jul 1, 2024
11 tasks
This was referenced Jul 8, 2024
8 tasks
This was referenced Jul 15, 2024
Merged
This was referenced Jul 31, 2024
[chassis][202405]: Default hash-offset 0 causes ecmp load balancing failure on chassis-packet
#19746
Closed
wangxin
pushed a commit
that referenced
this pull request
Sep 4, 2024
Why I did it Fixes #19746 switch.json in swss docker sets the default hash offset to 0 for chassis-packet. The change was recently introduced via #18912 which was supposed to be only for T0/T1. On chassis-packet, each asics needs to set an unique hash offset to set an unique offset for load balancing algorithm. The new change overwrites platform setting and resets the hash-offset to 0 on all asics. This breaks the ecmp load balancing algorithm on chassis-packet. How I did it Remove the default hash-offset setting for chassis-packet. This setting is provided by platform based on platform specific rules. How to verify it Run sonic-mgmt fib/test_fib.py Signed-off-by: anamehra <anamehra@cisco.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-buildimage
that referenced
this pull request
Sep 4, 2024
Why I did it Fixes sonic-net#19746 switch.json in swss docker sets the default hash offset to 0 for chassis-packet. The change was recently introduced via sonic-net#18912 which was supposed to be only for T0/T1. On chassis-packet, each asics needs to set an unique hash offset to set an unique offset for load balancing algorithm. The new change overwrites platform setting and resets the hash-offset to 0 on all asics. This breaks the ecmp load balancing algorithm on chassis-packet. How I did it Remove the default hash-offset setting for chassis-packet. This setting is provided by platform based on platform specific rules. How to verify it Run sonic-mgmt fib/test_fib.py Signed-off-by: anamehra <anamehra@cisco.com>
mssonicbld
pushed a commit
that referenced
this pull request
Sep 5, 2024
Why I did it Fixes #19746 switch.json in swss docker sets the default hash offset to 0 for chassis-packet. The change was recently introduced via #18912 which was supposed to be only for T0/T1. On chassis-packet, each asics needs to set an unique hash offset to set an unique offset for load balancing algorithm. The new change overwrites platform setting and resets the hash-offset to 0 on all asics. This breaks the ecmp load balancing algorithm on chassis-packet. How I did it Remove the default hash-offset setting for chassis-packet. This setting is provided by platform based on platform specific rules. How to verify it Run sonic-mgmt fib/test_fib.py Signed-off-by: anamehra <anamehra@cisco.com>
vvolam
pushed a commit
to vvolam/sonic-buildimage
that referenced
this pull request
Sep 12, 2024
Why I did it Fixes sonic-net#19746 switch.json in swss docker sets the default hash offset to 0 for chassis-packet. The change was recently introduced via sonic-net#18912 which was supposed to be only for T0/T1. On chassis-packet, each asics needs to set an unique hash offset to set an unique offset for load balancing algorithm. The new change overwrites platform setting and resets the hash-offset to 0 on all asics. This breaks the ecmp load balancing algorithm on chassis-packet. How I did it Remove the default hash-offset setting for chassis-packet. This setting is provided by platform based on platform specific rules. How to verify it Run sonic-mgmt fib/test_fib.py Signed-off-by: anamehra <anamehra@cisco.com>
8 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Why I did it
Add default ECMP/LAG hash offset values.
Work item tracking
How I did it
Update switch.json file in docker swss
How to verify it
Sonic-mgmt test with updated nexthops after applying hash_offset values. "ipfwd/test_nhop_group.py::test_nhop_group_member_order_capability"
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
master
Description for the changelog
To avoid ECMP polarization, hash offset values are set from orchagent.
Earlier, vendor SDK sets the hash_offset value internally with the same value as hash_seed. After introduction of SAI attributes(SAI_SWITCH_ATTR_ECMP_DEFAULT_HASH_OFFSET/SAI_SWITCH_ATTR_LAG_DEFAULT_HASH_OFFSET), those changes in SDK were removed causing imbalance of traffic in T1s.
This change will pass the ECMP/LAG HASH_OFFSET values from orchagent to SAI and set them in ASIC.
Will be merged after swss changes: sonic-net/sonic-swss#3138
sonic-mgmt - sonic-net/sonic-mgmt#12765