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 4791891CD for ; Wed, 21 Oct 2015 06:46:54 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 20 Oct 2015 21:46:53 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,709,1437462000"; d="scan'208";a="585052084" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by FMSMGA003.fm.intel.com with ESMTP; 20 Oct 2015 21:46:54 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t9L4kpZZ027515; Wed, 21 Oct 2015 12:46:51 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t9L4klwP027856; Wed, 21 Oct 2015 12:46:49 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t9L4klSJ027852; Wed, 21 Oct 2015 12:46:47 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Wed, 21 Oct 2015 12:46:35 +0800 Message-Id: <1445402801-27806-3-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1445402801-27806-1-git-send-email-jijiang.liu@intel.com> References: <1445402801-27806-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH 2/8] driver/virtio: record virtual address of virtio net header 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: Wed, 21 Oct 2015 04:46:55 -0000 Record virtual address of virtio net header. Signed-off-by: Jijiang Liu --- drivers/net/virtio/virtio_ethdev.c | 3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 465d3cd..cb5dfee 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -376,6 +376,9 @@ int virtio_dev_queue_setup(struct rte_eth_dev *dev, } vq->virtio_net_hdr_mem = vq->virtio_net_hdr_mz->phys_addr; + vq->virtio_net_hdr_addr = + (uint64_t)(uintptr_t)vq->virtio_net_hdr_mz->addr; + memset(vq->virtio_net_hdr_mz->addr, 0, vq_size * hw->vtnet_hdr_size); } else if (queue_type == VTNET_CQ) { -- 1.7.7.6