summaryrefslogtreecommitdiff
path: root/lib/dpif-netdev.c
diff options
context:
space:
mode:
authorDaniele Di Proietto <diproiettod@vmware.com>2016-02-11 13:11:10 -0800
committerDaniele Di Proietto <diproiettod@vmware.com>2016-08-15 11:07:42 -0700
commite98d0cb3ac85ba2266a82ddd63bba42cd378ad3f (patch)
treec10abd784e0146a52ec20b9fad61456bc0cb3708 /lib/dpif-netdev.c
parent1c33f0c35e6b81d600798f255a896a85507d51ed (diff)
downloadopenvswitch-e98d0cb3ac85ba2266a82ddd63bba42cd378ad3f.tar.gz
netdev-dummy: Add dummy-internal class.
"internal" netdevs are treated specially in OVS (e.g. for MTU), but the dummy datapath remaps both "system" and "internal" devices to the same "dummy" netdev class, so there's no way to discern those in tests. This commit adds a new "dummy-internal" netdev type, which will be used by the dummy datapath for internal ports, so that other parts of the code can understand which ports are internal just by looking at the netdev object. The alternative solution, using the original interface type ("internal") instead of the translated netdev type ("dummy"), is harder to implement, because in so many places only the netdev object is available. Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/dpif-netdev.c')
-rw-r--r--lib/dpif-netdev.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c
index 96504f531..ecc7cea8d 100644
--- a/lib/dpif-netdev.c
+++ b/lib/dpif-netdev.c
@@ -908,7 +908,7 @@ static const char *
dpif_netdev_port_open_type(const struct dpif_class *class, const char *type)
{
return strcmp(type, "internal") ? type
- : dpif_netdev_class_is_dummy(class) ? "dummy"
+ : dpif_netdev_class_is_dummy(class) ? "dummy-internal"
: "tap";
}