From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A6B458E71 for ; Fri, 11 Dec 2015 09:02:25 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga103.jf.intel.com with ESMTP; 11 Dec 2015 00:02:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,412,1444719600"; d="scan'208";a="858654592" Received: from dpdk15.sh.intel.com ([10.239.129.25]) by fmsmga001.fm.intel.com with ESMTP; 11 Dec 2015 00:02:23 -0800 From: Huawei Xie To: dev@dpdk.org Date: Fri, 11 Dec 2015 00:07:32 +0800 Message-Id: <1449763652-86292-1-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.8.1.4 X-Mailman-Approved-At: Fri, 11 Dec 2015 15:22:01 +0100 Subject: [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: Fri, 11 Dec 2015 08:02:26 -0000 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. Signed-off-by: Huawei Xie --- drivers/net/virtio/virtio_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = i; vq->vq_ring.desc[i + mid_idx].addr = 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 = vq->hw->vtnet_hdr_size; vq->vq_ring.desc[i + mid_idx].flags = -- 1.8.1.4