patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/ixgbe: fix queue resource leak
@ 2021-08-31 13:40 Qiming Chen
  2021-09-06  1:34 ` Wang, Haiyue
  0 siblings, 1 reply; 3+ messages in thread
From: Qiming Chen @ 2021-08-31 13:40 UTC (permalink / raw)
  To: dev; +Cc: haiyue.wang, Qiming Chen, stable

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")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.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 3fd3249150..7d3a821300 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -5367,8 +5367,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) {
@@ -5378,6 +5380,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.30.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/ixgbe: fix queue resource leak
  2021-08-31 13:40 [dpdk-stable] [PATCH] net/ixgbe: fix queue resource leak Qiming Chen
@ 2021-09-06  1:34 ` Wang, Haiyue
  2021-09-06  1:41   ` Zhang, Qi Z
  0 siblings, 1 reply; 3+ messages in thread
From: Wang, Haiyue @ 2021-09-06  1:34 UTC (permalink / raw)
  To: Qiming Chen, dev; +Cc: stable

> -----Original Message-----
> From: Qiming Chen <chenqiming_huawei@163.com>
> Sent: Tuesday, August 31, 2021 21:40
> To: dev@dpdk.org
> Cc: Wang, Haiyue <haiyue.wang@intel.com>; Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [PATCH] net/ixgbe: fix queue resource leak
> 
> 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")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> ---
>  drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

Acked-by: Haiyue Wang <haiyue.wang@intel.com>

> --
> 2.30.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-stable] [PATCH] net/ixgbe: fix queue resource leak
  2021-09-06  1:34 ` Wang, Haiyue
@ 2021-09-06  1:41   ` Zhang, Qi Z
  0 siblings, 0 replies; 3+ messages in thread
From: Zhang, Qi Z @ 2021-09-06  1:41 UTC (permalink / raw)
  To: Wang, Haiyue, Qiming Chen, dev; +Cc: stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Wang, Haiyue
> Sent: Monday, September 6, 2021 9:35 AM
> To: Qiming Chen <chenqiming_huawei@163.com>; dev@dpdk.org
> Cc: stable@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] net/ixgbe: fix queue resource leak
> 
> > -----Original Message-----
> > From: Qiming Chen <chenqiming_huawei@163.com>
> > Sent: Tuesday, August 31, 2021 21:40
> > To: dev@dpdk.org
> > Cc: Wang, Haiyue <haiyue.wang@intel.com>; Qiming Chen
> > <chenqiming_huawei@163.com>; stable@dpdk.org
> > Subject: [PATCH] net/ixgbe: fix queue resource leak
> >
> > 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")
> > Cc: stable@dpdk.org
> >
> > Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
> > ---
> >  drivers/net/ixgbe/ixgbe_ethdev.c | 5 ++++-
> >  1 file changed, 4 insertions(+), 1 deletion(-)
> >
> 
> Acked-by: Haiyue Wang <haiyue.wang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
> 
> > --
> > 2.30.1.windows.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-09-06  1:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-31 13:40 [dpdk-stable] [PATCH] net/ixgbe: fix queue resource leak Qiming Chen
2021-09-06  1:34 ` Wang, Haiyue
2021-09-06  1:41   ` Zhang, Qi Z

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).