summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
diff options
context:
space:
mode:
authorJiri Pirko <jiri@mellanox.com>2019-02-07 11:22:54 +0000
committerDavid S. Miller <davem@davemloft.net>2019-02-08 15:02:50 -0800
commite5e7962ee5c277f769791d1d857d3641200ee0eb (patch)
tree3c99b92e462c4c5de5ff8070bc177884ba2c75ac /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
parent5c661f142c1699095fbb80efb48198ef4c6c9d1d (diff)
mlxsw: spectrum_acl: Implement region migration according to hints
If the hints are returned, the migration should be started. For that to happen, there is a need to create a second physical region in TCAM with new ERP set by passing the hints and then move chunk by chunk, entry by entry. During the transition, two lookups will occur. One in old region and another in new region. The highest priority rule will be chosen. In an unlikely case that the migration will fail and also rollback to original region will fail the vregion will become in bad state. Everything will work, only no future rehash will be possible. In a follow-up work, this can be resolved by trying to resume the rollback in delayed work and repair the vregion. 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>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h2
1 files changed, 2 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 c2a340270982..440a3483ed7b 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl_tcam.h
@@ -17,6 +17,8 @@ struct mlxsw_sp_acl_tcam {
unsigned long *used_groups; /* bit array */
unsigned int max_groups;
unsigned int max_group_size;
+ struct list_head vregion_list;
+ u32 vregion_rehash_intrvl; /* ms */
unsigned long priv[0];
/* priv has to be always the last item */
};