From: Justin Pettit Date: Thu, 15 Nov 2012 21:55:06 +0000 (-0800) Subject: bridge: Always "up" internal devices. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bef071a5fdf8e2dd87677b04b3cf7a8f5094edcb;p=openvswitch bridge: Always "up" internal devices. 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 --- diff --git a/tests/ofproto.at b/tests/ofproto.at index 69a170ec..38bc4064 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 aebb2c36..316ecc75 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); }