patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH] app/testpmd: fix crash of txonly with multiple segments
@ 2017-12-27  3:51 Yongseok Koh
  2018-01-05  1:34 ` [dpdk-stable] [dpdk-dev] " 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

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-stable] [PATCH] app/testpmd: fix crash of txonly with multiple segments Yongseok Koh
2018-01-05  1:34 ` [dpdk-stable] [dpdk-dev] " 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).