[dpdk-stable] patch 'net/ixgbe: fix queue resource leak' has been queued to stable release 20.11.4

Xueming Li xuemingl at nvidia.com
Wed Nov 10 07:28:43 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/5787cc1187ee2bc760a6c240005b234a8d49c344

Thanks.

Xueming Li <xuemingl at nvidia.com>

---
>From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
From: Qiming Chen <chenqiming_huawei at 163.com>
Date: Tue, 31 Aug 2021 21:40:17 +0800
Subject: [PATCH] net/ixgbe: fix queue resource leak
Cc: Xueming Li <xuemingl at nvidia.com>

[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]

In the ixgbevf_dev_start function, after initializing the rxtx queue, if
an exception occurs in the subsequent function, the rxtx queue needs to
be released. The patch solves the problem of queue resource leakage.

Fixes: 0eb609239efd ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Qiming Chen <chenqiming_huawei at 163.com>
Acked-by: Haiyue Wang <haiyue.wang at intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index 1af04357cc..f15cc7d4ef 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 		 * now only one vector is used for Rx queue
 		 */
 		intr_vector = 1;
-		if (rte_intr_efd_enable(intr_handle, intr_vector))
+		if (rte_intr_efd_enable(intr_handle, intr_vector)) {
+			ixgbe_dev_clear_queues(dev);
 			return -1;
+		}
 	}
 
 	if (rte_intr_dp_is_en(intr_handle) && !intr_handle->intr_vec) {
@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
 		if (intr_handle->intr_vec == NULL) {
 			PMD_INIT_LOG(ERR, "Failed to allocate %d rx_queues"
 				     " intr_vec", dev->data->nb_rx_queues);
+			ixgbe_dev_clear_queues(dev);
 			return -ENOMEM;
 		}
 	}
-- 
2.33.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2021-11-10 14:17:03.857441182 +0800
+++ 0039-net-ixgbe-fix-queue-resource-leak.patch	2021-11-10 14:17:01.790746745 +0800
@@ -1 +1 @@
-From 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 Mon Sep 17 00:00:00 2001
+From 5787cc1187ee2bc760a6c240005b234a8d49c344 Mon Sep 17 00:00:00 2001
@@ -4,0 +5,3 @@
+Cc: Xueming Li <xuemingl at nvidia.com>
+
+[ upstream commit 3a732dce93af3355854dbd0fbfbe26d8c8ec8982 ]
@@ -11 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +22 @@
-index 7b198d95c2..3371a7df78 100644
+index 1af04357cc..f15cc7d4ef 100644
@@ -23 +25 @@
-@@ -5362,8 +5362,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5360,8 +5360,10 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
@@ -35 +37 @@
-@@ -5373,6 +5375,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)
+@@ -5371,6 +5373,7 @@ ixgbevf_dev_start(struct rte_eth_dev *dev)


More information about the stable mailing list