From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 107AE290D81 for ; Fri, 27 Feb 2026 02:31:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772159475; cv=none; b=nk3TWQ2i0DFkcd8M38uRx3a85OS4yB3ii+ldnEJQu0nYv2geUjnG3M6UEK4ZaCKWazqlzMl0EBcjIJmchxXPaN15yOElQUJ41uqySxLkE0R7VYHNsLTSQaMJ1xqRwQl5wP/kdqXbtyZ+R7AFB779uGMbvQtqv4UJ0k4vjcnRdEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772159475; c=relaxed/simple; bh=4JHlwT/Yu7ajcqtEUyhud7CE8o2J493+1Itcav9ilXk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=LJEZAZrFeCBFLAjyIw+YVdaBmxQYpfmmMkvzlpAsfTOlcUd2H9fG79hqt5raQGfy9XDeBhfManHkrkFoMW/z809Y7rTyWh2sxDKpa8fypaGxqWohWCU5L8LVbXCeMCHbVNcU2SviZhkHA6GRaXRqrKlXhF7IB2HgFbMIM7JalDE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=dGHRCG76; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="dGHRCG76" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-8249fc726e9so958077b3a.2 for ; Thu, 26 Feb 2026 18:31:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1772159473; x=1772764273; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=QWTjg9cfCivxy21OkK4YMlplEZZRzQTGceSoJr86ceY=; b=dGHRCG76hRvK7Wrlw0HNSvnJ4sFueIKDAQKc511NJZMqyIgdfvBrzjm3RsAl8G9AyQ Pjv2Siu6wqTmSpWesahJBdshr2VzRQ4iWjAkPvh+OpB4Kzqq05bRBoP3YMUSNhg7WaQk Vjt5t9KpFZtFL5ee7noyv8xwyk2QCs4KWsLjJTxKqQLreKE0hJXby1H5DsbHgJavBPvS cfanH8W713uyQAKFCP1UxU86Am3N7FlAZ35wEKGseXwy/rKvRv4Cr8sKVnfGCsyVMTjR W4J90lKtlbkYLpzlUJNMywPOziQfK0aZLF2o5vDsj+LulSjLIAGZouM4lppUwhMEjW10 nPzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772159473; x=1772764273; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=QWTjg9cfCivxy21OkK4YMlplEZZRzQTGceSoJr86ceY=; b=qf4fr06GsFBuAHIaHwW6ZUOEPRio6keP/7fg0fUtsP+OgCko/U86MAWUNHc9pE74Lv vBlrzf2rvraWXb2gVw/bvCDG21OD1iO+cR9N9yw1emqM5JHEzqsecMd4EmYeMsjIEXBf 7jpI4Q6aT4aPUNacmvlYkg+8NT/nunh+YlqdHbIuhwHdADnyfmG8ZJiyQ8c7qqmvLOzj bIHFtkCjDbDAr3t+tWjkz/nNymGDZ3qf+EfiMnpuvPpDihe88uIz6D460UmeEITjEvDj 0WFXNkd3RYCk0X4saPxjXQ9nvPwM+e01aCCGI6j9uHoDSK+3zqpzn4PMB7H+GOsEVVqw oJcQ== X-Forwarded-Encrypted: i=1; AJvYcCWsqYqQ4mxy1MaRLJum5XByQGV0hCJIG4oT/h3HcsgQj+iROKUIEpyYtAYup1a6RNUp8YsKQffoXPrQVxQ=@vger.kernel.org X-Gm-Message-State: AOJu0YyvAgxiRUUTmreaFBKsNkHsM0jyFosvhEWHrrpTo+Syu1FkTDMG hffZJiJmMR91YgyIUZAduJI+8Rl24wDwWHIFi+PPCWnpjC4ck7IWA+f5 X-Gm-Gg: ATEYQzwBxZIMVbKEV6S7esP6Hild/NKICJ2suU/88p5tzUP3GgbJOkHN5n406YppSwO IEHcSqGK9UIcK8LrlWnyVaLXWS0NRQ7ERzWJoKkUcaHCK6jFd8lZ+THk70+P9UX0j7qi+sNZJjr J+RuIk8X1mcqw/HlSQ/QJmNy4rozHP0vJr2QY9OgMiOr4O89Gv8o5EJV7asGy2qTib6a+kjgVbG K/Aft1flyq90kw28pZXTBRgV8axVwrfYDUMD5BVAGsgteS2+yPHMLc1FpxTxmzqnFs2SGGA7Bz6 +fEMGpAc/qNFXZdoL8j1lcbDRiWgQwsXX1XWpdA+Xdg0EL0q6sFV1WPGqr2sEL5bg0balrCwm3U Ajkn8nm6ErMZSS/3yvsaHXBG8VQqTvZNHZdauSla1XHeX7jXblFbmcZs3yaHbTeqWiydEmhFkw6 RyDMJ6iPWNsT5C0/lpJWl1apgmVSc= X-Received: by 2002:a05:6a20:a12c:b0:38b:e68f:4648 with SMTP id adf61e73a8af0-395c39e0edfmr1273869637.14.1772159473315; Thu, 26 Feb 2026 18:31:13 -0800 (PST) Received: from fedora ([209.132.188.88]) by smtp.gmail.com with ESMTPSA id 41be03b00d2f7-c70fa5e4abcsm2970390a12.5.2026.02.26.18.31.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 18:31:12 -0800 (PST) Date: Fri, 27 Feb 2026 02:31:05 +0000 From: Hangbin Liu To: Jay Vosburgh Cc: netdev@vger.kernel.org, Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Shuah Khan , Nikolay Aleksandrov , Mahesh Bandewar , linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: Re: [PATCHv3 net 1/3] bonding: set AD_RX_PORT_DISABLED when disabling a port Message-ID: References: <20260226125331.28147-1-liuhangbin@gmail.com> <20260226125331.28147-2-liuhangbin@gmail.com> <942584.1772155015@famine> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <942584.1772155015@famine> On Thu, Feb 26, 2026 at 05:16:55PM -0800, Jay Vosburgh wrote: > Hangbin Liu wrote: > > >When disabling a port’s collecting and distributing states, updating only > >rx_disabled is not sufficient. We also need to set AD_RX_PORT_DISABLED > >so that the rx_machine transitions into the AD_RX_EXPIRED state. > > > >One example is in ad_agg_selection_logic(): when a new aggregator is > >selected and old active aggregator is disabled, if AD_RX_PORT_DISABLED is > >not set, the disabled port may remain stuck in AD_RX_CURRENT due to > >continuing to receive partner LACP messages. > > I'm not sure I'm seeing the problem here, is there an actual > misbehavior being fixed here? The port is receiving LACPDUs, and from > the receive state machine point of view (Figure 6-18) there's no issue. > The "port_enabled" variable (6.4.7) also informs the state machine > behavior, but that's not the same as what's changed by bonding's > __disable_port function. Yes, the reason I do it here is we select another aggregator and called __disable_port() for the old one. If we don't update sm_rx_state, the port will be keep in collecting/distributing state, and the partner will also keep in the c/d state. Here we entered a logical paradox, on one hand we want to disable the port, on the other hand we keep the port in collecting/distributing state. > > Where I'm going with this is that, when multiple aggregator > support was originally implemented, the theory was to keep aggregators > other than the active agg in a state such that they could be put into > service immediately, without having to do LACPDU exchanges in order to > transition into the appropriate state. A hot standby, basically, > analogous to an active-backup mode backup interface with link state up. This sounds good. But without LACPDU exchange, the hot standby actor and partner should be in collecting/distributing state. What should we do when partner start send packets to us? > > I haven't tested this in some time, though, so my question is > whether this change affects the failover time when an active aggregator > is de-selected in favor of another aggregator. By "failover time," I > mean how long transmission and/or reception are interrupted when > changing from one aggregator to another. I presume that if aggregator > failover ater this change requires LACPDU exchanges, etc, it will take > longer to fail over. I haven't tested it yet. I think the failover time should be in 1 second. Let me do some testing today. Thanks Hangbin