Skip to content
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

[Mellanox] Update headroom calculation algorithm #3235

Merged
merged 6 commits into from
Sep 10, 2024

Conversation

stephenxs
Copy link
Collaborator

@stephenxs stephenxs commented Jul 15, 2024

What I did

  1. Fix a bug in lossless headroom calculation regarding the small packet percentage which should be calculated in a size-based approach instead of packet-based
  2. Adjust Mellanox-specific lossless headroom calculation algorithm

Why I did it

How I verified it

Manual test
Regression test sonic-net/sonic-mgmt#14229

Details if related

@stephenxs stephenxs force-pushed the update-headroom-calculation branch from e936995 to d419dda Compare July 15, 2024 06:22
@stephenxs
Copy link
Collaborator Author

The manual test result is as below. Deviation is small and acceptable
port MTU: 9100
RDMA MTU: 1024
Small packet percentage: 50%
SPC3

  • 400G, 300m.
    • by lua: xon 38912, xoff 272384, size 320512
    • by using internal tool: xon 38k, xoff 265.76k, size 312.8k
  • 100G, 40m.
    • by lua: xon 19456, xoff 51200, size 70656
    • by using internal tool: xon 19k, xoff 49.62k, size 68.6k

SPC4

  • 800G, 300m.
    • by lua: xon 38912 xoff 474112 size 522240
    • by using internal tool: xon 38k xoff 463.01 size 510.0
  • 200G, 40m
    • by lua: xon 19456 xoff 65536 size 84992
    • by using internal tool: xon 19k xoff 63.88k size 84.9k

@stephenxs stephenxs marked this pull request as ready for review August 21, 2024 05:35
@keboliu keboliu requested a review from prsunny August 21, 2024 09:32
JibinBao added a commit to JibinBao/sonic-mgmt that referenced this pull request Aug 23, 2024
update dynamic buffer test due to the algorithm calculating headroom is changed
The relevant PR: sonic-net/sonic-swss#3235

Change-Id: I29ad3c4d0b9af0c1357c0890328201c3254cbba2
@stephenxs
Copy link
Collaborator Author

/azpw run

@mssonicbld
Copy link
Collaborator

/AzurePipelines run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@kperumalbfn
Copy link
Contributor

LGTM

…et-based

Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
Signed-off-by: Stephen Sun <stephens@nvidia.com>
@prsunny prsunny merged commit 3943093 into sonic-net:master Sep 10, 2024
17 checks passed
@stephenxs stephenxs deleted the update-headroom-calculation branch September 11, 2024 01:46
shuaishang pushed a commit to wenwang00/sonic-swss that referenced this pull request Sep 18, 2024
* [Mellanox] Update headroom calculation algorithm (sonic-net#3235)
* Bug fix: small packet percentage should be byte-based instead of packet-based
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants