From: "Wiles, Keith" Subject: Re: [PATCH] pktgen-dpdk: fix low performance in VM virtio pmd mode Date: Wed, 20 Dec 2017 14:04:50 +0000 Message-ID: <02AC231F-0D3A-407E-86D0-3517A90CEE9B@intel.com> References: <1513757055-13883-1-git-send-email-huangbin.mails@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Cc: "dev@dpdk.org" , "bin.huang@hxt-semitech.com" , "jie2.liu@hxt-semitech.com" , "bing.zhao@hxt-semitech.com" , "zhiqiang.zhang@hxt-semitech.com" To: Bin Huang Return-path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 63F1C1B1A5 for ; Wed, 20 Dec 2017 15:04:54 +0100 (CET) In-Reply-To: <1513757055-13883-1-git-send-email-huangbin.mails@gmail.com> Content-Language: en-US Content-ID: <582F79829340DA40898035DCB547ABA3@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" > On Dec 20, 2017, at 2:04 AM, Bin Huang wrote: >=20 > pktgen pre-allocated TX data in mbuf would be modified by virtio pmd driv= er due to virtio pkt head extension. > it will caused mbuf data_len keep growing, packets size on wire growing, = then tx pps performance drop. >=20 > set corresponding mbuf data_len in pktmbuf reset to fix it. >=20 > Signed-off-by: Bin Huang > Signed-off-by: Bin Huang > Signed-off-by: Bin Huang > --- > lib/common/mbuf.h | 1 + > 1 file changed, 1 insertion(+) >=20 > 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 =3D 1; > m->port =3D 0xff; >=20 > + m->data_len =3D m->pkt_len; > m->data_off =3D (RTE_PKTMBUF_HEADROOM <=3D m->buf_len) ? > RTE_PKTMBUF_HEADROOM : m->buf_len; > } > --=20 > 2.7.4 Thank you for the patch, this maybe the problem a few others have seen. >=20 Regards, Keith