diff options
author | Justin Pettit <jpettit@nicira.com> | 2012-10-30 17:41:22 -0700 |
---|---|---|
committer | Justin Pettit <jpettit@nicira.com> | 2012-11-01 22:54:28 -0700 |
commit | acf60855126bcfa79ea22d7846af5f2efe26cd30 (patch) | |
tree | fadbae81ed892eb9c3d0acae2713622adf13f95a /vswitchd | |
parent | 4213f19da9926e8a6b4569010f152f399d0ad8cc (diff) |
ofproto-dpif: Use a single underlying datapath across multiple bridges.
This commit switches to using a single backing datapath (called
"ovs-datapath") for all bridges of that datapath's type. Previously,
resources couldn't be shared across bridges, since each was in its own
datapath. This change will allow sharing of tunnels and cheaper patch
ports to be added in the future.
Since bridges share a common datapath, the ovs-dpctl commands won't
provide bridge-specific information. Users wishing to have that
information should use the new "ovs-appctl dpif/*" commands as
documented in ovs-vswitchd(8).
Signed-off-by: Justin Pettit <jpettit@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r-- | vswitchd/bridge.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 3356a049..27d40a87 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -3145,11 +3145,14 @@ static const char * iface_get_type(const struct ovsrec_interface *iface, const struct ovsrec_bridge *br) { - /* The local port always has type "internal". Other ports take their type - * from the database and default to "system" if none is specified. */ - return (!strcmp(iface->name, br->name) ? "internal" - : iface->type[0] ? iface->type - : "system"); + /* The local port always has type "internal" unless the bridge is of + * type "dummy". Other ports take their type from the database and + * default to "system" if none is specified. */ + if (!strcmp(iface->name, br->name)) { + return !strcmp(br->datapath_type, "dummy") ? "dummy" : "internal"; + } else { + return iface->type[0] ? iface->type : "system"; + } } static void |