summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
diff options
context:
space:
mode:
authorPaul Blakey2018-09-02 08:23:24 +0200
committerSaeed Mahameed2018-10-17 23:18:50 +0200
commit42f7ad6760077e125eb7849c5499b7b77a54c2f3 (patch)
tree5cb5c377a2a11ae80a2b6a66b0fabd1d99efdd1a /drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
parentnet/mlx5: Add a no-append flow insertion mode (diff)
downloadkernel-qcow2-linux-42f7ad6760077e125eb7849c5499b7b77a54c2f3.tar.gz
kernel-qcow2-linux-42f7ad6760077e125eb7849c5499b7b77a54c2f3.tar.xz
kernel-qcow2-linux-42f7ad6760077e125eb7849c5499b7b77a54c2f3.zip
net/mlx5e: For TC offloads, always add new flow instead of appending the actions
When replacing a tc flower rule, flower first requests to add the new rule (new action), then deletes the old one. But currently when asked to add a new tc flower flow, we append the actions (and counters to it). This can result in a fte with two flow counters or conflicting actions (drop and encap action) which firmware complains/errs about and isn't achieving what the user aimed for. Instead, insert the flow using the new no-append flag which will add a new HW rule, the old flow and rule will be deleted later by flower Signed-off-by: Paul Blakey <paulb@mellanox.com> Reviewed-by: Or Gerlitz <ogerlitz@mellanmox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_tc.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_tc.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
index a9c68b7859b4..8b25850cbf6a 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_tc.c
@@ -686,7 +686,7 @@ mlx5e_tc_add_nic_flow(struct mlx5e_priv *priv,
.action = attr->action,
.flow_tag = attr->flow_tag,
.reformat_id = 0,
- .flags = FLOW_ACT_HAS_TAG,
+ .flags = FLOW_ACT_HAS_TAG | FLOW_ACT_NO_APPEND,
};
struct mlx5_fc *counter = NULL;
bool table_created = false;