summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2018-02-27 10:36:45 +0100
committerYuanhan Liu <yliu@fridaylinux.org>2018-02-27 17:47:12 +0800
commit16f117cab6db7e1333415a2f5c8dc9bdb122c844 (patch)
tree1015eb7dfe8a2a80af82d7860ce011a41c9c8fc5
parent9dd8bea3e4baf6e078c6aa91b58ea02be60b872a (diff)
downloaddpdk-stable-16f117cab6db7e1333415a2f5c8dc9bdb122c844.zip
dpdk-stable-16f117cab6db7e1333415a2f5c8dc9bdb122c844.tar.gz
dpdk-stable-16f117cab6db7e1333415a2f5c8dc9bdb122c844.tar.xz
net/mlx5: fix flow priority on queue action
[ backported from upstream commit c3299d76867f23e595d8e1b3e6b9ad4d6aa87155 ] 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 <nelio.laranjeiro@6wind.com> Acked-by: Yongseok Koh <yskoh@mellanox.com>
-rw-r--r--drivers/net/mlx5/mlx5_flow.c22
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index bc2bba2..092644f 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -865,7 +865,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)
@@ -1097,15 +1097,12 @@ priv_flow_convert(struct priv *priv,
* Second step.
* Allocate the memory space to store verbs specifications.
*/
- if (parser->drop || parser->queues_n == 1) {
- unsigned int priority =
- attr->priority +
- hash_rxq_init[HASH_RXQ_ETH].flow_priority;
- unsigned int offset = parser->queue[HASH_RXQ_ETH].offset;
-
+ if (parser->drop) {
parser->queue[HASH_RXQ_ETH].ibv_attr =
- priv_flow_convert_allocate(priv, priority,
- offset, error);
+ priv_flow_convert_allocate
+ (priv, attr->priority,
+ parser->queue[HASH_RXQ_ETH].offset,
+ error);
if (!parser->queue[HASH_RXQ_ETH].ibv_attr)
return ENOMEM;
parser->queue[HASH_RXQ_ETH].offset =
@@ -1159,14 +1156,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;