From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id E6590952 for ; Mon, 6 Mar 2017 15:27:22 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 06 Mar 2017 06:27:21 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,254,1484035200"; d="scan'208";a="232818403" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.254.185.48]) ([10.254.185.48]) by fmsmga004.fm.intel.com with ESMTP; 06 Mar 2017 06:27:20 -0800 To: Pascal Mazon , keith.wiles@intel.com References: <1ad979ca71ba1ebe10572237a6a5b4694c23b645.1488531158.git.pascal.mazon@6wind.com> <64e79c8c7398e0af093168d614c0ca62dc28377e.1488808159.git.pascal.mazon@6wind.com> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: Date: Mon, 6 Mar 2017 14:27:18 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.1 MIME-Version: 1.0 In-Reply-To: <64e79c8c7398e0af093168d614c0ca62dc28377e.1488808159.git.pascal.mazon@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v2] net/tap: fix dev name look-up X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Mar 2017 14:27:23 -0000 On 3/6/2017 1:51 PM, Pascal Mazon wrote: > Store the device name in dev->data->name, to have symmetrical behavior > between rte_pmd_tap_probe(name) and rte_pmd_tap_remove(name). > > The netdevice name (linux interface name) is stored in the name field of > struct pmd_internals. +1 for this. > > There's no need to allocate an rte_eth_dev_data, as it is done in > rte_eth_dev_allocate()/rte_eth_dev_data_alloc(). Allocating rte_eth_dev_data, although rte_eth_dev_allocate() does already, common practice for virtual devices, for a reason. rte_eth_dev_allocate() allocates device data from a shared memory, so that multiple DPDK processes can access same device data, this may make sense for physical devices, since there is a single physical resource. But for virtual devices, each DPDK process may want to have independent instance of the virtual device, that is why PMD itself allocates data and overwrites with existing dev->data. Also this may lead unexpected results for some multi process use cases, like secondary process virtual device corrupt primary process physical device data. I believe it is good to keep this as it is. > > Signed-off-by: Pascal Mazon <...>