svn commit: r337709 - head/sys/net
Andrew Gallatin
gallatin at cs.duke.edu
Tue Aug 14 12:57:17 UTC 2018
It could probably be MFCed if somebody could verify that it causes no
harm in 11.
I have no way to test lagg/lacp on 11, so I did not mark it for MFC.
Drew
On 8/13/18 9:58 PM, Kubilay Kocak wrote:
> 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://urldefense.proofpoint.com/v2/url?u=https-3A__svnweb.freebsd.org_changeset_base_337709&d=DwICaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=Ed-falealxPeqc22ehgAUCLh8zlZbibZLSMWJeZro4A&m=1cWDZxkgrPXh1V368in81GXeCx7nVoSbXY9khM0W2r0&s=psymcTlMReu-E0h72SEySpgbsxzW7KxTwtQDKS8ocBY&e=
>>
>> 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 at freebsd.org mailing list
>> https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.freebsd.org_mailman_listinfo_svn-2Dsrc-2Dhead&d=DwICaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=Ed-falealxPeqc22ehgAUCLh8zlZbibZLSMWJeZro4A&m=1cWDZxkgrPXh1V368in81GXeCx7nVoSbXY9khM0W2r0&s=SLnmQNpAX0j6HgJ5_yIcrQJAf9xCWtNqoEJ2qbOy7_E&e=
>> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"
>>
More information about the svn-src-all
mailing list