Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp308283rdb; Thu, 21 Dec 2023 09:39:15 -0800 (PST) X-Google-Smtp-Source: AGHT+IECSm4VvlkTn/PdjEvXRfRo1paYfN7vPhg+SUpCKreu+3xfxx2l9JnJT5VWix7QjrU6yoJZ X-Received: by 2002:a17:90a:3d82:b0:28b:c1f5:ab15 with SMTP id i2-20020a17090a3d8200b0028bc1f5ab15mr77872pjc.34.1703180355274; Thu, 21 Dec 2023 09:39:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703180355; cv=none; d=google.com; s=arc-20160816; b=nkN5k+0N0u+f421MzrvTpmPYr9WlNJ5NWwo3ypaXs17bEoPXlQVUQsbG0bQ0rm9dpK zNptFpIkA6ypiSBwxJKWDkqK4qIEAWFdkTheTCRveg8zkaCbdEp1lPH2zu6rF9bdMDwI k7HcMKpTWNAbNEcEVb7Jyvb1j6Guw3URueigx/Nx2fC9QLUcxsriJ7FS1cDjDl5LrTVg SyBzMhqRx9uHnz9yyYkv7YBGWuckUrQRClsaiYDp4sl4DEw6JHwLDJQK8qQArw/CPbqW NnTK7LTxFRl+6v7cClzkTwvV0b1b4zNKf0DEyoiD+QZqN/GOQda07zNz56ElxLHSfMxr wIbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=VNM7WC49g8Flgu3Id20DjlDk7pVznKUmaasugHiFlGU=; fh=uzGlc8m1Lnpc1HYuoOlZCjvvrUy+4oGk57dkHTJly38=; b=bF8FU/GkBNs+t9yKbw7aYW89KAJPPF/yP+du9Bcor1gtsZg4bU7z6rTCWCwDNKADcd FVUwG6/UvVya9c5c/QTCOrpkHzAwSvgHx6Ytw3iYRXfCwXIFpFd0css2KWjgtgqE8aaz gjPacRQPiV9rRwTr5f/CgtCNHGObinpvo/lTCg9iGY2z0cZxwnN1w1d6O2YH+bbG3V0H G7CpV4MDPuB5QWiOa9O29FyIJGHXRx380CpkU3cXtK8Wa2m/LTYZ4+cTNlp3DGryz51f ztXY0cuVVDpKqcm6PvZ1N/yPL759WDo4+Ivo6zmW3SVFtLk20URMs3UJ67eGE3yied0I kUiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d36LhB8w; spf=pass (google.com: domain of linux-kernel+bounces-8865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id on1-20020a17090b1d0100b0028ae45912afsi2036287pjb.50.2023.12.21.09.39.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Dec 2023 09:39:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-8865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=d36LhB8w; spf=pass (google.com: domain of linux-kernel+bounces-8865-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-8865-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id C3C16B2455E for ; Thu, 21 Dec 2023 17:37:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D58764AB4; Thu, 21 Dec 2023 17:35:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d36LhB8w" X-Original-To: linux-kernel@vger.kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6C1F973197; Thu, 21 Dec 2023 17:35:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6EA8C433C9; Thu, 21 Dec 2023 17:35:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1703180143; bh=ZwPaf2YiUAFo26j3q+Xlvg2stXM5VfmpeeF0eOmjf18=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=d36LhB8whBedTR6PvrUN8kBNxy5VVeXx/gnDo/RuoDW7EwBn3Ignp76RRvD4Kf+7m 3R8//3v7rzp5IqRQ/O1f2+4UfRIKrHaULzME/PN/3jAiFEYq0hmVGkBZ55+l9C3rp1 eubtwp0zXx1MvMSr3TMoB3j/tef37M07mxbt898/pKr69KHkyEyLc4RZox8yILGLTr jNI6k4z88V5BvpCsX/drBcZ05xGDp3RjhV9O1JuhZRWxa4Qfjm5vtvEvz1oX6IWqhK H85PInpBeHPVdrfZlinvKJv7ynW3tQblOcn/zlqNviuwu3X8wIe6V8yMwCYhzX29oh ggf+TsBmwf6aQ== Date: Thu, 21 Dec 2023 18:35:31 +0100 From: Simon Horman To: Aahil Awatramani Cc: Mahesh Bandewar , Jay Vosburgh , Andy Gospodarek , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Martin KaFai Lau , Herbert Xu , Daniel Borkmann , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH next] bonding: Extending LACP MUX State Machine to include a Collecting State. Message-ID: <20231221173531.GA1202958@kernel.org> References: <20231221023650.3208767-1-aahila@google.com> 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: <20231221023650.3208767-1-aahila@google.com> On Thu, Dec 21, 2023 at 02:36:50AM +0000, Aahil Awatramani wrote: > Introduces two new states, AD_MUX_COLLECTING and AD_MUX_DISTRIBUTING in > the LACP MUX state machine for separated handling of an initial > Collecting state before the Collecting and Distributing state. This > enables a port to be in a state where it can receive incoming packets > while not still distributing. This is useful for reducing packet loss when > a port begins distributing before its partner is able to collect. > Additionally this also brings the 802.3ad bonding driver's implementation > closer to the LACP specification which already predefined this behaviour. > > With this change, 802.3ad mode will use new > bond_set_slave_txrx_{enabled|disabled}_flags() set of functions only > instead of the earlier one (bond_set_slave_{active|inactive}_flags). > Additionally, it adds new functions such as > bond_set_slave_tx_disabled_flags and bond_set_slave_rx_enabled_flags to > precisely manage the port's collecting and distributing states. > Previously, there was no dedicated method to disable TX while keeping RX > enabled, which this patch addresses. > > Note that the regular flow process in the kernel's bonding driver remains > unaffected by this patch. The extension requires explicit opt-in by the > user (in order to ensure no disruptions for existing setups) via netlink > or sysfs support using the new bonding parameter lacp_extended_mux. The > default value for lacp_extended_mux is set to 0 so as to preserve existing > behaviour. > > Signed-off-by: Aahil Awatramani ... > @@ -1906,6 +2005,46 @@ static void ad_initialize_port(struct port *port, int lacp_fast) > } > } > > +/** > + * ad_enable_collecting - enable a port's receive > + * @port: the port we're looking at > + * @update_slave_arr: Does slave array need update? The line above documenting @update_slave_arr should be removed as the parameter is not in the function definition below. > + * > + * Enable @port if it's in an active aggregator > + */ > +static void ad_enable_collecting(struct port *port) > +{ > + if (port->aggregator->is_active) { > + struct slave *slave = port->slave; > + > + slave_dbg(slave->bond->dev, slave->dev, > + "Enabling collecting on port %d (LAG %d)\n", > + port->actor_port_number, > + port->aggregator->aggregator_identifier); > + __enable_collecting_port(port); > + } > +} The above is a pretty minor problem, but the bots are likely to complain about it, so please fix it in v2 after waiting for feedback from others on this patch. When posting v2 please target it at the net-next tree. Subject: [PATCH net-next v2] ... -- pw-bot: changes-requested