summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorFlavio Leitner <fbl@sysclose.org>2018-01-17 22:09:58 -0200
committerBen Pfaff <blp@ovn.org>2018-01-22 10:28:17 -0800
commit22dcb53449d9e7f6c949b46a5331c47653559369 (patch)
tree60b292d1c9f4f5c318ad3e475b621181c5df5a87 /vswitchd
parentc781bd520364b20541acc87790ea3b0358c98e8e (diff)
downloadopenvswitch-22dcb53449d9e7f6c949b46a5331c47653559369.tar.gz
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>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/vswitch.xml13
1 files changed, 12 insertions, 1 deletions
diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
index 61fb7b17f..7e893256d 100644
--- a/vswitchd/vswitch.xml
+++ b/vswitchd/vswitch.xml
@@ -2191,7 +2191,18 @@
imprecisely for internal interfaces.</dd>
<dt><code>tap</code></dt>
- <dd>A TUN/TAP device managed by Open vSwitch.</dd>
+ <dd>
+ <p>
+ A TUN/TAP device managed by Open vSwitch.
+ </p>
+ <p>
+ Open vSwitch checks the interface state before send packets
+ to the device. When it is <code>down</code>, the packets are
+ dropped and the tx_dropped statistic is updated accordingly.
+ Older versions of Open vSwitch did not check the interface state
+ and then the tx_packets was incremented along with tx_dropped.
+ </p>
+ </dd>
<dt><code>geneve</code></dt>
<dd>