patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] net/iavf: fix mbuf leak
@ 2021-09-11  1:47 Qiming Chen
  2021-09-15  1:20 ` [dpdk-stable] [dpdk-dev] " Zhang, Qi Z
  0 siblings, 1 reply; 2+ messages in thread
From: Qiming Chen @ 2021-09-11  1:47 UTC (permalink / raw)
  To: dev; +Cc: beilei.xing, jingjing.wu, Qiming Chen, stable

A local test found that repeated port start and stop operations during
the continuous SSE vector bufflist receiving process will cause the mbuf
resource to run out. The final positioning is when the port is stopped,
the mbuf of the pkt_first_seg pointer is not released. Resources leak.
The patch scheme is to judge whether the pointer is empty when the port
is stopped, and release the corresponding mbuf if it is not empty.

Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
Cc: stable@dpdk.org

Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>
---
 drivers/net/iavf/iavf_rxtx.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c
index 55393a9400..59448eae98 100644
--- a/drivers/net/iavf/iavf_rxtx.c
+++ b/drivers/net/iavf/iavf_rxtx.c
@@ -225,6 +225,10 @@ reset_rx_queue(struct iavf_rx_queue *rxq)
 
 	rxq->rx_tail = 0;
 	rxq->nb_rx_hold = 0;
+
+	if (rxq->pkt_first_seg != NULL)
+		rte_pktmbuf_free(rxq->pkt_first_seg);
+
 	rxq->pkt_first_seg = NULL;
 	rxq->pkt_last_seg = NULL;
 	rxq->rxrearm_nb = 0;
-- 
2.30.1.windows.1


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

* Re: [dpdk-stable] [dpdk-dev] [PATCH] net/iavf: fix mbuf leak
  2021-09-11  1:47 [dpdk-stable] [PATCH] net/iavf: fix mbuf leak Qiming Chen
@ 2021-09-15  1:20 ` Zhang, Qi Z
  0 siblings, 0 replies; 2+ messages in thread
From: Zhang, Qi Z @ 2021-09-15  1:20 UTC (permalink / raw)
  To: Qiming Chen, dev; +Cc: Xing, Beilei, Wu, Jingjing, stable



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Qiming Chen
> Sent: Saturday, September 11, 2021 9:47 AM
> To: dev@dpdk.org
> Cc: Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing <jingjing.wu@intel.com>;
> Qiming Chen <chenqiming_huawei@163.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] net/iavf: fix mbuf leak
> 
> A local test found that repeated port start and stop operations during the
> continuous SSE vector bufflist receiving process will cause the mbuf resource
> to run out. The final positioning is when the port is stopped, the mbuf of the
> pkt_first_seg pointer is not released. Resources leak.
> The patch scheme is to judge whether the pointer is empty when the port is
> stopped, and release the corresponding mbuf if it is not empty.
> 
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Qiming Chen <chenqiming_huawei@163.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-11  1:47 [dpdk-stable] [PATCH] net/iavf: fix mbuf leak Qiming Chen
2021-09-15  1:20 ` [dpdk-stable] [dpdk-dev] " 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).