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 D13CA8E67 for ; Wed, 11 Nov 2015 07:40:57 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP; 10 Nov 2015 22:40:58 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,274,1444719600"; d="scan'208";a="816975367" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 10 Nov 2015 22:40:57 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tAB6es8m026458; Wed, 11 Nov 2015 14:40:54 +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 tAB6eq6M001218; Wed, 11 Nov 2015 14:40:54 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tAB6eqPR001214; Wed, 11 Nov 2015 14:40:52 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Wed, 11 Nov 2015 14:40:40 +0800 Message-Id: <1447224046-1169-3-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1447224046-1169-1-git-send-email-jijiang.liu@intel.com> References: <1447224046-1169-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH v4 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, 11 Nov 2015 06:40:58 -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 74c00ee..dd39715 100644 --- a/drivers/net/virtio/virtio_ethdev.c +++ b/drivers/net/virtio/virtio_ethdev.c @@ -414,6 +414,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