[ovs-dev] [cleanups 09/12] bridge: Always "up" internal devices.

Justin Pettit jpettit at nicira.com
Fri Nov 16 08:03:02 UTC 2012


The kernel datapath automatically "up"s internal devices, but this
wasn't happening for the userspace datapath.  This change has the bridge
module always "up" them.

Signed-off-by: Justin Pettit <jpettit at nicira.com>
---
 tests/ofproto.at  |   12 ++++++------
 vswitchd/bridge.c |    3 ++-
 2 files changed, 8 insertions(+), 7 deletions(-)

diff --git a/tests/ofproto.at b/tests/ofproto.at
index 69a170e..38bc406 100644
--- a/tests/ofproto.at
+++ b/tests/ofproto.at
@@ -15,8 +15,8 @@ n_tables:254, n_buffers:256
 capabilities: FLOW_STATS TABLE_STATS PORT_STATS QUEUE_STATS ARP_MATCH_IP
 actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_NW_SRC SET_NW_DST SET_NW_TOS SET_TP_SRC SET_TP_DST ENQUEUE
  LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     PORT_DOWN
-     state:      LINK_DOWN
+     config:     0
+     state:      0
      speed: 0 Mbps now, 0 Mbps max
 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
 ])
@@ -45,8 +45,8 @@ actions: OUTPUT SET_VLAN_VID SET_VLAN_PCP STRIP_VLAN SET_DL_SRC SET_DL_DST SET_N
      state:      LINK_DOWN
      speed: 0 Mbps now, 0 Mbps max
  LOCAL(br0): addr:aa:55:aa:55:00:0x
-     config:     PORT_DOWN
-     state:      LINK_DOWN
+     config:     0
+     state:      0
      speed: 0 Mbps now, 0 Mbps max
 OFPT_GET_CONFIG_REPLY: frags=normal miss_send_len=0
 ])
@@ -75,8 +75,8 @@ AT_CHECK([ovs-ofctl -vwarn dump-ports-desc br0], [0], [stdout])
 AT_CHECK([STRIP_XIDS stdout], [0], [dnl
 OFPST_PORT_DESC reply:
  LOCAL(br0): addr:aa:55:aa:55:00:00
-     config:     PORT_DOWN
-     state:      LINK_DOWN
+     config:     0
+     state:      0
      speed: 0 Mbps now, 0 Mbps max
 ])
 OVS_VSWITCHD_STOP
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index b600a3c..725abbf 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1349,7 +1349,8 @@ iface_do_create(const struct bridge *br,
                  br->name, iface_cfg->name, *ofp_portp);
     }
 
-    if (port_cfg->vlan_mode && !strcmp(port_cfg->vlan_mode, "splinter")) {
+    if ((port_cfg->vlan_mode && !strcmp(port_cfg->vlan_mode, "splinter"))
+            || iface_is_internal(iface_cfg, br->cfg)) {
         netdev_turn_flags_on(netdev, NETDEV_UP, true);
     }
 
-- 
1.7.5.4




More information about the dev mailing list