[dpdk-stable] patch 'net/mlx5: fix running without Rx queue' has been queued to stable release 19.11.1

luca.boccassi at gmail.com luca.boccassi at gmail.com
Thu Feb 27 10:33:54 CET 2020


Hi,

FYI, your patch has been queued to stable release 19.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/29/20. 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.

Luca Boccassi

---
>From b59c15173db24a5db8787f27af12bf3d6cb8bd39 Mon Sep 17 00:00:00 2001
From: Shiri Kuzin <shirik at mellanox.com>
Date: Thu, 20 Feb 2020 14:42:26 +0000
Subject: [PATCH] net/mlx5: fix running without Rx queue

[ upstream commit 606d690548983ef69560c20b21c1431d4ebc0ca2 ]

When running mlx5_dev_start in mlx5_ethdev the function calls
mlx5_dev_configure_rss_reta in order to configure the rxq's.

Before mlx5_dev_configure_rss_reta there isn't a check whether
there are rxq's and if rxq's are 0 the function fails.
For example, this command:
/build/app/test-pmd/testpmd -n 4  -w 0000:08:00.0,rx_vec_en=0
-- --burst=64 --mbcache=512 -i  --nb-cores=27  --txd=2048 --rxd=2048
--vxlan-gpe-port=6081 --mp-alloc=xbuf --rxq 0 --forward-mode=txonly
would fail.

In order to fix this issue, we should call mlx5_dev_configure_rss_reta
only if we have rxq's.

Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")

Reported-by: Sylvain Rodon <srn at nexatech.fr>
Signed-off-by: Shiri Kuzin <shirik at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_trigger.c | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 7e12cd5e8b..e3ea2862a5 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -272,11 +272,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
 	int ret;
 
 	DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
-	ret = mlx5_dev_configure_rss_reta(dev);
-	if (ret) {
-		DRV_LOG(ERR, "port %u reta config failed: %s",
-			dev->data->port_id, strerror(rte_errno));
-		return -rte_errno;
+	if (dev->data->nb_rx_queues > 0) {
+		ret = mlx5_dev_configure_rss_reta(dev);
+		if (ret) {
+			DRV_LOG(ERR, "port %u reta config failed: %s",
+				dev->data->port_id, strerror(rte_errno));
+			return -rte_errno;
+		}
 	}
 	ret = mlx5_txq_start(dev);
 	if (ret) {
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-02-27 09:31:56.914960723 +0000
+++ 0034-net-mlx5-fix-running-without-Rx-queue.patch	2020-02-27 09:31:55.819946489 +0000
@@ -1,8 +1,10 @@
-From 606d690548983ef69560c20b21c1431d4ebc0ca2 Mon Sep 17 00:00:00 2001
+From b59c15173db24a5db8787f27af12bf3d6cb8bd39 Mon Sep 17 00:00:00 2001
 From: Shiri Kuzin <shirik at mellanox.com>
 Date: Thu, 20 Feb 2020 14:42:26 +0000
 Subject: [PATCH] net/mlx5: fix running without Rx queue
 
+[ upstream commit 606d690548983ef69560c20b21c1431d4ebc0ca2 ]
+
 When running mlx5_dev_start in mlx5_ethdev the function calls
 mlx5_dev_configure_rss_reta in order to configure the rxq's.
 
@@ -18,7 +20,6 @@
 only if we have rxq's.
 
 Fixes: 63bd16292c3a ("net/mlx5: support RSS on hairpin")
-Cc: stable at dpdk.org
 
 Reported-by: Sylvain Rodon <srn at nexatech.fr>
 Signed-off-by: Shiri Kuzin <shirik at mellanox.com>
@@ -28,13 +29,13 @@
  1 file changed, 7 insertions(+), 5 deletions(-)
 
 diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
-index be47df529f..571b7a003c 100644
+index 7e12cd5e8b..e3ea2862a5 100644
 --- a/drivers/net/mlx5/mlx5_trigger.c
 +++ b/drivers/net/mlx5/mlx5_trigger.c
-@@ -280,11 +280,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
- 		rte_net_mlx5_dynf_inline_mask = 1UL << fine_inline;
- 	else
- 		rte_net_mlx5_dynf_inline_mask = 0;
+@@ -272,11 +272,13 @@ mlx5_dev_start(struct rte_eth_dev *dev)
+ 	int ret;
+ 
+ 	DRV_LOG(DEBUG, "port %u starting device", dev->data->port_id);
 -	ret = mlx5_dev_configure_rss_reta(dev);
 -	if (ret) {
 -		DRV_LOG(ERR, "port %u reta config failed: %s",


More information about the stable mailing list