From owner-svn-src-head@freebsd.org Tue Aug 14 01:58:34 2018 Return-Path: Delivered-To: svn-src-head@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 0BC741061BB0; Tue, 14 Aug 2018 01:58:34 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: from mail-pg1-x52c.google.com (mail-pg1-x52c.google.com [IPv6:2607:f8b0:4864:20::52c]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 8126C77FC1; Tue, 14 Aug 2018 01:58:33 +0000 (UTC) (envelope-from koobs.freebsd@gmail.com) Received: by mail-pg1-x52c.google.com with SMTP id r1-v6so8364706pgp.11; Mon, 13 Aug 2018 18:58:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:openpgp:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O+vWZwfbftMCMFkN7HQ0etTg1x3CaIG9PNe1bP1eU90=; b=R3M/0fNURg+wCga5OcQgWoWng8260d+onbAJJ8ekmYegjJFUTnR+1CImhUs+DnyL/N jmIzIlVDCT6oxy/RrFlValvN5s/HENZ66AYSjRvChRtjWXm3ICKKl7NZz3goshSgfF0g 7sygSdPAdsqSLDYsbKUwkI3twTEYjdxnl4yctRjG/UWdGsgQIOUnHm3JaDuC+0fn+WMX Xu6PJxKaIfzHNmxrcE1MY3wZ/6mvj5VzSGZHWov8L3NaRsxLDawmtu03w8Fo47m6fP6P ZezgaAfyI1LSbxFjyECO0Lu5jD0ll59qZkd/0ErZ4a06MMLtWO7Tp68T9MUt+hRoL0l1 /vyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :openpgp:message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=O+vWZwfbftMCMFkN7HQ0etTg1x3CaIG9PNe1bP1eU90=; b=bLtUPem9siRP+irr/UW4WNZOGE05QVZyriUumnq36mY7N08Lxg/KQUPUvcLQ17NmjC kCvvGg1B3LUrAKNFYVTKwapKxKP+1R5hetj8rEbOTLEV6CU0XUVilbAAsjgzTr/yO0R4 aD9ZJPvdseeMWp0fCpyQHgubLhGPpI4r5mfreG+hyX8lZqC57ltrz2s7dG7tt0q3enxo nMXwh/iB081BKlkVeRblKnWWJ9qSW7vdwzPjS7KL6r/AfQePJ0LWUFkTU01K9v4puh3H yi8UB+xvKnAZ2vOtDMxT/QLus4wargr2D1noc3EdC28iYt9r4jqYbqYc3FZGpRSRjXPm PMmg== X-Gm-Message-State: AOUpUlERBmwXpz+5jpNra6ka6ZqlY7wJZ5Qe3EE+ZJR0HBmdlF9ddn9i J9OgEmon7DOWuUe6tcRT3OegujL5 X-Google-Smtp-Source: AA+uWPx8CIx/Usqxqu4pwrR0kmEnaDKhGerByDw2mCZiD4udec1FZu1vap2qArMgW9AyPRJ6smcPEg== X-Received: by 2002:a63:291:: with SMTP id 139-v6mr19021756pgc.365.1534211912468; Mon, 13 Aug 2018 18:58:32 -0700 (PDT) Received: from [192.168.1.107] ([103.107.240.136]) by smtp.gmail.com with ESMTPSA id s14-v6sm49795884pfj.105.2018.08.13.18.58.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Aug 2018 18:58:32 -0700 (PDT) Sender: Kubilay Kocak Reply-To: koobs@FreeBSD.org Subject: Re: svn commit: r337709 - head/sys/net To: Andrew Gallatin , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201808131413.w7DEDQFr049135@repo.freebsd.org> From: Kubilay Kocak Openpgp: preference=signencrypt Message-ID: Date: Tue, 14 Aug 2018 11:58:28 +1000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <201808131413.w7DEDQFr049135@repo.freebsd.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 14 Aug 2018 01:58:34 -0000 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" >