From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E831B8E7B for ; Fri, 11 Dec 2015 10:52:16 +0100 (CET) Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP; 11 Dec 2015 01:52:14 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,412,1444719600"; d="scan'208";a="705383003" Received: from dpdk15.sh.intel.com ([10.239.129.25]) by orsmga003.jf.intel.com with ESMTP; 11 Dec 2015 01:52:14 -0800 From: Huawei Xie To: dev@dpdk.org Date: Fri, 11 Dec 2015 01:57:17 +0800 Message-Id: <1449770240-103240-3-git-send-email-huawei.xie@intel.com> X-Mailer: git-send-email 1.8.1.4 In-Reply-To: <1449770240-103240-1-git-send-email-huawei.xie@intel.com> References: <1449770240-103240-1-git-send-email-huawei.xie@intel.com> 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 09:52:17 -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