DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx
@ 2019-05-08 10:27 Andrew Rybchenko
  2019-05-08 10:27 ` Andrew Rybchenko
  2019-05-08 18:32 ` Ferruh Yigit
  0 siblings, 2 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2019-05-08 10:27 UTC (permalink / raw)
  To: Ferruh Yigit, Bernard Iremonger, Jingjing Wu, Wenzhuo Lu
  Cc: dev, Pavan Nikhilesh, Thomas Monjalon

The last mbuf allocated in bulk is never used and never freed.

Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/test-pmd/txonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index fa8e0c0..fdfca14 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -167,7 +167,7 @@
 		nb_segs = tx_pkt_nb_segs;
 
 	if (nb_segs > 1) {
-		if (rte_mempool_get_bulk(mbp, (void **)pkt_segs, nb_segs))
+		if (rte_mempool_get_bulk(mbp, (void **)pkt_segs, nb_segs - 1))
 			return false;
 	}
 
-- 
1.8.3.1

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

* [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx
  2019-05-08 10:27 [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx Andrew Rybchenko
@ 2019-05-08 10:27 ` Andrew Rybchenko
  2019-05-08 18:32 ` Ferruh Yigit
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Rybchenko @ 2019-05-08 10:27 UTC (permalink / raw)
  To: Ferruh Yigit, Bernard Iremonger, Jingjing Wu, Wenzhuo Lu
  Cc: dev, Pavan Nikhilesh, Thomas Monjalon

The last mbuf allocated in bulk is never used and never freed.

Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 app/test-pmd/txonly.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index fa8e0c0..fdfca14 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -167,7 +167,7 @@
 		nb_segs = tx_pkt_nb_segs;
 
 	if (nb_segs > 1) {
-		if (rte_mempool_get_bulk(mbp, (void **)pkt_segs, nb_segs))
+		if (rte_mempool_get_bulk(mbp, (void **)pkt_segs, nb_segs - 1))
 			return false;
 	}
 
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx
  2019-05-08 10:27 [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx Andrew Rybchenko
  2019-05-08 10:27 ` Andrew Rybchenko
@ 2019-05-08 18:32 ` Ferruh Yigit
  2019-05-08 18:32   ` Ferruh Yigit
  1 sibling, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2019-05-08 18:32 UTC (permalink / raw)
  To: Andrew Rybchenko, Bernard Iremonger, Jingjing Wu, Wenzhuo Lu
  Cc: dev, Pavan Nikhilesh, Thomas Monjalon

On 5/8/2019 11:27 AM, Andrew Rybchenko wrote:
> The last mbuf allocated in bulk is never used and never freed.
> 
> Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
> Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Good catch!

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx
  2019-05-08 18:32 ` Ferruh Yigit
@ 2019-05-08 18:32   ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2019-05-08 18:32 UTC (permalink / raw)
  To: Andrew Rybchenko, Bernard Iremonger, Jingjing Wu, Wenzhuo Lu
  Cc: dev, Pavan Nikhilesh, Thomas Monjalon

On 5/8/2019 11:27 AM, Andrew Rybchenko wrote:
> The last mbuf allocated in bulk is never used and never freed.
> 
> Fixes: 01b645dcff7f ("app/testpmd: move txonly prepare in separate function")
> Fixes: 561ddcf8d099 ("app/testpmd: allocate txonly segments per bulk")
> 
> Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>

Good catch!

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied to dpdk-next-net/master, thanks.

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

end of thread, other threads:[~2019-05-08 18:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-08 10:27 [dpdk-dev] [PATCH] app/testpmd: fix mbuf leak in the case of multi-segment Tx Andrew Rybchenko
2019-05-08 10:27 ` Andrew Rybchenko
2019-05-08 18:32 ` Ferruh Yigit
2019-05-08 18:32   ` Ferruh Yigit

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).