From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Yongseok Koh <yskoh@mellanox.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: [dpdk-dev] [PATCH 2/4] net/mlx5: fix flow single queue
Date: Tue, 13 Mar 2018 15:17:37 +0100 [thread overview]
Message-ID: <07145c9505263ba30de44a5c5186431935b98884.1520950386.git.nelio.laranjeiro@6wind.com> (raw)
In-Reply-To: <cover.1520950386.git.nelio.laranjeiro@6wind.com>
In-Reply-To: <cover.1520950386.git.nelio.laranjeiro@6wind.com>
The flow is created with any steering being applied in the NIC when the
device is handling a single Rx queue.
Fixes: cede123a158f ("net/mlx5: fix flow creation with a single target queue")
Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index e1ffb38a5..e7040daad 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -937,11 +937,12 @@ mlx5_flow_convert_finalise(struct mlx5_flow_parse *parser)
/* Remove any other flow not matching the pattern. */
if (parser->queues_n == 1) {
for (i = 0; i != hash_rxq_init_n; ++i) {
- if (i == parser->layer || !parser->queue[i].ibv_attr)
+ if (i == HASH_RXQ_ETH)
continue;
rte_free(parser->queue[i].ibv_attr);
parser->queue[i].ibv_attr = NULL;
}
+ return;
}
if (parser->layer == HASH_RXQ_ETH) {
goto fill;
@@ -1807,6 +1808,7 @@ mlx5_flow_create_action_queue(struct rte_eth_dev *dev,
struct priv *priv = dev->data->dev_private;
int ret;
unsigned int i;
+ unsigned int flows_n = 0;
assert(priv->pd);
assert(priv->ctx);
@@ -1830,12 +1832,18 @@ mlx5_flow_create_action_queue(struct rte_eth_dev *dev,
NULL, "flow rule creation failure");
goto error;
}
+ ++flows_n;
DRV_LOG(DEBUG, "port %u %p type %d QP %p ibv_flow %p",
dev->data->port_id,
(void *)flow, i,
(void *)flow->frxq[i].hrxq,
(void *)flow->frxq[i].ibv_flow);
}
+ if (!flows_n) {
+ rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_HANDLE,
+ NULL, "internal error in flow creation");
+ goto error;
+ }
for (i = 0; i != parser->queues_n; ++i) {
struct mlx5_rxq_data *q =
(*priv->rxqs)[parser->queues[i]];
--
2.11.0
next prev parent reply other threads:[~2018-03-13 14:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-15 9:23 [dpdk-dev] [PATCH] net/mlx5: change tunnel flow priority Nelio Laranjeiro
2018-02-16 11:17 ` Adrien Mazarguil
2018-03-13 14:17 ` [dpdk-dev] [PATCH 0/4] net/mlx5: multiple fix and improvements in flows Nelio Laranjeiro
2018-03-21 14:53 ` Shahaf Shuler
2018-03-13 14:17 ` [dpdk-dev] [PATCH 1/4] net/mlx5: change tunnel flow priority Nelio Laranjeiro
2018-03-13 14:17 ` Nelio Laranjeiro [this message]
2018-03-21 18:45 ` [dpdk-dev] [dpdk-stable] [PATCH 2/4] net/mlx5: fix flow single queue Ferruh Yigit
2018-03-28 9:04 ` Ferruh Yigit
2018-03-28 11:13 ` Shahaf Shuler
2018-03-28 11:34 ` Nélio Laranjeiro
2018-03-28 13:16 ` Ferruh Yigit
2018-03-28 15:09 ` Nélio Laranjeiro
2018-03-28 16:38 ` Ferruh Yigit
2018-03-13 14:17 ` [dpdk-dev] [PATCH 3/4] net/mlx5: improve flow error explanation Nelio Laranjeiro
2018-03-13 14:17 ` [dpdk-dev] [PATCH 4/4] net/mlx5: refuse empty VLAN flow specification Nelio Laranjeiro
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=07145c9505263ba30de44a5c5186431935b98884.1520950386.git.nelio.laranjeiro@6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.org \
--cc=yskoh@mellanox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).