From 2262eed7523b305e59e8172a141b75e385b43cf0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?N=C3=A9lio=20Laranjeiro?= Date: Wed, 25 Oct 2017 10:25:22 +0200 Subject: [PATCH] net/mlx5: fix adjust priority for drop queue Drop queue should also adjust their priority according the most specific layer in the pattern they are matching to avoid dropping all the traffic. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- drivers/net/mlx5/mlx5_flow.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 26cf593af1..f392f1f657 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1174,9 +1174,17 @@ priv_flow_convert(struct priv *priv, * Last step. Complete missing specification to reach the RSS * configuration. */ - if (parser->queues_n > 1) { + if (parser->drop) { + /* + * Drop queue priority needs to be adjusted to + * their most specific layer priority. + */ + parser->drop_q.ibv_attr->priority = + attr->priority + + hash_rxq_init[parser->layer].flow_priority; + } else if (parser->queues_n > 1) { priv_flow_convert_finalise(priv, parser); - } else if (!parser->drop) { + } else { /* * Action queue have their priority overridden with * Ethernet priority, this priority needs to be adjusted to -- 2.20.1