From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 5144B1023 for ; Tue, 31 Jan 2017 16:28:28 +0100 (CET) Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga105.jf.intel.com with ESMTP; 31 Jan 2017 07:28:27 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.33,315,1477983600"; d="scan'208";a="54085067" Received: from fyigit-mobl1.ger.corp.intel.com (HELO [10.237.220.38]) ([10.237.220.38]) by orsmga004.jf.intel.com with ESMTP; 31 Jan 2017 07:28:26 -0800 To: Pascal Mazon , keith.wiles@intel.com References: <1485855778-15496-1-git-send-email-pascal.mazon@6wind.com> <39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com> Cc: dev@dpdk.org From: Ferruh Yigit Message-ID: Date: Tue, 31 Jan 2017 15:28:25 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH 1/6] net/tap: use correct tap name 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: Tue, 31 Jan 2017 15:28:28 -0000 On 1/31/2017 2:23 PM, Pascal Mazon wrote: > On 01/31/2017 02:06 PM, Ferruh Yigit wrote:> On 1/31/2017 9:42 AM, > Pascal Mazon wrote: >>> dev->data->name contains "net_tap", the device driver name. >> >> I see what patch does, just as a note to commit log: >> >> AFAIK, "dev->data->name" is device name, and for this case it is >> "net_tap#", like "net_tap0", "net_tap1" ... >> >> "dev->data_drv_name" is the driver name which is "net_tap" > > Indeed, dev->data->name is the device name, looking like "net_tap#", > with number increasing for each vdev. > I'll put the following commit log line if that's ok: > > dev->data->name contains the device name, e.g. "net_tap0". > >> >>> dev->data->dev_private->name contains the actual iface name, >>> e.g. "dtap0". >> >> Right, I agree this is correct comparing "dev->data->name" >> >> But the problem is pmd->name is per eth_dev. >> >> If I read code correct, for multiple queue support, each queue pair will >> create a tap device, so each needs a different name. >> >> So can't just use pmd->name. Need to create a name per queue pair, it >> can be combination of pmd->name + "_" + queue_id? Or can keep a name per >> queue pair, instead of eth_dev. >> >> What do you think? > > Actually that's not exactly how it goes. > Adding a queue to a netdevice requires to open("/dev/net/tun") and setting > TUNSETIFF (through ioctl) on the resulting fd. > That's the important part: queues for a given tap device must set TUNSETIFF > with a common ifreq.ifr_name (in our case, pmd->name). > > This is best explained in the kernel doc, there: Thank you for the clarification. If so, why PMD keeps a fd per queue? Overall, patch looks good except mentioned detail in commit log. I suggest waiting Keith's patch, and rebase this set on top of it. Thanks, ferruh > > [1] > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/tuntap.txt#n108 > <...>