-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Generic Hashing Algorithm HLD #1501
Conversation
Signed-off-by: Nazarii Hnydyn <[email protected]>
Signed-off-by: Nazarii Hnydyn <[email protected]>
sonic community review recording https://zoom.us/rec/share/0iPxMuCMcKlDcqwisDHcTgwGMP5-GddrdRrYmDky9-l_Fvzo_gdALiQZMsxCIDFw.Jvh9HTTlJAjyrFDt |
@venkatmahalingam @sallylsy any further inputs? if not, can you please approve it from your end? 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. |
Signed-off-by: Nazarii Hnydyn [email protected] HLD: sonic-net/SONiC#1501
@zhangyanzhao has no additional feedback from the team I wish to merge this HLD and move forward with the rest of the PR. |
* [hash]: Add ECMP/LAG hash algorithm to OA. * Implement as defined in sonic-net/SONiC#1501
**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 | | | | | +-------------------+-------------+ | +--------+-------------------------------------+ ```
**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 | | | | | +-------------------+-------------+ | +--------+-------------------------------------+ ```
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