]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_router: Move multipath hash configuration to a bitmap
authorIdo Schimmel <idosch@nvidia.com>
Wed, 19 May 2021 12:08:20 +0000 (15:08 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 May 2021 19:47:47 +0000 (12:47 -0700)
commit6e99f2a792d623eac035e45393b56abe95a84779
tree3f5aa52cfe9d855f80994f0667fa2b2e4bf75d00
parentf37a436a8f2e5216c245081bb38aa9101b133b04
mlxsw: spectrum_router: Move multipath hash configuration to a bitmap

Currently, the multipath hash configuration is written directly to the
register payload. While this is OK for the two currently supported
policies, it is going to be hard to follow when more policies and more
packet fields are added.

Instead, set the required headers and fields in a bitmap and then dump
it to the register payload.

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/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_router.c