[dpdk-stable] patch 'net/mlx5: fix Rx queue memory allocation return value' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:32:01 CET 2021


Hi,

FYI, your patch has been queued to stable release 20.11.4

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

Queued patches are on a temporary branch at:
https://github.com/steevenlee/dpdk

This queued commit can be viewed at:
https://github.com/steevenlee/dpdk/commit/2d734fb867e06e6622ae632eda8d2d6c16bd0ff9

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 2d734fb867e06e6622ae632eda8d2d6c16bd0ff9 Mon Sep 17 00:00:00 2001
From: Xueming Li <xuemingl at nvidia.com>
Date: Thu, 4 Nov 2021 20:33:11 +0800
Subject: [PATCH] net/mlx5: fix Rx queue memory allocation return value
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit fdb67b84a52970ae06b54464a449b6f503f5a7ab ]

If error happened during Rx queue mbuf allocation, boolean value
returned. From description, return value should be error number.

This patch returns negative error number.

Fixes: 0f20acbf5eda ("net/mlx5: implement vectorized MPRQ burst")

Signed-off-by: Xueming Li <xuemingl at nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_rxq.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/mlx5/mlx5_rxq.c b/drivers/net/mlx5/mlx5_rxq.c
index b5268df57d..ed38c1eea0 100644
--- a/drivers/net/mlx5/mlx5_rxq.c
+++ b/drivers/net/mlx5/mlx5_rxq.c
@@ -198,7 +198,7 @@ error:
  *   Pointer to RX queue structure.
  *
  * @return
- *   0 on success, errno value on failure.
+ *   0 on success, negative errno value on failure.
  */
 static int
 rxq_alloc_elts_sprq(struct mlx5_rxq_ctrl *rxq_ctrl)
@@ -289,7 +289,7 @@ error:
  *   Pointer to RX queue structure.
  *
  * @return
- *   0 on success, errno value on failure.
+ *   0 on success, negative errno value on failure.
  */
 int
 rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
@@ -302,7 +302,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
 	 */
 	if (mlx5_rxq_mprq_enabled(&rxq_ctrl->rxq))
 		ret = rxq_alloc_elts_mprq(rxq_ctrl);
-	return (ret || rxq_alloc_elts_sprq(rxq_ctrl));
+	if (ret == 0)
+		ret = rxq_alloc_elts_sprq(rxq_ctrl);
+	return ret;
 }
 
 /**
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:12.332042781 +0800
+++ 0237-net-mlx5-fix-Rx-queue-memory-allocation-return-value.patch	2021-11-10 14:17:02.070744455 +0800
@@ -1 +1 @@
-From fdb67b84a52970ae06b54464a449b6f503f5a7ab Mon Sep 17 00:00:00 2001
+From 2d734fb867e06e6622ae632eda8d2d6c16bd0ff9 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit fdb67b84a52970ae06b54464a449b6f503f5a7ab ]
@@ -12 +14,0 @@
-Cc: stable at dpdk.org
@@ -21 +23 @@
-index 9220bb2c15..4567b43c1b 100644
+index b5268df57d..ed38c1eea0 100644
@@ -24 +26 @@
-@@ -129,7 +129,7 @@ error:
+@@ -198,7 +198,7 @@ error:
@@ -33 +35 @@
-@@ -220,7 +220,7 @@ error:
+@@ -289,7 +289,7 @@ error:
@@ -42 +44 @@
-@@ -233,7 +233,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)
+@@ -302,7 +302,9 @@ rxq_alloc_elts(struct mlx5_rxq_ctrl *rxq_ctrl)


More information about the stable mailing list