Commit 8c81b743 authored by Nir Dotan's avatar Nir Dotan Committed by David S. Miller
Browse files

mlxsw: spectrum_acl: Set A-TCAM rules in Bloom filter

Add calls to eRP module for updating Bloom filter when a rule is
added or removed from the A-TCAM. eRP module will update the Bloom
filter only for cases in which the region has an active eRP table.
Signed-off-by: default avatarNir Dotan <>
Signed-off-by: default avatarIdo Schimmel <>
Signed-off-by: default avatarDavid S. Miller <>
parent f5a2852e
......@@ -508,6 +508,13 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp,
if (err)
goto err_rhashtable_insert;
/* Bloom filter must be updated here, before inserting the rule into
* the A-TCAM.
err = mlxsw_sp_acl_erp_bf_insert(mlxsw_sp, aregion, erp_mask, aentry);
if (err)
goto err_bf_insert;
err = mlxsw_sp_acl_atcam_region_entry_insert(mlxsw_sp, aregion, aentry,
if (err)
......@@ -516,6 +523,8 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp,
return 0;
mlxsw_sp_acl_erp_bf_remove(mlxsw_sp, aregion, erp_mask, aentry);
rhashtable_remove_fast(&aregion->entries_ht, &aentry->ht_node,
......@@ -529,6 +538,7 @@ __mlxsw_sp_acl_atcam_entry_del(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_atcam_entry *aentry)
mlxsw_sp_acl_atcam_region_entry_remove(mlxsw_sp, aregion, aentry);
mlxsw_sp_acl_erp_bf_remove(mlxsw_sp, aregion, aentry->erp_mask, aentry);
rhashtable_remove_fast(&aregion->entries_ht, &aentry->ht_node,
mlxsw_sp_acl_erp_mask_put(aregion, aentry->erp_mask);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment