OSDN Git Service

mlxsw: spectrum_router: Add support for inner layer 3 multipath hash policy
authorIdo Schimmel <idosch@nvidia.com>
Wed, 19 May 2021 12:08:23 +0000 (15:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 May 2021 19:47:47 +0000 (12:47 -0700)
commit01848e05f8bbff2d799073b307fe2eb42bee764b
treedbbdc73fd584656bc5b4c26428883ee37ac67d62
parentb7b8f435ea3b33ba7067f992c5b85a62f24d19ed
mlxsw: spectrum_router: Add support for inner layer 3 multipath hash policy

When this policy is set, the kernel uses the inner layer 3 fields for
multipath hash computation and falls back to the outer fields if no
encapsulation was encountered. This behavior is most likely influenced
by the behavior of the flow dissector, which is used for the packet
dissection.

The Spectrum ASIC, however, cannot fallback to outer fields if inner
fields are not available. This should not result in a discrepancy from
the software data path because if several flows have matching inner
fields, they will tend to have matching outer fields as well.

Therefore, implement this policy by enabling both outer and inner layer
3 fields for the multipath hash computation.

Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c