From owner-svn-src-all@freebsd.org Tue Aug 14 12:57:17 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5857A1077A00; Tue, 14 Aug 2018 12:57:17 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from duke.cs.duke.edu (duke.cs.duke.edu [152.3.140.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id EC22F8DCF9; Tue, 14 Aug 2018 12:57:16 +0000 (UTC) (envelope-from gallatin@cs.duke.edu) Received: from [192.168.200.3] (c-71-56-186-158.hsd1.va.comcast.net [71.56.186.158]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: gallatin) by duke.cs.duke.edu (Postfix) with ESMTPSA id 6C9D0270040A; Tue, 14 Aug 2018 08:57:09 -0400 (EDT) DMARC-Filter: OpenDMARC Filter v1.3.1 duke.cs.duke.edu 6C9D0270040A Authentication-Results: duke.cs.duke.edu; dmarc=none header.from=cs.duke.edu DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=cs.duke.edu; s=mail0816; t=1534251429; bh=mRmD7TFDxqN7WaritmBTsip3hcbQUQKxAchDxHISB3E=; h=Subject:To:From:Date:From; b=OsGhULrZzy9nWzfdE2O9G/myJ0T+lEN4ikNcWaRplGJlCUfydGHyp+khWFEZ5cxte c0T6hBe/AleXtppVDkKKun8tsrXXrsMEj3INnOQ/Ux4lloZXanpyaZx6s+RZ2EWbKm OkFVWsDqpR2YetszKtnVry7uJ2CeETwRvDkFcTRMUqrRKLjVp+4dFUhJnq16sU3RhA +y9UC2U9hCNkrBEGTBSK1k0eLTlyjAxi0u6upNnFgMAtoQkkIo8FVIwXgdSKO0rGrT XtAdGcQKcECFWMhScpsNJ4LFOyxSEMtwHHP0+GLO9qdzoXL6NSP/o9u98SgtQUllQt 1N/thuUhQxbcQ== Subject: Re: svn commit: r337709 - head/sys/net To: koobs@FreeBSD.org, Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808131413.w7DEDQFr049135@repo.freebsd.org> From: Andrew Gallatin Message-ID: <1aa4cbd4-e241-1ad3-7a12-f29d536bc83a@cs.duke.edu> Date: Tue, 14 Aug 2018 08:57:08 -0400 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 12:57:17 -0000 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@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@freebsd.org" >>