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 3A88F567E for ; Wed, 16 Sep 2015 19:11:18 +0200 (CEST) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga101.fm.intel.com with ESMTP; 16 Sep 2015 10:10:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,540,1437462000"; d="scan'208";a="806557471" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga002.fm.intel.com with ESMTP; 16 Sep 2015 10:10:54 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t8GHAqln006567; Thu, 17 Sep 2015 01:10:52 +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 t8GHAmAB010634; Thu, 17 Sep 2015 01:10:50 +0800 Received: (from jijiangl@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t8GHAmlr010630; Thu, 17 Sep 2015 01:10:48 +0800 From: Jijiang Liu To: dev@dpdk.org Date: Thu, 17 Sep 2015 01:10:33 +0800 Message-Id: <1442423438-10578-4-git-send-email-jijiang.liu@intel.com> X-Mailer: git-send-email 1.7.12.2 In-Reply-To: <1442423438-10578-1-git-send-email-jijiang.liu@intel.com> References: <1442423438-10578-1-git-send-email-jijiang.liu@intel.com> Subject: [dpdk-dev] [PATCH 3/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, 16 Sep 2015 17:11:18 -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