From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id D18B59197 for ; Wed, 4 Nov 2015 09:35:51 +0100 (CET) Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga102.jf.intel.com with ESMTP; 04 Nov 2015 00:35:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,242,1444719600"; d="scan'208";a="811391138" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga001.jf.intel.com with ESMTP; 04 Nov 2015 00:35:44 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tA48ZfcC018821; Wed, 4 Nov 2015 16:35:41 +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 tA48Zb3s027563; Wed, 4 Nov 2015 16:35:39 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tA48ZbGF027559; Wed, 4 Nov 2015 16:35:37 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Wed, 4 Nov 2015 16:35:25 +0800 Message-Id: <1446626131-27513-3-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1446626131-27513-1-git-send-email-jijiang.liu@intel.com> References: <1446626131-27513-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH v3 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, 04 Nov 2015 08:35:52 -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