[dpdk-stable] patch 'net/mlx5: fix flow priorities probing error path' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed Apr 10 18:44:09 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.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/16/19. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Kevin Traynor

---
>From dc25766efa7158d4e0611821f5a4ae9dc7646d18 Mon Sep 17 00:00:00 2001
From: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
Date: Thu, 21 Feb 2019 09:02:16 +0000
Subject: [PATCH] net/mlx5: fix flow priorities probing error path

[ upstream commit 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c ]

The mlx5 PMD probes the Verbs flow priorities supported with
ibv_create_flow() function. If rdma-core or kernel fails for
some reason, the returned error causes the drop queue is not
destroyed, and pd is locked by not freed resource.

Also the mlx5_flow_discover_priorities() returned negative value
as error, and this code was reported "as is", without sign
changing (eventually causing assert(err > 0)).

Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow")

Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
Acked-by: Shahaf Shuler <shahafs at mellanox.com>
---
 drivers/net/mlx5/mlx5.c      | 4 +++-
 drivers/net/mlx5/mlx5_flow.c | 4 ++--
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
index 40b32492b..80a27da89 100644
--- a/drivers/net/mlx5/mlx5.c
+++ b/drivers/net/mlx5/mlx5.c
@@ -1234,6 +1234,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
 	/* Supported Verbs flow priority number detection. */
 	err = mlx5_flow_discover_priorities(eth_dev);
-	if (err < 0)
+	if (err < 0) {
+		err = -err;
 		goto error;
+	}
 	priv->config.flow_prio = err;
 	/*
diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
index 39ef2524c..5bf7d7ba4 100644
--- a/drivers/net/mlx5/mlx5_flow.c
+++ b/drivers/net/mlx5/mlx5_flow.c
@@ -351,4 +351,5 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev)
 		priority = vprio[i];
 	}
+	mlx5_hrxq_drop_release(dev);
 	switch (priority) {
 	case 8:
@@ -362,8 +363,7 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev)
 		DRV_LOG(ERR,
 			"port %u verbs maximum priority: %d expected 8/16",
-			dev->data->port_id, vprio[i]);
+			dev->data->port_id, priority);
 		return -rte_errno;
 	}
-	mlx5_hrxq_drop_release(dev);
 	DRV_LOG(INFO, "port %u flow maximum priority: %d",
 		dev->data->port_id, priority);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-04-10 14:06:12.546553703 +0100
+++ 0061-net-mlx5-fix-flow-priorities-probing-error-path.patch	2019-04-10 14:06:08.028290489 +0100
@@ -1,8 +1,10 @@
-From 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c Mon Sep 17 00:00:00 2001
+From dc25766efa7158d4e0611821f5a4ae9dc7646d18 Mon Sep 17 00:00:00 2001
 From: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
 Date: Thu, 21 Feb 2019 09:02:16 +0000
 Subject: [PATCH] net/mlx5: fix flow priorities probing error path
 
+[ upstream commit 4fb27c1dfe054972bec62fdeb6fc91680ccb3f3c ]
+
 The mlx5 PMD probes the Verbs flow priorities supported with
 ibv_create_flow() function. If rdma-core or kernel fails for
 some reason, the returned error causes the drop queue is not
@@ -13,7 +15,6 @@
 changing (eventually causing assert(err > 0)).
 
 Fixes: 2815702baea7 ("net/mlx5: replace verbs priorities by flow")
-Cc: stable at dpdk.org
 
 Signed-off-by: Viacheslav Ovsiienko <viacheslavo at mellanox.com>
 Acked-by: Shahaf Shuler <shahafs at mellanox.com>
@@ -23,10 +24,10 @@
  2 files changed, 5 insertions(+), 3 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c
-index 9706e351a..740c5e273 100644
+index 40b32492b..80a27da89 100644
 --- a/drivers/net/mlx5/mlx5.c
 +++ b/drivers/net/mlx5/mlx5.c
-@@ -1244,6 +1244,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
+@@ -1234,6 +1234,8 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev,
  	/* Supported Verbs flow priority number detection. */
  	err = mlx5_flow_discover_priorities(eth_dev);
 -	if (err < 0)
@@ -37,7 +38,7 @@
  	priv->config.flow_prio = err;
  	/*
 diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c
-index 9314e3a86..dea38e260 100644
+index 39ef2524c..5bf7d7ba4 100644
 --- a/drivers/net/mlx5/mlx5_flow.c
 +++ b/drivers/net/mlx5/mlx5_flow.c
 @@ -351,4 +351,5 @@ mlx5_flow_discover_priorities(struct rte_eth_dev *dev)


More information about the stable mailing list