Skip to content

Current hash-fields setting does not use SAI_SWITCH_ATTR_ECMP/LAG_HASH_IPV4/V6 attribute(s) #3986

@sriharsha-nexthop

Description

@sriharsha-nexthop

For setting the global hash-fields, SONIC currently uses SAI_SWITCH_ATTR_ECMP/LAG_HASH.
However, Broadcom SAI only supports SAI_SWITCH_ATTR_ECMP/LAG_HASH_IPV4/6.
Hence, hash-fields can not be set on Broadcom devices.

Steps to Reproduce:

Running on a Broadcom device yields

admin@sonic:~$ show switch-hash capabilities
+--------+---------------------------------+
| Hash   | Capabilities                    |
+========+=================================+
| ECMP   | +---------------+-------------+ |
|        | | Hash Field    | Algorithm   | |
|        | |---------------+-------------| |
|        | | not supported | CRC         | |
|        | |               | XOR         | |
|        | |               | CRC_32LO    | |
|        | |               | CRC_32HI    | |
|        | |               | CRC_CCITT   | |
|        | |               | CRC_XOR     | |
|        | +---------------+-------------+ |
+--------+---------------------------------+
| LAG    | +---------------+-------------+ |
|        | | Hash Field    | Algorithm   | |
|        | |---------------+-------------| |
|        | | not supported | CRC         | |
|        | |               | XOR         | |
|        | |               | CRC_32LO    | |
|        | |               | CRC_32HI    | |
|        | |               | CRC_CCITT   | |
|        | |               | CRC_XOR     | |
|        | +---------------+-------------+ |
+--------+---------------------------------+

But Broadcom device do support setting hash-fields.

Expected Behavior
"show switch-hash capabilities' should list the fields under "Hash Field".
Also, It should allow configuring hash-fields as part of
"sudo config switch-hash global ecmp-hash" and "sudo config switch-hash global lag-hash"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions