Date: Tue, 14 Aug 2018 11:58:28 +1000 From: Kubilay Kocak <koobs@FreeBSD.org> To: Andrew Gallatin <gallatin@FreeBSD.org>, src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: Re: svn commit: r337709 - head/sys/net Message-ID: <ff85958f-b428-2ec1-0c65-0a3db01fd207@FreeBSD.org> In-Reply-To: <201808131413.w7DEDQFr049135@repo.freebsd.org> References: <201808131413.w7DEDQFr049135@repo.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On 14/08/2018 12:13 am, Andrew Gallatin wrote: > Author: gallatin > Date: Mon Aug 13 14:13:25 2018 > New Revision: 337709 > URL: https://svnweb.freebsd.org/changeset/base/337709 > > Log: > lagg: allow lacp to manage the link state > > Lacp needs to manage the link state itself. Unlike other > lagg protocols, the ability of lacp to pass traffic > depends not only on the lagg members having link, but also > on the lacp protocol converging to a distributing state with the > link partner. > > If we prematurely mark the link as up, then we will send a > gratuitous arp (via arp_handle_ifllchange()) before the lacp > interface is capable of passing traffic. When this happens, > the gratuitous arp is lost, and our link partner may cache > a stale mac address (eg, when the base mac address for the > lagg bundle changes, due to a BIOS change re-ordering NIC > unit numbers) Hi Andrew Can this be MFC'd? > Reviewed by: jtl, hselasky > Sponsored by: Netflix > > Modified: > head/sys/net/ieee8023ad_lacp.c > head/sys/net/if_lagg.c > > Modified: head/sys/net/ieee8023ad_lacp.c > ============================================================================== > --- head/sys/net/ieee8023ad_lacp.c Mon Aug 13 13:58:45 2018 (r337708) > +++ head/sys/net/ieee8023ad_lacp.c Mon Aug 13 14:13:25 2018 (r337709) > @@ -711,6 +711,8 @@ lacp_disable_distributing(struct lacp_port *lp) > } > > lp->lp_state &= ~LACP_STATE_DISTRIBUTING; > + if_link_state_change(sc->sc_ifp, > + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); > } > > static void > @@ -745,6 +747,9 @@ lacp_enable_distributing(struct lacp_port *lp) > } else > /* try to become the active aggregator */ > lacp_select_active_aggregator(lsc); > + > + if_link_state_change(sc->sc_ifp, > + sc->sc_active ? LINK_STATE_UP : LINK_STATE_DOWN); > } > > static void > > Modified: head/sys/net/if_lagg.c > ============================================================================== > --- head/sys/net/if_lagg.c Mon Aug 13 13:58:45 2018 (r337708) > +++ head/sys/net/if_lagg.c Mon Aug 13 14:13:25 2018 (r337709) > @@ -1737,6 +1737,10 @@ lagg_linkstate(struct lagg_softc *sc) > > LAGG_XLOCK_ASSERT(sc); > > + /* LACP handles link state itself */ > + if (sc->sc_proto == LAGG_PROTO_LACP) > + return; > + > /* Our link is considered up if at least one of our ports is active */ > LAGG_RLOCK(); > CK_SLIST_FOREACH(lp, &sc->sc_ports, lp_entries) { > _______________________________________________ > svn-src-head@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/svn-src-head > To unsubscribe, send any mail to "svn-src-head-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?ff85958f-b428-2ec1-0c65-0a3db01fd207>