diff options
author | Nir Dotan <nird@mellanox.com> | 2018-12-10 07:11:43 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-12-11 23:01:33 -0800 |
commit | c20580c21f80d676f6e128eea4dc482c4e51b265 (patch) | |
tree | ebe56a9acced2500d9ece97fffd2f723e85fc4c7 /drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | |
parent | 2507a64c17e646800025dfeb508d5c406bf24ec4 (diff) | |
download | linux-stable-c20580c21f80d676f6e128eea4dc482c4e51b265.tar.gz linux-stable-c20580c21f80d676f6e128eea4dc482c4e51b265.tar.bz2 linux-stable-c20580c21f80d676f6e128eea4dc482c4e51b265.zip |
mlxsw: spectrum_acl: Support rule creation without action creation
Up until now, when ACL rule was created its action was created with it.
It suits well for tc flower where ACL rule always needs an action, however
it does not suit multicast router, where the action is created prior to
setting a route, which in Spectrum-2 is actually an ACL rule.
Add support for rule creation without action creation. Do it by adding
afa_block argument to mlxsw_sp_acl_rule_create, which if NULL then an
action would be created, also add an indication within struct
mlxsw_sp_acl_rule_info that tells if the action should be destroyed when
the rule is destroyed.
Signed-off-by: Nir Dotan <nird@mellanox.com>
Reviewed-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_flower.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c index 8d211972c5e9..ff072358d950 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_flower.c @@ -406,7 +406,7 @@ int mlxsw_sp_flower_replace(struct mlxsw_sp *mlxsw_sp, if (IS_ERR(ruleset)) return PTR_ERR(ruleset); - rule = mlxsw_sp_acl_rule_create(mlxsw_sp, ruleset, f->cookie, + rule = mlxsw_sp_acl_rule_create(mlxsw_sp, ruleset, f->cookie, NULL, f->common.extack); if (IS_ERR(rule)) { err = PTR_ERR(rule); |