From: Bin Huang <huangbin.mails@gmail.com>
To: keith.wiles@intel.com
Cc: dev@dpdk.org, bin.huang@hxt-semitech.com,
jie2.liu@hxt-semitech.com, bing.zhao@hxt-semitech.com,
zhiqiang.zhang@hxt-semitech.com,
Bin Huang <huangbin.mails@gmail.com>
Subject: [dpdk-dev] [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode
Date: Wed, 20 Dec 2017 08:04:15 +0000 [thread overview]
Message-ID: <1513757055-13883-1-git-send-email-huangbin.mails@gmail.com> (raw)
pktgen pre-allocated TX data in mbuf would be modified by virtio pmd driver due to virtio pkt head extension.
it will caused mbuf data_len keep growing, packets size on wire growing, then tx pps performance drop.
set corresponding mbuf data_len in pktmbuf reset to fix it.
Signed-off-by: Bin Huang <huangbin.mails@gmail.com>
Signed-off-by: Bin Huang <bin.huang@hxt-semitech.com>
Signed-off-by: Bin Huang <huangbin.mails@gmail.com>
---
lib/common/mbuf.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/lib/common/mbuf.h b/lib/common/mbuf.h
index 759f95d..93065f6 100644
--- a/lib/common/mbuf.h
+++ b/lib/common/mbuf.h
@@ -18,6 +18,7 @@ pktmbuf_reset(struct rte_mbuf *m)
m->nb_segs = 1;
m->port = 0xff;
+ m->data_len = m->pkt_len;
m->data_off = (RTE_PKTMBUF_HEADROOM <= m->buf_len) ?
RTE_PKTMBUF_HEADROOM : m->buf_len;
}
--
2.7.4
next reply other threads:[~2017-12-20 8:04 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-20 8:04 Bin Huang [this message]
2017-12-20 14:04 ` Wiles, Keith
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=1513757055-13883-1-git-send-email-huangbin.mails@gmail.com \
--to=huangbin.mails@gmail.com \
--cc=bin.huang@hxt-semitech.com \
--cc=bing.zhao@hxt-semitech.com \
--cc=dev@dpdk.org \
--cc=jie2.liu@hxt-semitech.com \
--cc=keith.wiles@intel.com \
--cc=zhiqiang.zhang@hxt-semitech.com \
/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).