- port->lacp_fast = !strcmp(get_port_other_config(cfg, "lacp-time", "slow"),
- "fast");
-
- lacp_priority =
- atoi(get_port_other_config(cfg, "lacp-system-priority", "0"));
-
- if (lacp_priority <= 0 || lacp_priority > UINT16_MAX) {
- /* Prefer bondable links if unspecified. */
- port->lacp_priority = port->n_ifaces > 1 ? UINT16_MAX - 1 : UINT16_MAX;
- } else {
- port->lacp_priority = lacp_priority;
- }
-
- if (!port->cfg->lacp) {
- /* XXX when LACP implementation has been sufficiently tested, enable by
- * default and make active on bonded ports. */
- lacp_destroy(port->lacp);
- port->lacp = NULL;
- } else if (!strcmp(port->cfg->lacp, "off")) {
- lacp_destroy(port->lacp);
- port->lacp = NULL;
- } else if (!strcmp(port->cfg->lacp, "active")) {
- if (!port->lacp) {
- port->lacp = lacp_create();
- }
- port->lacp_active = true;
- } else if (!strcmp(port->cfg->lacp, "passive")) {
- if (!port->lacp) {
- port->lacp = lacp_create();
- }
- port->lacp_active = false;
- } else {
- VLOG_WARN("port %s: unknown LACP mode %s",
- port->name, port->cfg->lacp);
- lacp_destroy(port->lacp);
- port->lacp = NULL;
- }
-