2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 22:35:15 +00:00

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>
This commit is contained in:
Justin Pettit
2012-10-30 17:41:22 -07:00
parent 4213f19da9
commit acf6085512
6 changed files with 622 additions and 236 deletions

8
FAQ
View File

@@ -414,6 +414,14 @@ Q: Is there any documentation on the database tables and fields?
A: Yes. ovs-vswitchd.conf.db(5) is a comprehensive reference.
Q: When I run ovs-dpctl I no longer see the bridges I created. Instead,
I only see a datapath called "ovs-system". How can I see datapath
information about a particular bridge?
A: In version 1.9.0, OVS switched to using a single datapath that is
shared by all bridges of that type. The "ovs-appctl dpif/*"
commands provide similar functionality that is scoped by the bridge.
VLANs
-----

5
NEWS
View File

@@ -47,6 +47,11 @@ v1.9.0 - xx xxx xxxx
- The ofproto library is now responsible for assigning OpenFlow port
numbers. An ofproto implementation should assign them when
port_construct() is called.
- All dpif-based bridges of a particular type share a common
datapath called "ovs-<type>", e.g. "ovs-system". The ovs-dpctl
commands will now return information on that shared datapath. To
get the equivalent bridge-specific information, use the new
"ovs-appctl dpif/*" commands.
- The following features are now deprecated. They will be removed no
earlier than February 2013. Please email dev@openvswitch.org with
concerns.

File diff suppressed because it is too large Load Diff

View File

@@ -655,11 +655,9 @@ struct ofproto_class {
*
* The client might not be entirely in control of the ports within an
* ofproto. Some hardware implementations, for example, might have a fixed
* set of ports in a datapath, and the Linux datapath allows the system
* administrator to externally add and remove ports with ovs-dpctl. For
* this reason, the client needs a way to iterate through all the ports
* that are actually in a datapath. These functions provide that
* functionality.
* set of ports in a datapath. For this reason, the client needs a way to
* iterate through all the ports that are actually in a datapath. These
* functions provide that functionality.
*
* The 'state' pointer provides the implementation a place to
* keep track of its position. Its format is opaque to the caller.

View File

@@ -1209,13 +1209,13 @@ ADD_OF_PORTS([br0], [1], [2])
ADD_OF_PORTS([br1], [3])
AT_CHECK([ovs-appctl dpif/show], [0], [dnl
dummy@br0:
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0 lost:0
flows: 0
br0 65534/100: (dummy)
p1 1/1: (dummy)
p2 2/2: (dummy)
dummy@br1:
br1 (dummy@ovs-dummy):
lookups: hit:0 missed:0 lost:0
flows: 0
br1 65534/101: (dummy)
@@ -1223,7 +1223,7 @@ dummy@br1:
])
AT_CHECK([ovs-appctl dpif/show br0], [0], [dnl
dummy@br0:
br0 (dummy@ovs-dummy):
lookups: hit:0 missed:0 lost:0
flows: 0
br0 65534/100: (dummy)

View File

@@ -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