From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id E5DE258CF for ; Mon, 14 Dec 2015 02:35:12 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP; 13 Dec 2015 17:35:12 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,424,1444719600"; d="scan'208";a="860003647" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga001.fm.intel.com with ESMTP; 13 Dec 2015 17:35:12 -0800 Received: from fmsmsx114.amr.corp.intel.com (10.18.116.8) 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:35:11 -0800 Received: from shsmsx102.ccr.corp.intel.com (10.239.4.154) by FMSMSX114.amr.corp.intel.com (10.18.116.8) with Microsoft SMTP Server (TLS) id 14.3.248.2; Sun, 13 Dec 2015 17:35:11 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.28]) by shsmsx102.ccr.corp.intel.com ([169.254.2.158]) with mapi id 14.03.0248.002; Mon, 14 Dec 2015 09:35:08 +0800 From: "Tan, Jianfeng" To: "dev@dpdk.org" , "Xie, Huawei" Thread-Topic: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to the same buffer Thread-Index: AQHRNB9kJ3QtlfXbFkqAdOPBoMxZFJ7JtjKA Date: Mon, 14 Dec 2015 01:35:07 +0000 Message-ID: References: <1449763652-86292-1-git-send-email-huawei.xie@intel.com> In-Reply-To: <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:35:13 -0000 > -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Huawei@dpdk.org > Sent: Friday, December 11, 2015 12:08 AM > To: dev@dpdk.org > Subject: [dpdk-dev] [PATCH] virtio: fix virtio_net_hdr desc pointing to t= he > same buffer >=20 > The virtio_net_hdr desc all pointed to the same buffer. It doesn't cause > issue because in the simple TX mode we don't use the header. This patch > makes the header desc point to different buffer. >=20 > Signed-off-by: Huawei Xie > --- > drivers/net/virtio/virtio_rxtx.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio= _rxtx.c > index 74b39ef..6cfd315 100644 > --- a/drivers/net/virtio/virtio_rxtx.c > +++ b/drivers/net/virtio/virtio_rxtx.c > @@ -352,7 +352,7 @@ virtio_dev_vring_start(struct virtqueue *vq, int > queue_type) > vq->vq_ring.desc[i + mid_idx].next =3D i; > vq->vq_ring.desc[i + mid_idx].addr =3D > vq->virtio_net_hdr_mem + > - mid_idx * vq->hw- > >vtnet_hdr_size; > + i * vq->hw->vtnet_hdr_size; > vq->vq_ring.desc[i + mid_idx].len =3D > vq->hw->vtnet_hdr_size; > vq->vq_ring.desc[i + mid_idx].flags =3D > -- > 1.8.1.4 Acked-by: Jianfeng Tan Thanks!