-
Notifications
You must be signed in to change notification settings - Fork 543
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 support for ECMP and LAG hash offset #3138
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
This was referenced May 8, 2024
prsunny
reviewed
May 10, 2024
prsunny
approved these changes
May 14, 2024
lguohan
pushed a commit
to sonic-net/sonic-buildimage
that referenced
this pull request
May 21, 2024
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
@prsunny Request for 202311 Branch |
mssonicbld
pushed a commit
to mssonicbld/sonic-swss
that referenced
this pull request
Jun 26, 2024
* Add support for ECMP and LAG hash offset What I did Add support to update ECMP and LAG hash offset. Orchagent checks for SAI attribute capability and configure the offset values. Why I did it To avoid ECMP hash imbalance across T0 and T1s, different hash offsets can be configured. How I verified it sonic-mgmt tests ipfwd/test_nhop_group.py
Cherry-pick PR to 202311: #3204 |
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
yxieca
pushed a commit
to sonic-net/sonic-buildimage
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>
@kperumalbfn cherry pick PR didn't pass PR checker. Please check!!! |
2 similar comments
@kperumalbfn cherry pick PR didn't pass PR checker. Please check!!! |
@kperumalbfn cherry pick PR didn't pass PR checker. Please check!!! |
@kperumalbfn cherry pick PR didn't pass PR checker. Please check!!! |
mssonicbld
pushed a commit
that referenced
this pull request
Jul 3, 2024
* Add support for ECMP and LAG hash offset What I did Add support to update ECMP and LAG hash offset. Orchagent checks for SAI attribute capability and configure the offset values. Why I did it To avoid ECMP hash imbalance across T0 and T1s, different hash offsets can be configured. How I verified it sonic-mgmt tests ipfwd/test_nhop_group.py
mssonicbld
added
Included in 202311 Branch
and removed
Created PR to 202311 Branch
labels
Jul 3, 2024
8 tasks
wangxin
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Jul 9, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Jul 9, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
Merged
8 tasks
mssonicbld
pushed a commit
to mssonicbld/sonic-mgmt
that referenced
this pull request
Jul 9, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
Merged
8 tasks
mssonicbld
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Jul 10, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
mssonicbld
pushed a commit
to sonic-net/sonic-mgmt
that referenced
this pull request
Jul 10, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
link19430
pushed a commit
to link19430/sonic-buildimage-ec
that referenced
this pull request
Sep 19, 2024
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
gord1306
pushed a commit
to edge-core/sonic-buildimage
that referenced
this pull request
Sep 19, 2024
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
arista-hpandya
pushed a commit
to arista-hpandya/sonic-mgmt
that referenced
this pull request
Oct 2, 2024
What is the motivation for this PR? After sonic-net/sonic-swss#3138, configure hash_offset along with hash_seed attribute is enabled on 202311 onwards on Broadcom T1 platfrom. How did you do it? Remove the xfail marker of ecmp/test_ecmp_sai_value.py How did you verify/test it? Run ecmp/test_ecmp_sai_values.py on 7260 T1 DUT and passed. https://dev.azure.com/mssonic/internal/_build/results?buildId=586225&view=results Signed-off-by: zitingguo-ms <zitingguo@microsoft.com>
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.
What I did
Add support to update ECMP and LAG hash offset. Orchagent checks for SAI attribute capability and configure the offset values.
Why I did it
To avoid ECMP hash imbalance across T0 and T1s, different hash offsets can be configured.
How I verified it
sonic-mgmt tests ipfwd/test_nhop_group.py
sonic-mgmt PR to update the existing test with the nexthop rewrites after default hash_offset changes: sonic-net/sonic-mgmt#12765