X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=vswitchd%2Fbridge.c;h=55c9f40af32c981db9f3cfea2eb0254b0a5aa9f4;hb=bf8f2167fd3107f5513d487a69a6568cf51afd68;hp=84ed03e80122008ce3f38fe055dfa9f7b5b55f81;hpb=84b32864207813c5f4b9989f66303a577cb01ba0;p=sliver-openvswitch.git diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c index 84ed03e80..55c9f40af 100644 --- a/vswitchd/bridge.c +++ b/vswitchd/bridge.c @@ -1401,7 +1401,7 @@ bridge_run(void) /* (Re)configure if necessary. */ database_changed = ovsdb_idl_run(idl); cfg = ovsrec_open_vswitch_first(idl); -#ifdef HAVE_OPENSSL + /* Re-configure SSL. We do this on every trip through the main loop, * instead of just when the database changes, because the contents of the * key and certificate files can change without the database changing. @@ -1414,7 +1414,7 @@ bridge_run(void) stream_ssl_set_key_and_cert(ssl->private_key, ssl->certificate); stream_ssl_set_ca_cert_file(ssl->ca_cert, ssl->bootstrap_ca_cert); } -#endif + if (database_changed || datapath_destroyed) { if (cfg) { struct ovsdb_idl_txn *txn = ovsdb_idl_txn_create(idl); @@ -3136,11 +3136,13 @@ static void iface_reconfigure_lacp(struct iface *iface) { struct lacp_slave_settings s; - int priority, portid; + int priority, portid, key; portid = atoi(get_interface_other_config(iface->cfg, "lacp-port-id", "0")); priority = atoi(get_interface_other_config(iface->cfg, "lacp-port-priority", "0")); + key = atoi(get_interface_other_config(iface->cfg, "lacp-aggregation-key", + "0")); if (portid <= 0 || portid > UINT16_MAX) { portid = iface->dp_ifidx; @@ -3150,9 +3152,14 @@ iface_reconfigure_lacp(struct iface *iface) priority = UINT16_MAX; } + if (key < 0 || key > UINT16_MAX) { + key = 0; + } + s.name = iface->name; s.id = portid; s.priority = priority; + s.key = key; lacp_slave_register(iface->port->lacp, iface, &s); } @@ -3189,9 +3196,9 @@ port_reconfigure_lacp(struct port *port) ? priority : UINT16_MAX - !list_is_short(&port->ifaces)); - s.strict = !strcmp(get_port_other_config(port->cfg, "lacp-strict", - "false"), - "true"); + s.heartbeat = !strcmp(get_port_other_config(port->cfg, + "lacp-heartbeat", + "false"), "true"); lacp_time = get_port_other_config(port->cfg, "lacp-time", "slow"); custom_time = atoi(lacp_time); @@ -3258,6 +3265,8 @@ port_reconfigure_bond(struct port *port) s.up_delay = MAX(0, port->cfg->bond_updelay); s.down_delay = MAX(0, port->cfg->bond_downdelay); + s.basis = atoi(get_port_other_config(port->cfg, "bond-hash-basis", "0")); + s.rebalance_interval = atoi( get_port_other_config(port->cfg, "bond-rebalance-interval", "10000")); if (s.rebalance_interval < 1000) { @@ -3275,9 +3284,15 @@ port_reconfigure_bond(struct port *port) } LIST_FOR_EACH (iface, port_elem, &port->ifaces) { - uint16_t stable_id = (port->lacp - ? lacp_slave_get_port_id(port->lacp, iface) - : iface->dp_ifidx); + long long stable_id; + + stable_id = atoll(get_interface_other_config(iface->cfg, + "bond-stable-id", "0")); + + if (stable_id <= 0 || stable_id >= UINT32_MAX) { + stable_id = odp_port_to_ofp_port(iface->dp_ifidx); + } + bond_slave_register(iface->port->bond, iface, stable_id, iface->netdev); } @@ -3519,7 +3534,7 @@ iface_delete_queues(unsigned int queue_id, static void iface_update_qos(struct iface *iface, const struct ovsrec_qos *qos) { - if (!qos || qos->type[0] == '\0') { + if (!qos || qos->type[0] == '\0' || qos->n_queues < 1) { netdev_set_qos(iface->netdev, NULL, NULL); } else { struct iface_delete_queues_cbdata cbdata;