Received: by 2002:ab2:2441:0:b0:1f3:1f8c:d0c6 with SMTP id k1csp213972lqe; Thu, 4 Apr 2024 04:49:35 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUVgAHL6+ddV6a+tNnTD7/TeRGQdyp9hhC95Hs9QTkSVECc62BnAmghMp2ErM0HmPyEzL1lNhvHB5QkEHhtpDJcJDuPf3+QOFzLBHX4DA== X-Google-Smtp-Source: AGHT+IFvVZHMxnhKFPJNBdUcr+/hwB54cP4KlpSpaxB+b86FWoXXvQKYqhVxrhAgBCaVFUCI3WNp X-Received: by 2002:a50:ba82:0:b0:56b:dce0:c795 with SMTP id x2-20020a50ba82000000b0056bdce0c795mr1520449ede.4.1712231375348; Thu, 04 Apr 2024 04:49:35 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712231375; cv=pass; d=google.com; s=arc-20160816; b=zWil1j3vBMU24nqMms2h72ylsaWQGFtwYnlMr/fhJDq/PHZI0s4Zc7bHU1TQGl2kQc 0OywkL8gWZpqD41KtcyRejiMQJOIyp3dLKhhcTnp5WdaSoGc3/eH9t/8vv8h/FVdS2YQ jwleOth/qYM61DwB4L6hFTSf1s7HxzEbkempyZV0bEw1j3Jlrn2lygIAoq0lbocFo178 2xJYypotkb3GBAUY6X/8/YtzCGMf+WtHvvdGreEUeGRGPmgovyZClWh4LTXeGdm9rGdq wfFJ+9iuaPFZ8zFCpyswQY/gKhMwbQ//M4jFBb6V4MuRILl6FoCzclBP3xAvd9Ewljj9 XMgg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:to:from :dkim-signature:dkim-signature; bh=/x9kZleEmr9UJKwNDU1GNGFTF512qoraQs7ixZ7EWwk=; fh=vXHTVjr9zwqoP+2zPeW6jAyOUzn0B+8hxmn27Gute/U=; b=uHFhC+mtEi7Nv6RGmp5BA0u18grXoBKeZ+pXHrHcrxt1LVBQ2a3eZKJCrt1IWMLc2W XVLuDk55JEoLzCwIVxDtYWs/3a/PQjS8oQYYHizEp0pn2xt7nkSy44mRpSSWX3/Vm2qm n/FSwtPDLfw1IrNWdx1uZ44bDWTWkU6KCS7NiihnHMT8kmpktLMEuAwg278hyqyZZfuM oiIaZD5qG1HrWTXOUP1OWqB9OCdKiGfnQHg9G01XDSJhR8TP+SgAavLbIe1Jb4LFKqgS 50nSEApwEp6Cn29FjNApnW09EHnC+E+czN0OEWuiEP4qE+xAWIKEfuM81iTVAW1uMLPS Km1w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=gfTwZcZ0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-131333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id a21-20020a05640213d500b0056e097668easi1544811edx.101.2024.04.04.04.49.35 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 04 Apr 2024 04:49:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-131333-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=@suse.de header.s=susede2_rsa header.b=gfTwZcZ0; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; arc=pass (i=1 spf=pass spfdomain=suse.de dkim=pass dkdomain=suse.de dmarc=pass fromdomain=suse.de); spf=pass (google.com: domain of linux-kernel+bounces-131333-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-131333-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de 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 16A7C1F238F9 for ; Thu, 4 Apr 2024 11:49:35 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE33884D30; Thu, 4 Apr 2024 11:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="gfTwZcZ0"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="GmZuFjP+" Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.223.131]) (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 72E07745C3; Thu, 4 Apr 2024 11:49:21 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712231363; cv=none; b=kUOYTvzjSBftaQ6JAOlVfj7eW8B3strXSQwHf7rOCCBnLW6diSqi11YE82/1GuiwLKZRxJXE/gxiTZGIuJlic8xSNNB/PfMY6xnQK9b7qiPabrVXSGqxiJVgyaS6D4HO0ed382JRTs9fT99Jfx6PDmVv0t9taNl4BNFMBiY1tdg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712231363; c=relaxed/simple; bh=nsDNhESopgrlyLMUX6pXqRsQjNY64bQQgEYbtEgxgBE=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=geJC3byXHD/vXgJfbraktL1wpaa/e4dG4nMo7pwov0IyVssaLfJJemGMdQypoR4I4OUkSZxLRqoj6btegXHdbB0uxxQuXHxSavuvxqRGz+Yx0oGyr0PXxDUTNQN0DYFMdCKBn853hZ2kEClfRsYVU4T/oZJW/pu8G3G0Gle2Y4k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de; spf=pass smtp.mailfrom=suse.de; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b=gfTwZcZ0; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b=GmZuFjP+; arc=none smtp.client-ip=195.135.223.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.de Received: from imap2.dmz-prg2.suse.org (imap2.dmz-prg2.suse.org [10.150.64.98]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id A32E65D8F8; Thu, 4 Apr 2024 11:49:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1712231353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/x9kZleEmr9UJKwNDU1GNGFTF512qoraQs7ixZ7EWwk=; b=gfTwZcZ0rHANC8/CboSHxZMhI7ZD42XjKhsHofmdSqY7PGURAD3NHOD4+gH01veMPoEqcL gzX50WWvtMrq2wy7sOv4kbgsywX0tmCpkYHM154Hlfj3l/ewsiDIP7T8QpTwYZS6bYbLsI qdMr11itivVub0nyd/qC+Km1o1p1roA= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1712231353; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=/x9kZleEmr9UJKwNDU1GNGFTF512qoraQs7ixZ7EWwk=; b=GmZuFjP+6lm4IdGjqZGmtdEMX68Unvt5IgpnK4khuPUC9hHIfuM8gVH4L9Vm8wIkeHLEYK v1wxGKIRB+XDueDw== Authentication-Results: smtp-out2.suse.de; none Received: from imap2.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap2.dmz-prg2.suse.org (Postfix) with ESMTPS id 8E2DD13298; Thu, 4 Apr 2024 11:49:13 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap2.dmz-prg2.suse.org with ESMTPSA id Y5qKIrmTDmYZUwAAn2gu4w (envelope-from ); Thu, 04 Apr 2024 11:49:13 +0000 From: Thomas Bogendoerfer To: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH net] bonding: 802.3ad: Avoid packet loss when switching aggregator Date: Thu, 4 Apr 2024 13:49:08 +0200 Message-Id: <20240404114908.134034-1-tbogendoerfer@suse.de> X-Mailer: git-send-email 2.35.3 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 5.21 X-Spamd-Result: default: False [5.21 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; R_MISSING_CHARSET(2.50)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; BROKEN_CONTENT_TYPE(1.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.989]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.999]; RCPT_COUNT_SEVEN(0.00)[8]; MID_CONTAINS_FROM(1.00)[]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email]; FREEMAIL_TO(0.00)[gmail.com,greyhouse.net,davemloft.net,google.com,kernel.org,redhat.com,vger.kernel.org]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-Spam-Level: ***** X-Spam-Flag: NO If selection logic decides to switch to a new aggregator it disables all ports of the old aggregator, but doesn't enable ports on the new aggregator. These ports will eventually be enabled when the next LACPDU is received, which might take some time and without an active port transmitted frames are dropped. Avoid this by enabling already collected ports of the new aggregator immediately. Signed-off-by: Thomas Bogendoerfer --- drivers/net/bonding/bond_3ad.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/net/bonding/bond_3ad.c b/drivers/net/bonding/bond_3ad.c index c6807e473ab7..529e2a7c51e2 100644 --- a/drivers/net/bonding/bond_3ad.c +++ b/drivers/net/bonding/bond_3ad.c @@ -1876,6 +1876,13 @@ static void ad_agg_selection_logic(struct aggregator *agg, __disable_port(port); } } + + /* enable ports on new active aggregator */ + for (port = best->lag_ports; port; + port = port->next_port_in_aggregator) { + __enable_port(port); + } + /* Slave array needs update. */ *update_slave_arr = true; } -- 2.35.3