summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2018-07-25 09:24:01 +0300
committerDavid S. Miller <davem@davemloft.net>2018-07-25 16:46:01 -0700
commit57e56d369914996ed81581da04af7b04a256a20a (patch)
tree7892e9b60997af9415794677c43f67eaf432c4af /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
parent174c0adb69a56bf098d9eb50cd3a78ec14657817 (diff)
mlxsw: spectrum_acl: Encapsulate C-TCAM region in A-TCAM region
In Spectrum-2 the C-TCAM is only used for rules that can't fit in the A-TCAM due to a limited number of masks per A-TCAM region. In addition, rules inserted into the C-TCAM may affect rules residing in the A-TCAM, by clearing their C-TCAM prune bit. The two regions are thus closely related and can be thought of as if the C-TCAM region is encapsulated in the A-TCAM one. Change the data structures to reflect that before introducing A-TCAM support and make C-TCAM region initialization part of the A-TCAM region initialization sequence. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
index ac6bdffd99a7..17187e5fc3f2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
@@ -163,6 +163,7 @@ struct mlxsw_sp_acl_atcam {
};
struct mlxsw_sp_acl_atcam_region {
+ struct mlxsw_sp_acl_ctcam_region cregion;
struct mlxsw_sp_acl_tcam_region *region;
struct mlxsw_sp_acl_atcam *atcam;
enum mlxsw_sp_acl_atcam_region_type type;
@@ -172,7 +173,9 @@ struct mlxsw_sp_acl_atcam_region {
int mlxsw_sp_acl_atcam_region_associate(struct mlxsw_sp *mlxsw_sp,
u16 region_id);
int mlxsw_sp_acl_atcam_region_init(struct mlxsw_sp *mlxsw_sp,
+ struct mlxsw_sp_acl_atcam_region *aregion,
struct mlxsw_sp_acl_tcam_region *region);
+void mlxsw_sp_acl_atcam_region_fini(struct mlxsw_sp_acl_atcam_region *aregion);
int mlxsw_sp_acl_atcam_init(struct mlxsw_sp *mlxsw_sp,
struct mlxsw_sp_acl_atcam *atcam);
void mlxsw_sp_acl_atcam_fini(struct mlxsw_sp *mlxsw_sp,