From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-f173.google.com (mail-pl1-f173.google.com [209.85.214.173]) (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 C8A4E3AA1B1 for ; Tue, 10 Mar 2026 03:02:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.173 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773111726; cv=none; b=HJrYnoAbUNgJWofUcxfc6oICAfpOFzTOUEwzPHQTM5xtdGdMjyZVIGpztr0lEVKP1g9eKsWYmNWZvFidkPVsZnM7k4qmu5I2+Nlz9APgmCXeFXB38Vo6KGhEK+cw4KU9UKOguoont0amIuoIsMUGBM1k7XJrH8WRpnyKGm1Y4/E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773111726; c=relaxed/simple; bh=/HorepIizoh0hKhgpr99KvxAfLGwEIYusSEtJs8vCNY=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=jDY61EF/nlD/8G29uQM2if76q0+eikNLQufUUzJhHB16h0xo8TdP3mdTm+BPxhnoQFnJS4BVewSkL2yKS8fz3DkR6pqvDnj+lMLX7YiRtiZWiogdV0EjzYOZDEVx0D/3BVylqUXKGPomV8hglhz78J7PusKIT8QuXpNssA1kpAk= 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=JTUdtqMZ; arc=none smtp.client-ip=209.85.214.173 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="JTUdtqMZ" Received: by mail-pl1-f173.google.com with SMTP id d9443c01a7336-2ae82df847bso24373925ad.2 for ; Mon, 09 Mar 2026 20:02:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773111724; x=1773716524; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=LEwKSMSqIEpe5269DAkL86L1DhMYaTmIOzSUDoQBS/g=; b=JTUdtqMZ/bVTnc0LWC9LdPJe/SsQ5os4nohO30T6eloEh10wyj8r17b17uJLmWrJw5 BFMUCFxxQOzwDpW5tXMH9pvHbRLZA1MzSofzxs2BQ1Y7F5vD0ZLxtvDmPK9sZenfKR+T v/K+RpwofJjNvoQMrYB/c/kFgohOJP7ujqVuvHvCZI1iRB0rX7xQkcee07SyO48byioO DREuJB4GbjRQwfV3yvjSPxq3K9P6n8+z3p0wJbfIraNn824b1ZuXzgsXtO4L4o4lRoH0 ro+vJL2BmBqfnyzhC0v6ZmQys/50kiGq0NsApmD3bexadnEoAc5n4CCJ+C43lGV+nWCe FynQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773111724; x=1773716524; h=in-reply-to: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=LEwKSMSqIEpe5269DAkL86L1DhMYaTmIOzSUDoQBS/g=; b=eeQEW+q4C0lU6SWBhYO3pW/14KCOsI85Tm3nkpn/3GzDiR1cZkj+CuB8Dsz7uR1HKB PRRDl0QkbyYab2Liv5DFyJru7tiCjbaNrY8MxNiRkc5Olf63A1Xl5N5vw48J9K9C+Mkx An3otI2aUyQ7y9o7c5xFQ+lqPMn78z5mkpOHvkjAiHe9zx0KXZG4Bx9lBHdL59JXVTPT aXAhigrf5lIVYwnMaEyFORnuot1cpwCcb5D6DUCgq+dQ2gwS9sNx4Xr36HXAAprTnDr0 5inBwCtASKrLWXZs8UHA7XMCT87J7ObkZnFvRmaogjRMOADuS3myM237f60LksvbRl0A uELQ== X-Forwarded-Encrypted: i=1; AJvYcCUd9omYt2ydNdBPqxEFZjHpZf/KrtDxWLjQ5PXx1tm8n5bgSD8qKKDjtqNKav0jcAIYiqafrvkZNgbCTXI=@vger.kernel.org X-Gm-Message-State: AOJu0YxYRpVI+UVGIvbwfa+7m1Ha4Do4Lfq3pJWJnAxHxocHaFa4UFCl PFU2CvIIjOUOpRCtzzdTMzZWETLa0A9CZETVqmJnLx+98PjCL//J4mbC X-Gm-Gg: ATEYQzyDfApkykVYMsjsu6Am9ZIZNJ1DkzuySfOpshhu1qsbeMb1V+8QFnMxyoR1Eay LX2KERTbKuNXmOlouGw8XdSKUv+Dgw4ZNIHKDPUEddbJMDhhTvVW3kyw/LGwqQPW4DLj8h+HtQu FbdMukhxT+DZyhsf371R8Cgd7cZ8oFqeZsqmaNcpC5sAgsnvXfsh/e75uPS2b4cDsiuKAoSLG6f e595ZFpqUR/oq+w92Hg3XI0zv9vIFTdrhHCNURocgCBqfxELVrGEolet4jUH3CynCrGiMBIXG6p ImUAoJ0JchaulOgXjV3nqDDF0u/dRKnFOInaJAuJ//JzaHDhBajqUhM7GlYDzWVN+EoDmkC5VQN HUeURwvenJFBoJ3/tjF4YsRG3Ecw31D5oBuCqHBwqf5/SKZLgN0xxWul6wToXdjLEwBhQ3o5UTA bPSpJRTm6z/5Hjy08plNsMjfnGYuk= X-Received: by 2002:a17:903:4b27:b0:2ae:6317:56e3 with SMTP id d9443c01a7336-2ae824f4d54mr124977875ad.28.1773111724083; Mon, 09 Mar 2026 20:02:04 -0700 (PDT) Received: from fedora ([209.132.188.88]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2ae83e9b9c6sm149702665ad.29.2026.03.09.20.01.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Mar 2026 20:02:02 -0700 (PDT) Date: Tue, 10 Mar 2026 03:01:55 +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> <949695.1772167347@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=us-ascii Content-Disposition: inline In-Reply-To: Hi Jay, Any comments for this? Thanks Hangbin On Fri, Feb 27, 2026 at 06:21:20AM +0000, Hangbin Liu wrote: > > Such a backup interface is typically carrier up and able to send > > or receive packets. The peer generally won't send packets to the backup > > interface, however, as no traffic is sent from the backup, and the MAC > > for the bond uses a different interface, so no forwarding entries will > > direct to the backup interface. > > > > There are a couple of special cases, like LLDP, that are handled > > as an exception, but in general, if a peer does send packets to the > > backup interface (due to a switch flood, for example), they're dropped. > > OK, this makes sense to me. > > > > > >> 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 > ^^ I mean with LACPDU exchange.. > > >partner should be in collecting/distributing state. What should we do when > > >partner start send packets to us? > > > > Did you mean "should not be in c/d state" above? I.e., without > > LACPDU exchage, ... not in c/d state? > > > > Regardless, as above, the situation is generally equivalent to a > > backup interface in active-backup mode: incoming traffic that isn't a > > special case is dropped. Normal traffic (bearing the bond source MAC) > > isn't sent, as that would update the peer's forwarding table. > > > > Nothing in the standard prohibits us from having multiple > > aggregators in c/d state simultaneously. A configuration with two > > separate bonds, each with interfaces successfully aggregated together > > with their respective peers, wherein those two bonds are placed into a > > third bond in active-backup mode is essentially the same thing as what > > we're discussing. > > In theory this looks good. But in fact, when we do failover and set the > previous active port to disabled via > - __disable_port(port) > - slave->rx_disabled = 1 > > This will stop the failover port back to c/d state. For example, in my > testing (see details in patch 03), we have 4 ports, eth0, eth1, eth2, eth3. > eth0 and eth1 are agg1, eth2 and eth3 are agg2. If we do failover on eth1, > when eth1 come up, the final state will be: > > 3: eth0@if3: mtu 1500 qdisc noqueue master bond0 state UP mode DEFAULT group default qlen 1000 > bond_slave state BACKUP ad_aggregator_id 1 ad_actor_oper_port_state_str ad_partner_oper_port_state_str actor_port_prio 10 > > 4: eth1@if4: mtu 1500 qdisc noqueue master bond0 state UP mode DEFAULT group default qlen 1000 > bond_slave state BACKUP ad_aggregator_id 1 ad_actor_oper_port_state_str ad_partner_oper_port_state_str actor_port_prio 255 > > 5: eth2@if3: mtu 1500 qdisc noqueue master bond0 state UP mode DEFAULT group default qlen 1000 > bond_slave state ACTIVE ad_aggregator_id 2 ad_actor_oper_port_state_str ad_partner_oper_port_state_str actor_port_prio 1000 > > 6: eth3@if4: mtu 1500 qdisc noqueue master bond0 state UP mode DEFAULT group default qlen 1000 > bond_slave state ACTIVE ad_aggregator_id 2 ad_actor_oper_port_state_str ad_partner_oper_port_state_str actor_port_prio 255 > > 7: bond0: mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000 > bond mode 802.3ad actor_port_prio ad_aggregator 2 > > So you can see the eth0 state is c/d, while eth1 state is active, aggregating. > Do you think it's a correct state? > > Thanks > Hangbin