]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: acl: Pass key pointer to master_mask_set/clear
authorJiri Pirko <jiri@mellanox.com>
Wed, 14 Nov 2018 08:22:30 +0000 (08:22 +0000)
committerDavid S. Miller <davem@davemloft.net>
Thu, 15 Nov 2018 22:43:43 +0000 (14:43 -0800)
commitacb7eb52315fc133c128340c0485d88a016e23a2
tree0b9190244b8d4fa7e2cdb08f46ad8fd303516a14
parent7ff83fc2cd343d1c4e6d62bcda327048e0054aa4
mlxsw: spectrum: acl: Pass key pointer to master_mask_set/clear

The device requires that the master mask of each region will be
composed from a logical OR between all the unmasked bits in the region.
Currently, this is just a logical OR between all the eRPs used in the
region, but the next patch is going to introduce delta bits support
which need to be taken into account as well.

Since the eRP does not include the delta bits, pass the key pointer to
mlxsw_sp_acl_erp_master_mask_set/clear instead. Convert key->mask to
the bitmap on fly.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c