aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorNir Dotan <nird@mellanox.com>2018-12-16 08:49:33 +0000
committerDavid S. Miller <davem@davemloft.net>2018-12-16 15:20:34 -0800
commitdd97d85f1e4daaa86d7a2813d718b91e5261df57 (patch)
treec5a6afecb2a90fa75be621506d6e29a0b859ff75 /drivers
parentmlxsw: spectrum_acl: Update Bloom filter on eRP transitions (diff)
downloadlinux-dev-dd97d85f1e4daaa86d7a2813d718b91e5261df57.tar.xz
linux-dev-dd97d85f1e4daaa86d7a2813d718b91e5261df57.zip
mlxsw: spectrum_acl: Set master RP index on transition to eRP
Bloom filter is updated on transitions from a single rule pattern, also called master RP, to eRP table and vice versa. Since rules are being written to or deleted from the Bloom filter on such transitions, it is not required to keep the same eRP bank ID for the master RP. Change master RP index assignment so it will be assigned with zero. This is consistent with the assignment of the first available spot that is used for allocating eRP's indices. Signed-off-by: Nir Dotan <nird@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
index 3326c930f3fa..1c19feefa5f2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c
@@ -583,10 +583,10 @@ mlxsw_sp_acl_erp_region_table_trans(struct mlxsw_sp_acl_erp_table *erp_table)
goto err_table_master_rp;
}
- /* Maintain the same eRP bank for the master RP, so that we
- * wouldn't need to update the bloom filter
+ /* Make sure the master RP is using a valid index, as
+ * only a single eRP row is currently allocated.
*/
- master_rp->index = master_rp->index % erp_core->num_erp_banks;
+ master_rp->index = 0;
__set_bit(master_rp->index, erp_table->erp_index_bitmap);
err = mlxsw_sp_acl_erp_table_erp_add(erp_table, master_rp);