From: NĂ©lio Laranjeiro Date: Wed, 31 Jan 2018 16:13:54 +0000 (+0100) Subject: net/mlx5: fix flow priority on queue action X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=c3299d76867f23e595d8e1b3e6b9ad4d6aa87155;p=dpdk.git net/mlx5: fix flow priority on queue action A single queue should have the same verbs priority as an RSS one. Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow") Cc: stable@dpdk.org Signed-off-by: Nelio Laranjeiro Acked-by: Yongseok Koh --- diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 8984218d6e..e38452ef34 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -823,7 +823,7 @@ priv_flow_convert_items_validate(struct priv *priv, } parser->inner = IBV_FLOW_SPEC_INNER; } - if (parser->drop || parser->queues_n == 1) { + if (parser->drop) { parser->queue[HASH_RXQ_ETH].offset += cur_item->dst_sz; } else { for (n = 0; n != hash_rxq_init_n; ++n) @@ -1055,7 +1055,7 @@ priv_flow_convert(struct priv *priv, * Second step. * Allocate the memory space to store verbs specifications. */ - if (parser->drop || parser->queues_n == 1) { + if (parser->drop) { unsigned int priority = attr->priority + hash_rxq_init[HASH_RXQ_ETH].flow_priority; @@ -1117,14 +1117,9 @@ priv_flow_convert(struct priv *priv, * Last step. Complete missing specification to reach the RSS * configuration. */ - if (parser->queues_n > 1) { + if (!parser->drop) { priv_flow_convert_finalise(priv, parser); } else { - /* - * Action queue have their priority overridden with - * Ethernet priority, this priority needs to be adjusted to - * their most specific layer priority. - */ parser->queue[HASH_RXQ_ETH].ibv_attr->priority = attr->priority + hash_rxq_init[parser->layer].flow_priority;