From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 4795058D4 for ; Mon, 14 Dec 2015 02:24:25 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 13 Dec 2015 17:24:25 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,424,1444719600"; d="scan'208";a="872879232" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 13 Dec 2015 17:24:25 -0800 Received: from fmsmsx156.amr.corp.intel.com (10.18.116.74) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 13 Dec 2015 17:24:24 -0800 Received: from shsmsx104.ccr.corp.intel.com (10.239.4.70) by fmsmsx156.amr.corp.intel.com (10.18.116.74) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 13 Dec 2015 17:24:24 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.28]) by SHSMSX104.ccr.corp.intel.com ([169.254.5.151]) with mapi id 14.03.0248.002; Mon, 14 Dec 2015 09:21:46 +0800 From: "Xie, Huawei" To: "Tan, Jianfeng" , "Huawei@dpdk.org" , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer Thread-Index: AdE2DcwAumkJqIaDSy6yYAQBBGv8eQ== Date: Mon, 14 Dec 2015 01:21:45 +0000 Message-ID: References: <1449763652-86292-1-git-send-email-huawei.xie@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Dec 2015 01:24:26 -0000 On 12/12/2015 3:39 PM, Tan, Jianfeng wrote:=0A= >=0A= >> -----Original Message-----=0A= >> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei@dpdk.org=0A= >> Sent: Friday, December 11, 2015 12:08 AM=0A= >> To: dev@dpdk.org=0A= >> Subject: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to = the=0A= >> same buffer=0A= >>=0A= >> The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause= =0A= >> issue because in the simple TX mode we don't use the header. This patch= =0A= >> makes the header desc point to different buffer.=0A= >>=0A= >> Signed-off-by: Huawei Xie =0A= >> ---=0A= >> drivers/net/virtio/virtio_rxtx.c | 2 +-=0A= >> 1 file changed, 1 insertion(+), 1 deletion(-)=0A= >>=0A= >> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virti= o_rxtx.c=0A= >> index 74b39ef..6cfd315 100644=0A= >> --- a/drivers/net/virtio/virtio_rxtx.c=0A= >> +++ b/drivers/net/virtio/virtio_rxtx.c=0A= >> @@ -352,7 +352,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int=0A= >> queue_type)=0A= >> vq->vq_ring.desc[i + mid_idx].next =3D i;=0A= >> vq->vq_ring.desc[i + mid_idx].addr =3D=0A= >> vq->virtio_net_hdr_mem +=0A= >> - mid_idx * vq->hw-=0A= >>> vtnet_hdr_size;=0A= >> + i * vq->hw->vtnet_hdr_size;=0A= >> vq->vq_ring.desc[i + mid_idx].len =3D=0A= >> vq->hw->vtnet_hdr_size;=0A= >> vq->vq_ring.desc[i + mid_idx].flags =3D=0A= >> --=0A= >> 1.8.1.4=0A= > So in the case when header is not used, shall the way of pointing to all = header bufs to one buf=0A= > help improve the performance? At least, it saves some of cache lines.=0A= If we don't touch the virtio_net buffer, it doesn't help performance=0A= pointing to same buffer.=0A= >=0A= > Thanks,=0A= > Jianfeng=0A= >=0A= =0A=