diff options
author | Ido Schimmel <idosch@mellanox.com> | 2018-07-25 09:24:02 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-07-25 16:46:01 -0700 |
commit | f58df510f899e4560c4e2d397f05a53f0d343fc0 (patch) | |
tree | b10ba910a5488b6c9995e01ee53b87ef1556b95e /drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | |
parent | 57e56d369914996ed81581da04af7b04a256a20a (diff) | |
download | talos-op-linux-f58df510f899e4560c4e2d397f05a53f0d343fc0.tar.gz talos-op-linux-f58df510f899e4560c4e2d397f05a53f0d343fc0.zip |
mlxsw: spectrum_acl: Make global TCAM resources available to regions
Each TCAM region currently uses its own resources and there is no
sharing between the different regions.
This is going to change with A-TCAM as each region will need to allocate
an eRP table from the global eRP tables array.
Make the global TCAM resources available to each region by passing the
TCAM private data to the region initialization routine.
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/spectrum2_acl_tcam.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c index 7e392529a896..bef2329bb233 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum2_acl_tcam.c @@ -130,14 +130,16 @@ static void mlxsw_sp2_acl_tcam_fini(struct mlxsw_sp *mlxsw_sp, void *priv) static int mlxsw_sp2_acl_tcam_region_init(struct mlxsw_sp *mlxsw_sp, void *region_priv, + void *tcam_priv, struct mlxsw_sp_acl_tcam_region *_region) { struct mlxsw_sp2_acl_tcam_region *region = region_priv; + struct mlxsw_sp2_acl_tcam *tcam = tcam_priv; region->region = _region; - return mlxsw_sp_acl_atcam_region_init(mlxsw_sp, ®ion->aregion, - _region); + return mlxsw_sp_acl_atcam_region_init(mlxsw_sp, &tcam->atcam, + ®ion->aregion, _region); } static void |