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

Generic Hashing Algorithm HLD #1501

Merged
merged 2 commits into from
Nov 20, 2023

Conversation

nazariig
Copy link
Collaborator

@nazariig nazariig commented Oct 23, 2023

This document provides general information about Generic Hash implementation in SONiC
This scope of this HLD is:

  • In scope:
    ECMP/LAG switch hash configuration
    ECMP/LAG switch hash algorithm configuration

  • Out of scope:
    ECMP/LAG switch hash seed configuration

PR title state context
GH YANG Model GitHub issue/pull request detail GitHub pull request check contexts
GH VS Library GitHub issue/pull request detail GitHub pull request check contexts
GH Switch OA GitHub issue/pull request detail GitHub pull request check contexts
GH CLI GitHub issue/pull request detail GitHub pull request check contexts
GH Test Plan GitHub issue/pull request detail GitHub pull request check contexts
GH Test GitHub issue/pull request detail GitHub pull request check contexts

@zhangyanzhao
Copy link
Collaborator

sonic community review recording https://zoom.us/rec/share/0iPxMuCMcKlDcqwisDHcTgwGMP5-GddrdRrYmDky9-l_Fvzo_gdALiQZMsxCIDFw.Jvh9HTTlJAjyrFDt

@liat-grozovik
Copy link
Collaborator

@venkatmahalingam @sallylsy any further inputs? if not, can you please approve it from your end?
@zhangyanzhao could you please update if additional reviewers are needed. Kindly reminder that this adds is for 202311 and we need the FRs to get into that branch. Thus asking for making sure this feature is not diverged.

test plan is in progress and should be available soon. still should not hold from this code to get into 202311 but only should reflect the maturity flag.

kcudnik pushed a commit to sonic-net/sonic-sairedis that referenced this pull request Nov 16, 2023
@liat-grozovik
Copy link
Collaborator

@zhangyanzhao has no additional feedback from the team I wish to merge this HLD and move forward with the rest of the PR.
Kindly reminder that this feature is for 202311 and cannot be taken out of it.

@liat-grozovik liat-grozovik changed the title Generic Hash: Hashing Algorithm HLD Generic Hashing Algorithm HLD Nov 20, 2023
@liat-grozovik liat-grozovik merged commit 102f58a into sonic-net:master Nov 20, 2023
prsunny pushed a commit to sonic-net/sonic-swss that referenced this pull request Nov 30, 2023
* [hash]: Add ECMP/LAG hash algorithm to OA.
* Implement as defined in sonic-net/SONiC#1501
qiluo-msft pushed a commit to sonic-net/sonic-utilities that referenced this pull request Dec 1, 2023
**HLD:** sonic-net/SONiC#1501

#### What I did
* Implemented CLI for Generic Hash feature

#### How I did it
* Integrated Generic Hash interface into `config` and `show` CLI root

#### How to verify it
* Run Generic Hash CLI UTs

#### Previous command output (if the output of a command-line utility has changed)
```
root@sonic:/home/admin# show switch-hash global
ECMP HASH          LAG HASH
-----------------  -----------------
DST_MAC            DST_MAC
SRC_MAC            SRC_MAC
ETHERTYPE          ETHERTYPE
IP_PROTOCOL        IP_PROTOCOL
DST_IP             DST_IP
SRC_IP             SRC_IP
L4_DST_PORT        L4_DST_PORT
L4_SRC_PORT        L4_SRC_PORT
INNER_DST_MAC      INNER_DST_MAC
INNER_SRC_MAC      INNER_SRC_MAC
INNER_ETHERTYPE    INNER_ETHERTYPE
INNER_IP_PROTOCOL  INNER_IP_PROTOCOL
INNER_DST_IP       INNER_DST_IP
INNER_SRC_IP       INNER_SRC_IP
INNER_L4_DST_PORT  INNER_L4_DST_PORT
INNER_L4_SRC_PORT  INNER_L4_SRC_PORT
```

