]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
mlxsw: Add operations structure for bloom filter calculation
authorAmit Cohen <amcohen@nvidia.com>
Thu, 6 Jan 2022 16:06:50 +0000 (18:06 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 7 Jan 2022 04:00:45 +0000 (20:00 -0800)
commit58723d2f77717373d44721a2c65f8af5917102b7
tree576b61323d09330e4df599ee2ec4db45f944038f
parent29409f363e2dfdab41bb2f3019116a0a585e8d0b
mlxsw: Add operations structure for bloom filter calculation

Spectrum-4 will calculate hash function for bloom filter differently from
the existing ASICs.

There are two changes:
1. Instead of using one hash function to calculate 16 bits output (CRC-16),
   two functions will be used.
2. The chunks will be built differently, without padding.

As preparation for support of Spectrum-4 bloom filter, add 'ops'
structure to allow handling different calculation for different ASICs.

Signed-off-by: Amit Cohen <amcohen@nvidia.com>
Reviewed-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c
drivers/net/ethernet/mellanox/mlxsw/spectrum.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_bloom_filter.c
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h