diff options
author | Mark Bloch <markb@mellanox.com> | 2020-01-17 18:30:32 +0000 |
---|---|---|
committer | Saeed Mahameed <saeedm@mellanox.com> | 2020-03-13 16:26:17 -0700 |
commit | 5c2aa8ae3a2ccb383647e3ade369b32e0710ef0b (patch) | |
tree | d6050025dedf029d6341bfb52337e66eb3a7639f /drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | |
parent | 4110fc59eafb4fcb462ea847f00ff8c83774672e (diff) | |
download | linux-5c2aa8ae3a2ccb383647e3ade369b32e0710ef0b.tar.bz2 |
net/mlx5: Accept flow rules without match
Allow passing NULL spec when creating a flow rule. Such rules will act
as "catch all" flow rules.
Signed-off-by: Mark Bloch <markb@mellanox.com>
Reviewed-by: Maor Gottlieb <maorg@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c index aedbb026ed99..8ff52e237bcb 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c @@ -1881,7 +1881,6 @@ static int esw_vport_add_ingress_acl_modify_metadata(struct mlx5_eswitch *esw, struct mlx5_vport *vport) { u8 action[MLX5_UN_SZ_BYTES(set_action_in_add_action_in_auto)] = {}; - static const struct mlx5_flow_spec spec = {}; struct mlx5_flow_act flow_act = {}; int err = 0; u32 key; @@ -1913,7 +1912,7 @@ static int esw_vport_add_ingress_acl_modify_metadata(struct mlx5_eswitch *esw, flow_act.modify_hdr = vport->ingress.offloads.modify_metadata; vport->ingress.offloads.modify_metadata_rule = mlx5_add_flow_rules(vport->ingress.acl, - &spec, &flow_act, NULL, 0); + NULL, &flow_act, NULL, 0); if (IS_ERR(vport->ingress.offloads.modify_metadata_rule)) { err = PTR_ERR(vport->ingress.offloads.modify_metadata_rule); esw_warn(esw->dev, |