git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c98081
)
app/testpmd: fix crash of txonly with multiple segments
author
Yongseok Koh
<yskoh@mellanox.com>
Wed, 27 Dec 2017 03:51:38 +0000
(19:51 -0800)
committer
Thomas Monjalon
<thomas@monjalon.net>
Tue, 9 Jan 2018 23:28:24 +0000
(
00:28
+0100)
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>
app/test-pmd/txonly.c
patch
|
blob
|
history
diff --git
a/app/test-pmd/txonly.c
b/app/test-pmd/txonly.c
index
9bd3ce7
..
da758f8
100644
(file)
--- a/
app/test-pmd/txonly.c
+++ b/
app/test-pmd/txonly.c
@@
-75,6
+75,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);
}