Hi FreeBSD team, In FreeBSD-10 and in Current, by default LACP supports only long timeout.
FreeBSD does not provide the way to configure LACP timeout period. We made code changes for LACP Fast-timeout (Using IOCTL, both GET / SET) on FreeBSD-11. And we were able to successfully test the operation using IOCtl calls from userland. Initially we wanted to use sysctl, but found in FreeBSD revision history, that sysctl in LAG results in LOR and has to be converted to IOCTL. Please let us know your comments to take this forward. Diffs inline: Index: sys/net/ieee8023ad_lacp.h =================================================================== --- sys/net/ieee8023ad_lacp.h (revision 285195) +++ sys/net/ieee8023ad_lacp.h (working copy) @@ -251,6 +251,7 @@ u_int32_t lsc_tx_test; } lsc_debug; u_int32_t lsc_strict_mode; + u_int32_t lsc_fast_timeout; /* if set, fast / short timeout */ }; #define LACP_TYPE_ACTORINFO 1 Index: sys/net/if_lagg.c =================================================================== --- sys/net/if_lagg.c (revision 285195) +++ sys/net/if_lagg.c (working copy) @@ -1257,6 +1257,8 @@ ro->ro_opts |= LAGG_OPT_LACP_RXTEST; if (lsc->lsc_strict_mode != 0) ro->ro_opts |= LAGG_OPT_LACP_STRICT; + if (lsc->lsc_fast_timeout != 0) + ro->ro_opts |= LAGG_OPT_LACP_TIMEOUT; ro->ro_active = sc->sc_active; } else { @@ -1292,6 +1294,8 @@ case -LAGG_OPT_LACP_RXTEST: case LAGG_OPT_LACP_STRICT: case -LAGG_OPT_LACP_STRICT: + case LAGG_OPT_LACP_TIMEOUT: + case -LAGG_OPT_LACP_TIMEOUT: valid = lacp = 1; break; default: @@ -1320,6 +1324,7 @@ sc->sc_opts &= ~ro->ro_opts; } else { struct lacp_softc *lsc; + struct lacp_port *lp; lsc = (struct lacp_softc *)sc->sc_psc; @@ -1342,6 +1347,16 @@ case -LAGG_OPT_LACP_STRICT: lsc->lsc_strict_mode = 0; break; + case LAGG_OPT_LACP_TIMEOUT: + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) + lp->lp_state |= LACP_STATE_TIMEOUT; + lsc->lsc_fast_timeout = 1; + break; + case -LAGG_OPT_LACP_TIMEOUT: + LIST_FOREACH(lp, &lsc->lsc_ports, lp_next) + lp->lp_state &= ~LACP_STATE_TIMEOUT; + lsc->lsc_fast_timeout = 0; + break; } } LAGG_WUNLOCK(sc); Index: sys/net/if_lagg.h =================================================================== --- sys/net/if_lagg.h (revision 285195) +++ sys/net/if_lagg.h (working copy) @@ -150,6 +150,7 @@ #define LAGG_OPT_LACP_STRICT 0x10 /* LACP strict mode */ #define LAGG_OPT_LACP_TXTEST 0x20 /* LACP debug: txtest */ #define LAGG_OPT_LACP_RXTEST 0x40 /* LACP debug: rxtest */ +#define LAGG_OPT_LACP_TIMEOUT 0x80 /* LACP Fast timeout */ u_int ro_count; /* number of ports */ u_int ro_active; /* active port count */ u_int ro_flapping; /* number of flapping */ Thanks, LN MSYS Technologies _______________________________________________ freebsd-net@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-net To unsubscribe, send any mail to "freebsd-net-unsubscr...@freebsd.org"