netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Hangbin Liu <liuhangbin@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: netdev@vger.kernel.org, Jay Vosburgh <jv@jvosburgh.net>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Simon Horman <horms@kernel.org>,
	Mahesh Bandewar <maheshb@google.com>,
	Shuah Khan <shuah@kernel.org>,
	linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net 1/3] bonding: set AD_RX_PORT_DISABLED when disabling a port
Date: Thu, 27 Nov 2025 13:33:03 +0000	[thread overview]
Message-ID: <aShTD0PAqLOtQChR@fedora> (raw)
In-Reply-To: <63768c05-e755-48fe-a4be-9715f8b5ab2b@redhat.com>

On Thu, Nov 27, 2025 at 11:15:24AM +0100, Paolo Abeni wrote:
> On 11/24/25 5:33 AM, 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.
> > 
> > The __disable_port() called by ad_disable_collecting_distributing()
> > does not have this issue, since its caller also clears the
> > collecting/distributing bits.
> > 
> > The __disable_port() called by bond_3ad_bind_slave() should also be fine,
> > as the RX state machine is re-initialized to AD_RX_INITIALIZE.
> 
> Given the above, why don't you apply the change in
> ad_agg_selection_logic() only, to reduce the chances of unintended side
> effects?
> 
> /P
> 

I think setting port->sm_rx_state = AD_RX_PORT_DISABLED and
slave->rx_disabled = 1 should be an atomic operation. The later 2 functions
just did similar stuff(not same the fixed one) on other places.

Thanks
Hagnbin

  reply	other threads:[~2025-11-27 13:33 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-24  4:33 [PATCH net 0/3] bonding: fix 802.3ad churn machine and port state issues Hangbin Liu
2025-11-24  4:33 ` [PATCH net 1/3] bonding: set AD_RX_PORT_DISABLED when disabling a port Hangbin Liu
2025-11-27 10:15   ` Paolo Abeni
2025-11-27 13:33     ` Hangbin Liu [this message]
2025-11-24  4:33 ` [PATCH net 2/3] bonding: restructure ad_churn_machine Hangbin Liu
2025-11-27 10:36   ` Paolo Abeni
2025-11-27 14:06     ` Hangbin Liu
2025-11-27 15:29       ` Paolo Abeni
2025-11-28  0:26         ` Hangbin Liu
2025-11-24  4:33 ` [PATCH net 3/3] selftests: bonding: add mux and churn state testing Hangbin Liu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aShTD0PAqLOtQChR@fedora \
    --to=liuhangbin@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=jv@jvosburgh.net \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=shuah@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).