From: Pascal Mazon <pascal.mazon@6wind.com>
To: Ferruh Yigit <ferruh.yigit@intel.com>, keith.wiles@intel.com
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 1/6] net/tap: use correct tap name
Date: Tue, 31 Jan 2017 15:23:32 +0100 [thread overview]
Message-ID: <39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com> (raw)
In-Reply-To: <abf0d961-4b2a-e1bf-0732-cc9d933f9278@intel.com>
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:
[1]
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/networking/tuntap.txt#n108
>
>>
>> In tun_alloc() especially, we want to use the latter. Otherwise the
>> netdevice would be wrongly named "net_tap". Furthermore, creating
>> several tap vdev would point to the same netdevice.
>>
>> In any case, it must to be consistent with the tun_alloc() call in
>> eth_dev_tap_create().
>>
>> Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
> <...>
>
--
Pascal Mazon
www.6wind.com
next prev parent reply other threads:[~2017-01-31 14:25 UTC|newest]
Thread overview: 45+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-31 9:42 Pascal Mazon
2017-01-31 9:42 ` [dpdk-dev] [PATCH 2/6] net/tap: use correct channel for error logs Pascal Mazon
2017-01-31 13:07 ` Ferruh Yigit
2017-01-31 16:58 ` Stephen Hemminger
2017-01-31 17:04 ` Wiles, Keith
2017-01-31 9:42 ` [dpdk-dev] [PATCH 3/6] net/tap: don't set fd value overwritten just below Pascal Mazon
2017-01-31 9:42 ` [dpdk-dev] [PATCH 4/6] net/tap: keep kernel-assigned MAC address Pascal Mazon
2017-01-31 13:13 ` Ferruh Yigit
2017-01-31 9:42 ` [dpdk-dev] [PATCH 5/6] net/tap: display tap name after parsing Pascal Mazon
2017-01-31 13:16 ` Ferruh Yigit
2017-01-31 9:42 ` [dpdk-dev] [PATCH 6/6] net/tap: implement link up and down callbacks Pascal Mazon
2017-01-31 13:21 ` Ferruh Yigit
2017-01-31 14:31 ` Pascal Mazon
2017-01-31 13:06 ` [dpdk-dev] [PATCH 1/6] net/tap: use correct tap name Ferruh Yigit
2017-01-31 14:23 ` Pascal Mazon [this message]
2017-01-31 15:28 ` Ferruh Yigit
2017-01-31 15:30 ` Pascal Mazon
2017-01-31 15:38 ` Ferruh Yigit
2017-01-31 15:44 ` Wiles, Keith
2017-01-31 15:44 ` Pascal Mazon
2017-01-31 16:06 ` Wiles, Keith
2017-01-31 16:39 ` Pascal Mazon
2017-01-31 23:29 ` Wiles, Keith
2017-02-01 8:11 ` Pascal Mazon
2017-02-01 15:25 ` Wiles, Keith
2017-02-01 15:40 ` Pascal Mazon
2017-02-01 15:55 ` Wiles, Keith
2017-02-01 17:50 ` Ferruh Yigit
2017-02-02 8:05 ` Pascal Mazon
2017-02-02 8:25 ` Pascal Mazon
2017-02-02 10:23 ` Ferruh Yigit
2017-01-31 14:52 ` Wiles, Keith
2017-01-31 15:14 ` Ferruh Yigit
2017-01-31 15:19 ` Wiles, Keith
2017-02-02 13:46 ` Wiles, Keith
2017-02-02 16:17 ` [dpdk-dev] [PATCH v2 1/7] " Pascal Mazon
2017-02-02 16:17 ` [dpdk-dev] [PATCH v2 2/7] net/tap: use correct channel for error logs Pascal Mazon
2017-02-02 16:18 ` [dpdk-dev] [PATCH v2 3/7] net/tap: don't set fd value overwritten just below Pascal Mazon
2017-02-02 16:18 ` [dpdk-dev] [PATCH v2 4/7] net/tap: keep kernel-assigned MAC address Pascal Mazon
2017-02-02 16:18 ` [dpdk-dev] [PATCH v2 5/7] net/tap: display tap name after parsing Pascal Mazon
2017-02-02 16:18 ` [dpdk-dev] [PATCH v2 6/7] net/tap: implement link up and down callbacks Pascal Mazon
2017-02-02 16:18 ` [dpdk-dev] [PATCH v2 7/7] net/tap: support promiscuous and allmulti setting Pascal Mazon
2017-02-02 16:23 ` [dpdk-dev] [PATCH v2 1/7] net/tap: use correct tap name Wiles, Keith
2017-02-02 16:24 ` Wiles, Keith
2017-02-02 21:55 ` Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=39a46c11-66c4-d8ed-a2bc-d9421cb4afd0@6wind.com \
--to=pascal.mazon@6wind.com \
--cc=dev@dpdk.org \
--cc=ferruh.yigit@intel.com \
--cc=keith.wiles@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).