[dpdk-stable] patch 'net/mlx5: fix flow creation with a single target queue' has been queued to LTS release 17.11.2
Yuanhan Liu
yliu at fridaylinux.org
Sun Apr 22 17:08:57 CEST 2018
Hi,
FYI, your patch has been queued to LTS release 17.11.2
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 04/29/18. So please
shout if anyone has objections.
Thanks.
--yliu
---
>From 889f8e89691e5047d3bad7ec352e22691e26f304 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= <nelio.laranjeiro at 6wind.com>
Date: Wed, 14 Feb 2018 16:04:45 +0100
Subject: [PATCH] net/mlx5: fix flow creation with a single target queue
[ upstream commit c55a1667950f43be515c976269749a2a00c7268d ]
Adding a pattern targeting a single queues wrongly behaves as it is an RSS
request, ending by creating several Verbs flows rules to match the RSS
configuration.
Fixes: 8086cf08b2f0 ("net/mlx5: handle RSS hash configuration in RSS flow")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro at 6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil at 6wind.com>
---
drivers/net/mlx5/mlx5_flow.c | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 092644ff1..3a9407b00 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -951,6 +951,16 @@ priv_flow_convert_finalise(struct priv *priv, struct mlx5_flow_parse *parser)
unsigned int i;
(void)priv;
+ /* Remove any other flow not matching the pattern. */
+ if (parser->queues_n == 1) {
+ for (i = 0; i != hash_rxq_init_n; ++i) {
+ 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;
} else {
@@ -1777,6 +1787,7 @@ priv_flow_create_action_queue(struct priv *priv,
{
int err = 0;
unsigned int i;
+ unsigned int flows_n = 0;
assert(priv->pd);
assert(priv->ctx);
@@ -1801,11 +1812,17 @@ priv_flow_create_action_queue(struct priv *priv,
err = ENOMEM;
goto error;
}
+ ++flows_n;
DEBUG("%p type %d QP %p ibv_flow %p",
(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
More information about the stable
mailing list