summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNĂ©lio Laranjeiro <nelio.laranjeiro@6wind.com>2018-02-14 09:58:31 +0100
committerYuanhan Liu <yliu@fridaylinux.org>2018-02-16 20:22:32 +0800
commit0ec3529b056a826cee94104e20dfd3d58d64ab67 (patch)
treec5253afb49ff1843924ec91ab14090f28a1cdb3b
parentff24f852f040c180253da06af8d61212d739d67e (diff)
downloaddpdk-stable-0ec3529b056a826cee94104e20dfd3d58d64ab67.zip
dpdk-stable-0ec3529b056a826cee94104e20dfd3d58d64ab67.tar.gz
dpdk-stable-0ec3529b056a826cee94104e20dfd3d58d64ab67.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.c30
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index c18c77d..82efddc 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -882,8 +882,6 @@ priv_flow_convert_items_validate(struct priv *priv,
}
if (parser->drop) {
parser->drop_q.offset += cur_item->dst_sz;
- } else if (parser->queues_n == 1) {
- parser->queue[HASH_RXQ_ETH].offset += cur_item->dst_sz;
} else {
for (n = 0; n != hash_rxq_init_n; ++n)
parser->queue[n].offset += cur_item->dst_sz;
@@ -1126,19 +1124,6 @@ priv_flow_convert(struct priv *priv,
if (!parser->drop_q.ibv_attr)
return ENOMEM;
parser->drop_q.offset = sizeof(struct ibv_flow_attr);
- } else if (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;
-
- parser->queue[HASH_RXQ_ETH].ibv_attr =
- priv_flow_convert_allocate(priv, priority,
- offset, error);
- if (!parser->queue[HASH_RXQ_ETH].ibv_attr)
- return ENOMEM;
- parser->queue[HASH_RXQ_ETH].offset =
- sizeof(struct ibv_flow_attr);
} else {
for (i = 0; i != hash_rxq_init_n; ++i) {
unsigned int priority =
@@ -1188,22 +1173,9 @@ priv_flow_convert(struct priv *priv,
* Last step. Complete missing specification to reach the RSS
* configuration.
*/
- 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) {
+ 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;