From d5b854f2b129e813b9a81f8556da46d0851a87eb Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Tue, 24 Oct 2017 17:18:16 +0200 Subject: [PATCH] net/mlx5: fix mark action with drop action Marking a packet which will not be received by the NIC is useless, even if this action remains possible, it blocks the creation of the flow counter which embed a mark action to a drop queue to be created. Fixes: 31ba9997f11a ("net/mlx5: fully convert a flow to verbs in validate") Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 96a753e8d2..13b78ce9bb 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -786,6 +786,8 @@ priv_flow_convert_actions(struct priv *priv, goto exit_action_not_supported; } } + if (parser->drop && parser->mark) + parser->mark = 0; if (!parser->queues_n && !parser->drop) { rte_flow_error_set(error, ENOTSUP, RTE_FLOW_ERROR_TYPE_HANDLE, NULL, "no valid action"); -- 2.20.1