summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
diff options
context:
space:
mode:
authorJiri Pirko2018-07-08 22:51:20 +0200
committerDavid S. Miller2018-07-10 01:24:17 +0200
commit64eccd0066775aaf7442761413b3cac137c00ced (patch)
treed6f631ad8523501a4307a34b460909dc9db18d59 /drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
parentmlxsw: spectrum_mr_tcam: Push Spectrum-specific operations into a separate file (diff)
downloadkernel-qcow2-linux-64eccd0066775aaf7442761413b3cac137c00ced.tar.gz
kernel-qcow2-linux-64eccd0066775aaf7442761413b3cac137c00ced.tar.xz
kernel-qcow2-linux-64eccd0066775aaf7442761413b3cac137c00ced.zip
mlxsw: spectrum_acl: Split TCAM handling 3 ways
To allow easy and clean Spectrum-2 implementation for things that differ from Spectrum, split the existing ACL TCAM code 3 ways: 1) common code that calls Spectrum/Spectrum-2 specific ops 2) Spectrum ops implementations 3) common C-TCAM code that is going to be shared between Spectrum and Spectrum-2 implementations 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.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
index b40569c67ddf..1bf963cd1f12 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_acl.c
@@ -48,6 +48,7 @@
#include "spectrum.h"
#include "core_acl_flex_keys.h"
#include "core_acl_flex_actions.h"
+#include "spectrum_acl_tcam.h"
#include "spectrum_acl_flex_keys.h"
struct mlxsw_sp_acl {
@@ -634,7 +635,8 @@ mlxsw_sp_acl_rule_create(struct mlxsw_sp *mlxsw_sp,
int err;
mlxsw_sp_acl_ruleset_ref_inc(ruleset);
- rule = kzalloc(sizeof(*rule) + ops->rule_priv_size, GFP_KERNEL);
+ rule = kzalloc(sizeof(*rule) + ops->rule_priv_size(mlxsw_sp),
+ GFP_KERNEL);
if (!rule) {
err = -ENOMEM;
goto err_alloc;