]> git.proxmox.com Git - mirror_ovs.git/commit
netdev-linux: do not send packets to down tap ifaces.
authorFlavio Leitner <fbl@sysclose.org>
Thu, 18 Jan 2018 00:09:58 +0000 (22:09 -0200)
committerBen Pfaff <blp@ovn.org>
Mon, 22 Jan 2018 18:28:17 +0000 (10:28 -0800)
commit22dcb53449d9e7f6c949b46a5331c47653559369
tree60b292d1c9f4f5c318ad3e475b621181c5df5a87
parentc781bd520364b20541acc87790ea3b0358c98e8e
netdev-linux: do not send packets to down tap ifaces.

Today OVS pushes packets to the TAP interface ignoring its
current state. That works because the kernel will return -EIO
when it's not UP and OVS will just ignore that as it is not
an OVS issue.

However, it causes a huge impact when broadcasts happen when
using userspace datapath accelerated with DPDK (e.g.: action
NORMAL).  This patch improves the situation by checking the
TAP's interface state before issueing any syscall.

However, there might be use-cases moving interfaces to other
networking namespaces and in that case, OVS can't retrieve
the iface state (sets it to DOWN). That would stop the traffic
breaking the use-case. This patch relies on netlink notifications
to find out if the device is local or not. When it's local, the
device state is checked otherwise it will behave as before.

Signed-off-by: Flavio Leitner <fbl@sysclose.org>
Signed-off-by: Ben Pfaff <blp@ovn.org>
NEWS
lib/netdev-linux.c
vswitchd/vswitch.xml