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: Nir Dotan <nird@mellanox.com> Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
f5a2852ed0
commit
8c81b7438b
@ -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,
|
||||
rulei);
|
||||
if (err)
|
||||
@ -516,6 +523,8 @@ __mlxsw_sp_acl_atcam_entry_add(struct mlxsw_sp *mlxsw_sp,
|
||||
return 0;
|
||||
|
||||
err_rule_insert:
|
||||
mlxsw_sp_acl_erp_bf_remove(mlxsw_sp, aregion, erp_mask, aentry);
|
||||
err_bf_insert:
|
||||
rhashtable_remove_fast(&aregion->entries_ht, &aentry->ht_node,
|
||||
mlxsw_sp_acl_atcam_entries_ht_params);
|
||||
err_rhashtable_insert:
|
||||
@ -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_atcam_entries_ht_params);
|
||||
mlxsw_sp_acl_erp_mask_put(aregion, aentry->erp_mask);
|
||||
|
Loading…
Reference in New Issue
Block a user