[dpdk-dev] [PATCH 1/6] net/tap: use correct tap name

Ferruh Yigit ferruh.yigit at intel.com
Tue Jan 31 14:06:06 CET 2017


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"

> 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?

> 
> 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 at 6wind.com>
<...>



More information about the dev mailing list