[dpdk-stable] patch 'net/mlx5: remove needless Tx queue initialization check' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:57:30 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.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 07/26/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 efe4acdd4a6962bf704b8f7eaffb4731aaa60a05 Mon Sep 17 00:00:00 2001
From: Michael Baum <michaelba at mellanox.com>
Date: Wed, 27 May 2020 08:37:56 +0000
Subject: [PATCH] net/mlx5: remove needless Tx queue initialization check

[ upstream commit c55ec83b5822af0a1be9ad016714b8adc68b1a51 ]

The mlx5_txq_obj_new function defines a pointer named txq_data and
assign value into it. After assigning, the code writer is sure that the
variable does not point to NULL and even express it using assertion.

During the function, the function does dereferencing to the pointer
several times and at no point change its value. However, at the end of
the function at the error label when it wants to free one of the fields
of the structure that txq_data points to, it checks again whether
txq_data is invalid.
This check is unnecessary since it knows for sure that txq_data is
valid.

Remove the aforementioned needless check.

Fixes: 644906881881 ("net/mlx5: add free on completion queue")

Signed-off-by: Michael Baum <michaelba at mellanox.com>
Acked-by: Matan Azrad <matan at mellanox.com>
---
 drivers/net/mlx5/mlx5_txq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index c7751e83c..42dcd7a4b 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -786,7 +786,7 @@ error:
 		claim_zero(mlx5_glue->destroy_cq(tmpl.cq));
 	if (tmpl.qp)
 		claim_zero(mlx5_glue->destroy_qp(tmpl.qp));
-	if (txq_data && txq_data->fcqs)
+	if (txq_data->fcqs)
 		rte_free(txq_data->fcqs);
 	if (txq_obj)
 		rte_free(txq_obj);
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:49.061713647 +0100
+++ 0012-net-mlx5-remove-needless-Tx-queue-initialization-che.patch	2020-07-24 12:53:48.163004149 +0100
@@ -1,8 +1,10 @@
-From c55ec83b5822af0a1be9ad016714b8adc68b1a51 Mon Sep 17 00:00:00 2001
+From efe4acdd4a6962bf704b8f7eaffb4731aaa60a05 Mon Sep 17 00:00:00 2001
 From: Michael Baum <michaelba at mellanox.com>
 Date: Wed, 27 May 2020 08:37:56 +0000
 Subject: [PATCH] net/mlx5: remove needless Tx queue initialization check
 
+[ upstream commit c55ec83b5822af0a1be9ad016714b8adc68b1a51 ]
+
 The mlx5_txq_obj_new function defines a pointer named txq_data and
 assign value into it. After assigning, the code writer is sure that the
 variable does not point to NULL and even express it using assertion.
@@ -18,7 +20,6 @@
 Remove the aforementioned needless check.
 
 Fixes: 644906881881 ("net/mlx5: add free on completion queue")
-Cc: stable at dpdk.org
 
 Signed-off-by: Michael Baum <michaelba at mellanox.com>
 Acked-by: Matan Azrad <matan at mellanox.com>
@@ -27,10 +28,10 @@
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
-index 7cc620a90..80d99ff94 100644
+index c7751e83c..42dcd7a4b 100644
 --- a/drivers/net/mlx5/mlx5_txq.c
 +++ b/drivers/net/mlx5/mlx5_txq.c
-@@ -793,7 +793,7 @@ error:
+@@ -786,7 +786,7 @@ error:
  		claim_zero(mlx5_glue->destroy_cq(tmpl.cq));
  	if (tmpl.qp)
  		claim_zero(mlx5_glue->destroy_qp(tmpl.qp));


More information about the stable mailing list