Skip to content

[hash]: Add ECMP/LAG hash algorithm to OA#2953

Merged
prsunny merged 2 commits intosonic-net:masterfrom
nazariig:master-hash-algorithm
Nov 30, 2023
Merged

[hash]: Add ECMP/LAG hash algorithm to OA#2953
prsunny merged 2 commits intosonic-net:masterfrom
nazariig:master-hash-algorithm

Conversation

@nazariig
Copy link
Copy Markdown
Collaborator

@nazariig nazariig commented Nov 2, 2023

Signed-off-by: Nazarii Hnydyn nazariig@nvidia.com

DEPENDS:

  1. [hash]: Extend VS lib with ECMP/LAG hash algorithm sonic-sairedis#1316

HLD: sonic-net/SONiC#1501

What I did

  • Implemented Generic Hash feature

Why I did it

  • Implementation is done according to the Generic Hash HLD

How I verified it

  1. Run Generic Hash VS UTs

Details if related

  • N/A

@nazariig
Copy link
Copy Markdown
Collaborator Author

nazariig commented Nov 2, 2023

@stepanblyschak FYI

@nazariig nazariig force-pushed the master-hash-algorithm branch from e8cf4e3 to 3f25526 Compare November 15, 2023 12:26
@nazariig
Copy link
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig nazariig force-pushed the master-hash-algorithm branch from 3f25526 to 15961a0 Compare November 16, 2023 10:18
@liat-grozovik
Copy link
Copy Markdown
Collaborator

@prsunny kindly reminder to review or to assign someone on behalf of you.
this is for 202311 and should get in so better to complete before branch out.
in any case, if you wish to have another reviewer from Nvidia to approve the PRs, please let me know and i will assign.

@nazariig nazariig force-pushed the master-hash-algorithm branch from 15961a0 to abaf3fb Compare November 21, 2023 16:30
@nazariig
Copy link
Copy Markdown
Collaborator Author

@prsunny just a kind reminder

@nazariig nazariig force-pushed the master-hash-algorithm branch 2 times, most recently from 5265fe8 to 473135a Compare November 22, 2023 08:43
@nazariig
Copy link
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig nazariig force-pushed the master-hash-algorithm branch from 473135a to e7a3692 Compare November 23, 2023 16:34
@nazariig
Copy link
Copy Markdown
Collaborator Author

@prsunny just a kind reminder

@nazariig
Copy link
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig
Copy link
Copy Markdown
Collaborator Author

/azpw run

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@nazariig
Copy link
Copy Markdown
Collaborator Author

@prsunny just a kind reminder

@nazariig nazariig force-pushed the master-hash-algorithm branch from e7a3692 to 0fa0985 Compare November 28, 2023 19:48
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
Signed-off-by: Nazarii Hnydyn <nazariig@nvidia.com>
@nazariig nazariig force-pushed the master-hash-algorithm branch from edc5663 to 5b83e97 Compare November 30, 2023 09:38
@nazariig
Copy link
Copy Markdown
Collaborator Author

@prsunny just a kind reminder

Copy link
Copy Markdown
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, minor comment


if (obj.haSet.empty())
{
SWSS_LOG_ERROR("Failed to validate hash algorithm: no hash algorithm capabilities");
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this must be WARN instead of ERROR as some platforms may not support algorithm capabilities


if (obj.haSet.count(haValue) == 0)
{
SWSS_LOG_ERROR("Failed to validate hash algorithm: value(%s) is not supported", toStr(haValue).c_str());
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Please change to WARN

@liushilongbuaa
Copy link
Copy Markdown
Contributor

Already in 202311.
No action is needed.

Janetxxx pushed a commit to Janetxxx/sonic-swss that referenced this pull request Nov 10, 2025
* [hash]: Add ECMP/LAG hash algorithm to OA.
* Implement as defined in sonic-net/SONiC#1501
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants