Received: by 2002:a05:7412:5112:b0:fa:6e18:a558 with SMTP id fm18csp19959rdb; Mon, 22 Jan 2024 10:30:56 -0800 (PST) X-Google-Smtp-Source: AGHT+IH2/y5t6xVXWE2s1NNHRQL+b1ng4F8Z1aAvWIep3IXJJx+B4YSYbQQ1WSZurS37o6RSOgAW X-Received: by 2002:a17:907:160e:b0:a2f:c972:ccf with SMTP id cw14-20020a170907160e00b00a2fc9720ccfmr2551484ejd.29.1705948256234; Mon, 22 Jan 2024 10:30:56 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1705948256; cv=pass; d=google.com; s=arc-20160816; b=M0fMEgdBCcKFHZ1uHK5IchVqpMF0Zi/5hSEt6Bn23dFqe/EtTJYzrV2z30KzJE+jH7 y9sZ4hcXhL9mAtUHcka5k5FGuHnDqj01VN9rtlSsbDoLj3RrNzkI9f6J5E/7i1b683IB 0UDZaSDgBATm2W8bVRWWMDLKVd2vTo2k8F0wudIuhti1UxWPyV4w+Eb3k8A6rlMwKBG5 0JUg3vTOKaOiQJxL1X/NbKmd2rGpmJpKiM6y8Q40qTVbBo+09QIJ3QfEL0SP38iEl48M 3wJ07b6HQTx1Ry9MTRQNy5czTdaBqTP0oMhlK1wNX6POFRWqygtYjwfOQIynDAfZ3TES P4hw== ARC-Message-Signature: i=2; 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=S42orU1ihCUS+k0y1H/3lg3nrFnf+J6Z4OBgyaukGS4=; fh=Eplleqtu+n7Cm1p6ivXCmt2ljKtdLmzGsIQsHVcpRn8=; b=uHQOKO1FbMkfaSYsDyk7ZfICBhmYe9FBkTkwgrWoyzIWahT88xEfjK2TYvj/lUBB3T 34wuygoXWtx1cgmVygYMB4P5tAAqsyi+8l+i6nBtHzhCxHlRQCndfaqKGdjXBlkse09v UOHbWr9unsHGWPJcni4loAlBMLoatYa8Vwoxm7cH9/lNsDecjgqnh+w+hDXons08kKwe AqRNhx8PEGE4ov8EeoCjN7imdxcs03m+ylTDp8Llm9ulNPF0ULwZzxEHxuGZIenzTSJp Nu/11RpPVqo0s9tBuuS7JVOTfSsqeQtYt8PBERH0A4dCRHRHq8Wuc+1Ms6MvMkNAL+KN h9Cg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MLhjsgkp; arc=pass (i=1 spf=pass spfdomain=flex--aahila.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-33881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33881-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. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id ha19-20020a170906a89300b00a2eb2d0ab18si6004698ejb.273.2024.01.22.10.30.56 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 22 Jan 2024 10:30:56 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-33881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20230601 header.b=MLhjsgkp; arc=pass (i=1 spf=pass spfdomain=flex--aahila.bounces.google.com dkim=pass dkdomain=google.com dmarc=pass fromdomain=google.com); spf=pass (google.com: domain of linux-kernel+bounces-33881-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-33881-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 87FBB1F26740 for ; Mon, 22 Jan 2024 18:27:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 592625BAE2; Mon, 22 Jan 2024 17:58:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="MLhjsgkp" Received: from mail-yw1-f202.google.com (mail-yw1-f202.google.com [209.85.128.202]) (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 2BD8E3FE4C for ; Mon, 22 Jan 2024 17:58:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.202 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946298; cv=none; b=E/Du9XmAGznJHkNxqX1r7iSwVCMUboExxHIx7WG43NpMHaAa1Qh6WVl1v5x5wwva1SMbsbr83rCl52vlLTpsbekBmUDrxIYR2jEJVgvwqdhd0O6bNURzz1KFDSCQqxcW90gbXhGmzNGJwNhU9K/HH45SGecT9dpZ0ALlNa5KQG0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1705946298; c=relaxed/simple; bh=CkuGyzR0lrM5lkSkD/Qzrv2Ae6T6p+1m5NcVdimvwYQ=; h=Date:Mime-Version:Message-ID:Subject:From:To:Content-Type; b=mMP0hdOJqzma4OmjYUH4SgDyOMtHrApvyxn9AXyhCCulrYl4SligJ7STllyvqZKqDxlJNNX+u3HC6/01/+0IXk9Xqs2UkSsURo1X0vTfUkTuw6YF6DqJLjoDraH1ZjpW9cPPYs+Vfm0UvKk5XgY9yIMbSOwj5ilzJMV5b8WntzQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--aahila.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=MLhjsgkp; arc=none smtp.client-ip=209.85.128.202 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-yw1-f202.google.com with SMTP id 00721157ae682-5f0fd486b9aso40280687b3.2 for ; Mon, 22 Jan 2024 09:58:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1705946296; x=1706551096; darn=vger.kernel.org; h=to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=S42orU1ihCUS+k0y1H/3lg3nrFnf+J6Z4OBgyaukGS4=; b=MLhjsgkpBA3mfeeLcMWzUytC2w+h0DqJh59yP0yQkl6GqsMGezbzGbpunN+/ufm//d C6rrbRe4UeOdJoMcYJX4RCo+ptrxyMeQqO7bJyXBlw3PCXXrJBxP/q9fSW2PIiJKHkLS /D/yTq3axMQqCDJcYqUOnI+CGzdg+jQGXrJfICFJ0uXwzpT+TRlRr15lXQzv4kCeWMia jJYEyVYTKtut9nqGBP4q+V4O0B2kmv08Cm3uCHL2vuMLs/h8NzpYWUkFu34/vyZyLOCj YeEpS+NCUGc9iEUfrvGgx+xQc8nRdt+gTYpSutWsK+dqTVYs4wHDpLJvj7fQgNVslP3t NNxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1705946296; x=1706551096; h=to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=S42orU1ihCUS+k0y1H/3lg3nrFnf+J6Z4OBgyaukGS4=; b=hojpiY9U3fS0aRljjr450Tdu/o41o4UH4IyhdluaWpWUxnhLdHUHFt2rBKpHRft8Lm zG9xwnlHfWzPW9Jh+BYVNO+dxgsYwDMrpPcKaWBWdKV75WgIXPLzHhuGtTWA6l3+koiR 0fmBfY2pXMLquyy+LNTiJd74NwO/juuui5zyVmrRTnCcwS8lrojHNnHtvdepWyNfz5aU qKtg2q6y0Yf/z9AplIFwkm2NOI+Q+jwd0nNGliKBD67q710JsBLNS1AojDBXXlXOPGEO wS7Ixrc8wzmC62unFF2dTfiPV6FBH8S4oSuTu+1MCi9s1es3vTK5nY5j+eDKr5bUCfuS SxRA== X-Gm-Message-State: AOJu0Ywtklf5QqvVy+dmDccznN72nPhuE7S20aH5kP5H+RormbM/qMGq a8QRAydPBRjOuLjllY193kAd6KAuNz+EoV2jf91G37uyY4tmtoMzXUYA3ZjAsYvfnL3ZE/Rk462 sZg== X-Received: from aahila.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:2f3]) (user=aahila job=sendgmr) by 2002:a25:8b88:0:b0:dc2:3a02:4fc8 with SMTP id j8-20020a258b88000000b00dc23a024fc8mr280667ybl.6.1705946296094; Mon, 22 Jan 2024 09:58:16 -0800 (PST) Date: Mon, 22 Jan 2024 17:58:09 +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.429.g432eaa2c6b-goog Message-ID: <20240122175810.1942504-1-aahila@google.com> Subject: [PATCH net-next v3 1/2] bonding: Add independent control state machine From: Aahil Awatramani To: Aahil Awatramani , David Dillow , Mahesh Bandewar , Jay Vosburgh , Hangbin Liu , 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" Add support for the independent control state machine per IEEE 802.1AX-2008 5.4.15 in addition to the existing implementation of the coupled control state machine. 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. 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 | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Documentation/networking/bonding.rst b/Documentation/networking/bonding.rst index f7a73421eb76..e774b48de9f5 100644 --- a/Documentation/networking/bonding.rst +++ b/Documentation/networking/bonding.rst @@ -444,6 +444,18 @@ 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. + + This is by implementing the independent control state machine per + IEEE 802.1AX-2008 5.4.15 in addition to the existing coupled control + state machine. + + 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.275.g3460e3d667-goog