DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode
@ 2017-12-20  8:04 Bin Huang
  2017-12-20 14:04 ` Wiles, Keith
  0 siblings, 1 reply; 2+ messages in thread
From: Bin Huang @ 2017-12-20  8:04 UTC (permalink / raw)
  To: keith.wiles
  Cc: dev, bin.huang, jie2.liu, bing.zhao, zhiqiang.zhang, Bin Huang

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

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

* Re: [dpdk-dev] [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode
  2017-12-20  8:04 [dpdk-dev] [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode Bin Huang
@ 2017-12-20 14:04 ` Wiles, Keith
  0 siblings, 0 replies; 2+ messages in thread
From: Wiles, Keith @ 2017-12-20 14:04 UTC (permalink / raw)
  To: Bin Huang; +Cc: dev, bin.huang, jie2.liu, bing.zhao, zhiqiang.zhang



> On Dec 20, 2017, at 2:04 AM, Bin Huang <huangbin.mails@gmail.com> wrote:
> 
> 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

Thank you for the patch, this maybe the problem a few others have seen.
> 

Regards,
Keith

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

end of thread, other threads:[~2017-12-20 14:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-20  8:04 [dpdk-dev] [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode Bin Huang
2017-12-20 14:04 ` Wiles, Keith

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