]> git.baikalelectronics.ru Git - kernel.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)
commit1bdfbc79dbfb7a53bb9b7b5baaa71223b41bfbdb
tree576b61323d09330e4df599ee2ec4db45f944038f
parent8b05cbf98b1e9681730516afb0e403d925fde251
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