summaryrefslogtreecommitdiff
path: root/vswitchd
diff options
context:
space:
mode:
authorJarno Rajahalme <jrajahalme@nicira.com>2014-11-14 14:07:50 -0800
committerJarno Rajahalme <jrajahalme@nicira.com>2014-11-14 14:07:50 -0800
commit67e8c1ac3142a652bc02a6bb1c1d86658605c9f5 (patch)
tree47cd52550ce89d420aa81597d5f20969b256d9aa /vswitchd
parentb7b612709a712496269cfa2e48855c943502279f (diff)
downloadopenvswitch-67e8c1ac3142a652bc02a6bb1c1d86658605c9f5.tar.gz
rstp: Add 'rstp-admin-p2p-mac' and 'rstp-admin-port-state' setters.
'rstp-admin-port-state' is the Administrative Bridge Port state variable defined in the 802.1D-2004 standard. It can be set to include or exclude a port from the active topology by management (section 7.4). operPointToPointMAC and 'rstp-admin-p2p-mac' are a pair of parameters that permit inspection of, and control over, the administrative and operational state of the point-to-point status of the MAC entity by the MAC Relay Entity. adminPointToPointMAC can be set by management and its value is reflected on operPointToPointMAC. Signed-off-by: Daniele Venturino <daniele.venturino@m3s.it> Acked-by: Jarno Rajahalme <jrajahalme@nicira.com>
Diffstat (limited to 'vswitchd')
-rw-r--r--vswitchd/bridge.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
index f3465222a..fea273aea 100644
--- a/vswitchd/bridge.c
+++ b/vswitchd/bridge.c
@@ -1398,6 +1398,16 @@ port_configure_rstp(const struct ofproto *ofproto, struct port *port,
port_s->priority = RSTP_DEFAULT_PORT_PRIORITY;
}
+ config_str = smap_get(&port->cfg->other_config, "rstp-admin-p2p-mac");
+ if (config_str) {
+ port_s->admin_p2p_mac_state = strtoul(config_str, NULL, 0);
+ } else {
+ port_s->admin_p2p_mac_state = RSTP_ADMIN_P2P_MAC_FORCE_TRUE;
+ }
+
+ port_s->admin_port_state = smap_get_bool(&port->cfg->other_config,
+ "rstp-admin-port-state", true);
+
port_s->admin_edge_port = smap_get_bool(&port->cfg->other_config,
"rstp-port-admin-edge", false);
port_s->auto_edge = smap_get_bool(&port->cfg->other_config,