[dpdk-dev,v3,5/7] net/mlx5: fix mark action with drop action

Message ID d987c51f65789603e04f6d689c1f24ad81429269.1508857992.git.nelio.laranjeiro@6wind.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Nélio Laranjeiro Oct. 24, 2017, 3:18 p.m. UTC
  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 <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
---
 drivers/net/mlx5/mlx5_flow.c | 2 ++
 1 file changed, 2 insertions(+)
  

Patch

diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 96a753e8d..13b78ce9b 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");