DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments
@ 2017-12-27  3:51 Yongseok Koh
  2018-01-05  1:34 ` Lu, Wenzhuo
  0 siblings, 1 reply; 3+ messages in thread
From: Yongseok Koh @ 2017-12-27  3:51 UTC (permalink / raw)
  To: jingjing.wu; +Cc: dev, Yongseok Koh, stable

Running txonly mode can crash with "--txpkts=20,470". copy_len should be
properly adjusted.

Fixes: af75078fece3 ("first public release")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
---
 app/test-pmd/txonly.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/app/test-pmd/txonly.c b/app/test-pmd/txonly.c
index 309c73893..4ce4d61cc 100644
--- a/app/test-pmd/txonly.c
+++ b/app/test-pmd/txonly.c
@@ -104,6 +104,7 @@ copy_buf_to_pkt_segs(void* buf, unsigned len, struct rte_mbuf *pkt,
 		buf = ((char*) buf + copy_len);
 		seg = seg->next;
 		seg_buf = rte_pktmbuf_mtod(seg, char *);
+		copy_len = seg->data_len;
 	}
 	rte_memcpy(seg_buf, buf, (size_t) len);
 }
-- 
2.11.0

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments
  2017-12-27  3:51 [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments Yongseok Koh
@ 2018-01-05  1:34 ` Lu, Wenzhuo
  2018-01-09 23:28   ` Thomas Monjalon
  0 siblings, 1 reply; 3+ messages in thread
From: Lu, Wenzhuo @ 2018-01-05  1:34 UTC (permalink / raw)
  To: Yongseok Koh, Wu, Jingjing; +Cc: dev, stable

Hi,

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Yongseok Koh
> Sent: Wednesday, December 27, 2017 11:52 AM
> To: Wu, Jingjing <jingjing.wu@intel.com>
> Cc: dev@dpdk.org; Yongseok Koh <yskoh@mellanox.com>; stable@dpdk.org
> Subject: [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple
> segments
> 
> Running txonly mode can crash with "--txpkts=20,470". copy_len should be
> properly adjusted.
> 
> Fixes: af75078fece3 ("first public release")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

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

* Re: [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments
  2018-01-05  1:34 ` Lu, Wenzhuo
@ 2018-01-09 23:28   ` Thomas Monjalon
  0 siblings, 0 replies; 3+ messages in thread
From: Thomas Monjalon @ 2018-01-09 23:28 UTC (permalink / raw)
  To: Yongseok Koh; +Cc: dev, Lu, Wenzhuo, Wu, Jingjing, stable

> > Running txonly mode can crash with "--txpkts=20,470". copy_len should be
> > properly adjusted.
> > 
> > Fixes: af75078fece3 ("first public release")
> > Cc: stable@dpdk.org
> > 
> > Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
> Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>

Applied, thanks

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

end of thread, other threads:[~2018-01-09 23:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-27  3:51 [dpdk-dev] [PATCH] app/testpmd: fix crash of txonly with multiple segments Yongseok Koh
2018-01-05  1:34 ` Lu, Wenzhuo
2018-01-09 23:28   ` Thomas Monjalon

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