Skip to contentSkip to conversation

vtap0 device creation (bug)?

dpdk-dev Stephen Hemminger 2 participants 2 messages Nov 8, 2019 – Nov 11, 2019

lore
Share & tools
lore
#0 lore raw

When I create a virtio-user device with rte_hotplug it creates a kernel device (ie vtap0). This is normal an the device has ifindex N.

But later when device is configured an started the original vtap0 device is deleted and a new one is created (with ifindex N+1). This seems like a bug, if nothing else it unnecessary overhead and link flapping for routing daemons.

Noticed only while tracking down a bug where after vtap was created the address was being set, but then disappearing.

Is this intentional? Is it documented?

#1 lore raw
Quoted 11 lines · Stephen Hemminger

When I create a virtio-user device with rte_hotplug it creates a kernel device (ie vtap0). This is normal an the device has ifindex N.

But later when device is configured an started the original vtap0 device is deleted and a new one is created (with ifindex N+1). This seems like a bug, if nothing else it unnecessary overhead and link flapping for routing daemons.

Noticed only while tracking down a bug where after vtap was created the address was being set, but then disappearing.

Is this intentional? Is it documented?

Thanks for catching this.
I think it's caused by the fact that tapfds will be closed each time when the queue pairs are disabled [1]. We may need a way to keep tapfds open to fix it.

[1] https://github.com/DPDK/dpdk/blob/6bbc5a923625/drivers/net/virtio/virtio_user/vhost_kernel.c#L333-L338

Thanks,
Tiwei