Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp8019182rdb; Thu, 4 Jan 2024 16:07:21 -0800 (PST) X-Google-Smtp-Source: AGHT+IFeKqpJiDaiKi4NxDVsT/Vh7I6d9Kj3nSER+QZ4Zhz/aeLfu9wR4GOvw5NsaPyslQd7/ku4 X-Received: by 2002:a50:c2ca:0:b0:557:da7:b0e8 with SMTP id u10-20020a50c2ca000000b005570da7b0e8mr578874edf.76.1704413241728; Thu, 04 Jan 2024 16:07:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704413241; cv=none; d=google.com; s=arc-20160816; b=uzi9O3Yw1oXPgt+5Gm2xa0ZJvxUN9hA/FRUSIclAvbPpi10eH+03Jhw+2V25xJpUhg OtYYuIZ8y1U1ZFQe19yQy/8rgQ1naDsaTamBfZjk6sWz1qHcaLPiVmWF/CEpNEqlinlA 7lPNmbTlXS769rMQ+P5AgQYZFG0JPrThs7rAs3bKLewkR1+secLvCspW0jy2aLfkJ+4K feZgROpfuD1TJT4UacvGzU0PGg10dWkTEbKleFtn2DqpcYpVeD8/+9Z9vA7R93Kpapw2 +N/UJAV/hAVeBPv1QzMsAyveCtAlEeDng1rLSUCJqe4EiD7/UYIblvzM2+BS4Quh75NT 4K3w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=to:from:subject:message-id:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:dkim-signature; bh=ZCm4qbqYLKL0X2tawwVQnjcJ74n/29xH0+vMdcngW8c=; fh=GyVGW8U1MvtbEyh/ldAgs7Rk0zl8uwbRC+ltCCnLM7k=; b=Rf6QnxCgdZNOwBMSmPP2ZEDOxwkcfmtbt9YIqSzLI60HqXn+vMaq+yYj72VPiPNeYP jVoNnMKaWbpqfInJBsUsPxNhnjfLDPNMl3qkfOAHpguk2T0B9cOSdUxAGjWHB75x483q KU/Glk3lHHzwWdLR7wguXGCKktHn28RcrnVxgp32Pmhz742Dz+8KZbvTF+wHZN4EYhEU /gWlHcNECbM924NQGg4atmUSGpqC/qwX1i036v+0jhUPYXkUsHAk8zqEltuGKD7nrhow OnpHxjjZm7d5d5W5/hUeIF4fVIfoU95diRgZiwe+3kXJIK1Q+gYSAG7THJ0VHtodQdqi XDKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mNUcjAqj; spf=pass (google.com: domain of linux-kernel+bounces-17347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id l19-20020a50d6d3000000b0054cd3ad8197si191306edj.306.2024.01.04.16.07.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Jan 2024 16:07:21 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-17347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=mNUcjAqj; spf=pass (google.com: domain of linux-kernel+bounces-17347-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-17347-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 7ACC61F22AC5 for ; Fri, 5 Jan 2024 00:07:21 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3D6AC2119; Fri, 5 Jan 2024 00:07:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="mNUcjAqj" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-pg1-f201.google.com (mail-pg1-f201.google.com [209.85.215.201]) (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 376891FCA for ; Fri, 5 Jan 2024 00:07:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--aahila.bounces.google.com Received: by mail-pg1-f201.google.com with SMTP id 41be03b00d2f7-5c65e666609so952533a12.1 for ; Thu, 04 Jan 2024 16:07:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1704413222; x=1705018022; darn=vger.kernel.org; h=to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=ZCm4qbqYLKL0X2tawwVQnjcJ74n/29xH0+vMdcngW8c=; b=mNUcjAqjjvGF5xpDOMseDVfN7pidAvcDn8p7kxy/x5Bdu8hGrAxDFUyALF3G9VVPt9 7A9UOgTMNICN4XfcSibsZJFqevzeUebtcwSQ54z76f8/QKtXF2mOdUx63kXLWtH5jzMj G9jnxMyzXf5LzCBZJqoSpSqXjboQAZS8JqOq1E8dShtX2JiCwUhEK83omsumSpSquATp oTWHipD7KjgO1ox5zJ7Nu1SY0K4iQ37eQjuXVjutPMc4WpsAHED/BNMkfb+OvfIr9vxN t5picz7zohze/dJNHm+bs3Q0ebLtvvc0On42MA5jbOQEEzHtug7dYGni8aclLLSaZLl0 mpbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704413222; x=1705018022; h=to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=ZCm4qbqYLKL0X2tawwVQnjcJ74n/29xH0+vMdcngW8c=; b=jsaOutFVka3yQnJDNMYSN9Rmqsg4CwZb2IZLijhD495BZuFZ86Tl7O110vACBT82IN jzycmyTX2l/dwB5AzOzX3/h2pCaejbNddUf5jN0Yy2AvhQR+Ry/xxZ5T0CDY7UY33p8U WrUATot48LD/7T3L0VKKF8vNiC6TVC3uGLjDXarUbC6/CYYQ2xFiw5DbecNlc3l4MKcx BfMZixKcqkUTjFIkAUYoERVndYtmu2Fgi2Pj1gnPdWTYfiqWoDzzTm++S/uc+aHdoUau lG5Wj2TkDkhUROz0enVe9fYzub8TG0iYuelhjFMI8nzupS4VXspznobtHeZbCx/M9KdL FhYg== X-Gm-Message-State: AOJu0YxryDxTXEfsAgbi8TCV6ZUzo3C43rceqf0C/QiBNXiIbnstrT6F 9dgdE8UW1wuips/rWpr7wAddnDbtJrO9v7KQUQ== X-Received: from aahila.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2f3]) (user=aahila job=sendgmr) by 2002:a05:6a02:491:b0:5ce:474:352b with SMTP id bw17-20020a056a02049100b005ce0474352bmr7789pgb.5.1704413222131; Thu, 04 Jan 2024 16:07:02 -0800 (PST) Date: Fri, 5 Jan 2024 00:06:31 +0000 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 X-Mailer: git-send-email 2.43.0.472.g3155946c3a-goog Message-ID: <20240105000632.2484182-1-aahila@google.com> Subject: [PATCH 1/2 net-next v2] bonding: Extending LACP MUX State Machine to include a Collecting State. From: Aahil Awatramani To: Aahil Awatramani , David Dillow , 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 Content-Type: text/plain; charset="UTF-8" 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, that is currently the implementation only supports coupled control. Added 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 support using the new bonding parameter coupled_control. The default value for coupled_control is set to 1 so as to preserve existing behaviour. Signed-off-by: Aahil Awatramani --- Documentation/networking/bonding.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst index f7a73421eb76..cb3e6013605d 100644 --- a/Documentation/networking/bonding.rst +++ b/Documentation/networking/bonding.rst @@ -444,6 +444,14 @@ arp_missed_max The default value is 2, and the allowable range is 1 - 255. +coupled_control + + Specifies whether the LACP state machine's MUX in the 802.3ad mode + should have separate Collecting and Distributing states. + + The default value is 1. This setting does not separate the Collecting + and Distributing states, maintaining the bond in coupled control. + downdelay Specifies the time, in milliseconds, to wait before disabling -- 2.43.0.472.g3155946c3a-goog