From: Yongseok Koh <yskoh@mellanox.com>
To: jingjing.wu@intel.com
Cc: dev@dpdk.org, Yongseok Koh <yskoh@mellanox.com>, stable@dpdk.org
Subject: [dpdk-stable] [PATCH] app/testpmd: fix crash of txonly with multiple segments
Date: Tue, 26 Dec 2017 19:51:38 -0800 [thread overview]
Message-ID: <20171227035138.28299-1-yskoh@mellanox.com> (raw)
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
next reply other threads:[~2017-12-27 3:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-27 3:51 Yongseok Koh [this message]
2018-01-05 1:34 ` [dpdk-stable] [dpdk-dev] " Lu, Wenzhuo
2018-01-09 23:28 ` Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171227035138.28299-1-yskoh@mellanox.com \
--to=yskoh@mellanox.com \
--cc=dev@dpdk.org \
--cc=jingjing.wu@intel.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).