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 A9B995A6B for ; Mon, 11 Jan 2016 06:31:46 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP; 10 Jan 2016 21:31:43 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,551,1444719600"; d="scan'208";a="27137594" Received: from shwdeisgchi083.ccr.corp.intel.com (HELO [10.239.67.119]) ([10.239.67.119]) by fmsmga004.fm.intel.com with ESMTP; 10 Jan 2016 21:31:42 -0800 To: Tetsuya Mukawa , "dev@dpdk.org" References: <1447930650-26023-2-git-send-email-mukawa@igel.co.jp> <1450255049-2263-1-git-send-email-mukawa@igel.co.jp> <568117AB.1080605@igel.co.jp> <568C90A7.9040503@igel.co.jp> <568CA950.9000205@intel.com> <568CC3A4.7080603@igel.co.jp> From: "Tan, Jianfeng" Message-ID: <56933E3D.1090802@intel.com> Date: Mon, 11 Jan 2016 13:31:41 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.5.0 MIME-Version: 1.0 In-Reply-To: <568CC3A4.7080603@igel.co.jp> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: "nakajima.yoshihiro@lab.ntt.co.jp" , "mst@redhat.com" Subject: Re: [dpdk-dev] [PATCH v1 0/2] Virtio-net PMD Extension to work on host 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: Mon, 11 Jan 2016 05:31:47 -0000 Hi Tetsuya, > With current your implementation, when 'virtual' virtio-net PMD is used, > 'phys_addr' will be virtual address in EAL layer. > > struct rte_memseg { > phys_addr_t phys_addr; /**< Start physical address. */ > union { > void *addr; /**< Start virtual address. */ > uint64_t addr_64; /**< Makes sure addr is always 64 > bits */ > }; > ....... > }; It's not true. It does not effect EAL layer at all. Just fill virtual address in virtio PMD when: 1). set_base_addr; 2). preparing RX's descriptors; 3). transmitting packets, CVA is filled in TX's descriptors; 4). in TX and CQ's header, CVA is used. > > How about choosing it in virtio-net PMD? My current implementation works as you say. > (In the case of 'virtual', just use 'addr' instead of using 'phys_addr'.) > For example, port0 may use physical address, but port1 may use virtual > address. > > With this, of course, we don't have an issue with 'physical' virtio-net PMD. > Also, with 'virtual' virtio-net PMD, we can use virtual address and fd > that represents the big virtual address space. > (TODO: Need to change rte_memseg and EAL to keep fd and offset?) I suppose you mean that when initializing memory, just maintain one fd in the end, and mmap all memsegs inside it. This sounds like a good idea to solve the limitation of VHOST_MEMORY_MAX_NREGIONS. Besides, Sergio and I are discussing about using VA instead of PA in VFIO to avoid the requirement of physical-config for physical devices. Thanks, Jianfeng > Then, you don't worry about VHOST_MEMORY_MAX_NREGIONS, because we have > only one fd. > >> b. containers without root privilege >> No need to worry about this problem, because it lacks of privilege to >> construct physical-contiguous memory. >> > Yes, we cannot run 'physical' PMDs in this type of container. > Anyway, I will check it more, if we really need it. > > Thanks, > Tetsuya