#### New command output (if the output of a command-line utility has changed)
```
root@sonic:/home/admin# show switch-hash global
+--------+-------------------------------------+
| Hash   | Configuration                       |
+========+=====================================+
| ECMP   | +-------------------+-------------+ |
|        | | Hash Field        | Algorithm   | |
|        | |-------------------+-------------| |
|        | | DST_MAC           | CRC         | |
|        | | SRC_MAC           |             | |
|        | | ETHERTYPE         |             | |
|        | | IP_PROTOCOL       |             | |
|        | | DST_IP            |             | |
|        | | SRC_IP            |             | |
|        | | L4_DST_PORT       |             | |
|        | | L4_SRC_PORT       |             | |
|        | | INNER_DST_MAC     |             | |
|        | | INNER_SRC_MAC     |             | |
|        | | INNER_ETHERTYPE   |             | |
|        | | INNER_IP_PROTOCOL |             | |
|        | | INNER_DST_IP      |             | |
|        | | INNER_SRC_IP      |             | |
|        | | INNER_L4_DST_PORT |             | |
|        | | INNER_L4_SRC_PORT |             | |
|        | +-------------------+-------------+ |
+--------+-------------------------------------+
| LAG    | +-------------------+-------------+ |
|        | | Hash Field        | Algorithm   | |
|        | |-------------------+-------------| |
|        | | DST_MAC           | CRC         | |
|        | | SRC_MAC           |             | |
|        | | ETHERTYPE         |             | |
|        | | IP_PROTOCOL       |             | |
|        | | DST_IP            |             | |
|        | | SRC_IP            |             | |
|        | | L4_DST_PORT       |             | |
|        | | L4_SRC_PORT       |             | |
|        | | INNER_DST_MAC     |             | |
|        | | INNER_SRC_MAC     |             | |
|        | | INNER_ETHERTYPE   |             | |
|        | | INNER_IP_PROTOCOL |             | |
|        | | INNER_DST_IP      |             | |
|        | | INNER_SRC_IP      |             | |
|        | | INNER_L4_DST_PORT |             | |
|        | | INNER_L4_SRC_PORT |             | |
|        | +-------------------+-------------+ |
+--------+-------------------------------------+
```
yxieca pushed a commit to sonic-net/sonic-utilities that referenced this pull request Dec 14, 2023
**HLD:** sonic-net/SONiC#1501

#### What I did
* Implemented CLI for Generic Hash feature

#### How I did it
* Integrated Generic Hash interface into `config` and `show` CLI root

#### How to verify it
* Run Generic Hash CLI UTs

#### Previous command output (if the output of a command-line utility has changed)
```
root@sonic:/home/admin# show switch-hash global
ECMP HASH          LAG HASH
-----------------  -----------------
DST_MAC            DST_MAC
SRC_MAC            SRC_MAC
ETHERTYPE          ETHERTYPE
IP_PROTOCOL        IP_PROTOCOL
DST_IP             DST_IP
SRC_IP             SRC_IP
L4_DST_PORT        L4_DST_PORT
L4_SRC_PORT        L4_SRC_PORT
INNER_DST_MAC      INNER_DST_MAC
INNER_SRC_MAC      INNER_SRC_MAC
INNER_ETHERTYPE    INNER_ETHERTYPE
INNER_IP_PROTOCOL  INNER_IP_PROTOCOL
INNER_DST_IP       INNER_DST_IP
INNER_SRC_IP       INNER_SRC_IP
INNER_L4_DST_PORT  INNER_L4_DST_PORT
INNER_L4_SRC_PORT  INNER_L4_SRC_PORT
```

#### New command output (if the output of a command-line utility has changed)
```
root@sonic:/home/admin# show switch-hash global
+--------+-------------------------------------+
| Hash   | Configuration                       |
+========+=====================================+
| ECMP   | +-------------------+-------------+ |
|        | | Hash Field        | Algorithm   | |
|        | |-------------------+-------------| |
|        | | DST_MAC           | CRC         | |
|        | | SRC_MAC           |             | |
|        | | ETHERTYPE         |             | |
|        | | IP_PROTOCOL       |             | |
|        | | DST_IP            |             | |
|        | | SRC_IP            |             | |
|        | | L4_DST_PORT       |             | |
|        | | L4_SRC_PORT       |             | |
|        | | INNER_DST_MAC     |             | |
|        | | INNER_SRC_MAC     |             | |
|        | | INNER_ETHERTYPE   |             | |
|        | | INNER_IP_PROTOCOL |             | |
|        | | INNER_DST_IP      |             | |
|        | | INNER_SRC_IP      |             | |
|        | | INNER_L4_DST_PORT |             | |
|        | | INNER_L4_SRC_PORT |             | |
|        | +-------------------+-------------+ |
+--------+-------------------------------------+
| LAG    | +-------------------+-------------+ |
|        | | Hash Field        | Algorithm   | |
|        | |-------------------+-------------| |
|        | | DST_MAC           | CRC         | |
|        | | SRC_MAC           |             | |
|        | | ETHERTYPE         |             | |
|        | | IP_PROTOCOL       |             | |
|        | | DST_IP            |             | |
|        | | SRC_IP            |             | |
|        | | L4_DST_PORT       |             | |
|        | | L4_SRC_PORT       |             | |
|        | | INNER_DST_MAC     |             | |
|        | | INNER_SRC_MAC     |             | |
|        | | INNER_ETHERTYPE   |             | |
|        | | INNER_IP_PROTOCOL |             | |
|        | | INNER_DST_IP      |             | |
|        | | INNER_SRC_IP      |             | |
|        | | INNER_L4_DST_PORT |             | |
|        | | INNER_L4_SRC_PORT |             | |
|        | +-------------------+-------------+ |
+--------+-------------------------------------+
```
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.

6 participants