Received: by 2002:ab2:1347:0:b0:1f4:ac9d:b246 with SMTP id g7csp144215lqg; Wed, 10 Apr 2024 19:45:14 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXtu6VCSD/b2D4wozgWMpv8+rpjd7neCZ6VZ6dN1U5WS5XpimqQJvAkOaxKxkZyuCNWg/dkH/bGcJMtEWEb72NMgmatnBNWBYkIvNAnZw== X-Google-Smtp-Source: AGHT+IEpINubrGg922sD2WMfHieKW10y38B8bAVNfd3sxabBwRdxY4zsMwSJaVjs+a0eyLtnovgM X-Received: by 2002:a17:902:cf0d:b0:1e3:dfdc:6972 with SMTP id i13-20020a170902cf0d00b001e3dfdc6972mr5094886plg.9.1712803514434; Wed, 10 Apr 2024 19:45:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712803514; cv=pass; d=google.com; s=arc-20160816; b=IwA/4AAtZjU9+BaIC/V4JNGi2dPyZAMjgIwdpA++eNB6pEfU/T2znWQORRZsngjqrM SxoJjrQo5moINPHT56R7SEQbuL4sHmaNN+qYGoT/xpYFe74BaiRLLab4AYyIuEAmCzwz 3HmiLsh+zPtAABHP7suNncdxknNi0NQL2hQBzDTvhDMW+Zfq6RBVywKHh08EMmNdCIsf GYda6AnC/hdDQR/8upbex6n8c0zm/dt0p6v96Wk93SpkAgxSVi91TjXuEmllVrRRe3Iw KIc43EBNaZmzKCeem1pqsPD0VY0wzgkHFQHKkcVwtoEVAFBOIMrSkhmUfkjIxaVxUoBK eDPw== ARC-Message-Signature: i=2; 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=MxeKZky29m/Yl8zWqwSaHE2GGyVpGyAaXJSZ2cyLZys=; fh=q9cdrhghAWWIS14g1uTMlUAfCq5g6VT0e7EIyGKRkKQ=; b=O8tzE5jYDE1dzZm/3P08DS40F+6d1iQQdDzBHGY5o9apSjmPaFtL6aE/5zfZUTJY9g qlj8+SMYDRxPBYPi5g49q4UvlE1mC3KdbxHvFOUK2vxK2r5ru4Fhs4udOBgUY37FxcNC eiPTcH7kEqzzfbGWHsr/U7mZvEnk1UBNYhRoBi0fDBVAG/XIpRshw/oirpxEB7r0tWmz 6JngXtqOL5pgJC3mBe45goR3gUc7SZvy0Adtn/Vp5Wy8ii50m3jZmbDzTawo4tuVqCmA hizIgOTq/FxfFXHVqPGdLhiG8n6CJD+fSDsOIRNd4zHRmO2/XjyEv74QhhjHHLEorcde /oKg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="eZJd3cY/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-139662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139662-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id e2-20020a170902cf4200b001e4779c8002si398192plg.122.2024.04.10.19.45.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 19:45:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-139662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b="eZJd3cY/"; arc=pass (i=1 spf=pass spfdomain=gmail.com dkim=pass dkdomain=gmail.com dmarc=pass fromdomain=gmail.com); spf=pass (google.com: domain of linux-kernel+bounces-139662-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-139662-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 6BD6DB21416 for ; Thu, 11 Apr 2024 02:45:10 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BC01C13B2AB; Thu, 11 Apr 2024 02:45:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="eZJd3cY/" Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) (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 8AABB53E22; Thu, 11 Apr 2024 02:44:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.174 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712803500; cv=none; b=drt40FOWFpGuUqe/9WeM/ZwZA6/i53P3geviRHWVgV3YksG1qDv+O2g/yFuXFFrOpbmYUhXaFVpS0IbPjs88PahBR9OcbuAQmvmdwV2v+h2/wQCW9vpjHGikmExukqwPWlhGE3lskpE4rCR9AsdFlBele269nf/3KXIXo+ZDzkM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712803500; c=relaxed/simple; bh=+snlzPi37L30h9+Et4ccL1soWIQ5tawzfM+/S5eTLSo=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=qBjYsAOk5/FMWMLX+gV3E1DxetzXvbLQhTBUqsSMyCdSv6KcBcE0op84FMe9EuoFF9u8y5syORhzDOpR4Qf2CnOheUuB70wO5ceo2fmjxSF9U5POPXTrbbck7zPF7rZvn2eS2eWHOnTaGJ0/6w5w5ActUNBD9QRpRD9Ax9aLk/w= 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=eZJd3cY/; arc=none smtp.client-ip=209.85.214.174 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 Received: by mail-pl1-f174.google.com with SMTP id d9443c01a7336-1e220e40998so48321685ad.1; Wed, 10 Apr 2024 19:44:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1712803499; x=1713408299; 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=MxeKZky29m/Yl8zWqwSaHE2GGyVpGyAaXJSZ2cyLZys=; b=eZJd3cY/SBhgwNeKXQBFZ6fc2Jj9bP++leGZEppi6dQBkC22lxMjxSE+QefRvb39iC k++ulvXBywyk5cC+dr2i2MmeU5+AaSYkqkITr5bkLTsCt5AhYvMNh2sM8jZOAVu9Q90O Zu/E+Jkr0pHy/tWb4lEPI0zZxb1wJYgL2ZN54cWUdfBNqNUPxo7g6AtkVmNQC4BF9hEm EC9jpupZ2/aa5wd9ukigUWB6miR2tT2d39Lei8RYk0ZP2wpQHrzLxHfippYfXxMhLTtl 064K9gQggX1qHJj/yqelk000SDrnytsG3n6DM2yEXKghDZVKJbYnls28QWd8C+8vlrOT f3Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1712803499; x=1713408299; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=MxeKZky29m/Yl8zWqwSaHE2GGyVpGyAaXJSZ2cyLZys=; b=oU+30QukHWMNlADLsv7J8+bpk8gZ/HmxdZ/N8NKRVhQnpkJlbR2h8ZyBzhWAObp5kz 2JA3yW2RVsYpg8YZA/WFaWwdP+YsYpvb+YZPyYyaZ6Vz1E/88YAPdagEn8ylf0i2TCaT WSXMMcLd1nB+srxli/75hsyJZbzR1nWXO6zqHIHI1Rcp4m2405KGGJmoy6jpLsvBFmp2 YzyJ7RX5ZUCsbPJWPCmm5r/21khk45d24RK2thmjWeoMrac9M5I1DFds3NLXQoEMkqHS EfiMn5VKTvP4DnZWcjkkja87hESaI6gYBopwbOu8zf30yoB0tadkQlIqKnKNJiSwe/Vw aOMw== X-Forwarded-Encrypted: i=1; AJvYcCWrW0YdgcSlBUV0WH17k6cYpmvK6s1tuFVmRaEvGSCy3yvwZ/KYCC2nk1frSgwfOADhJ5okecJE/C68g8H24p1epES4HJdAnkbjIULn1mJqP0TcYMTF49tWH6X98LZZLh3UAtc3 X-Gm-Message-State: AOJu0YzL9pPm4WbNUxOkJg32tGGVFcH13Gk96FAv4gar4/xVN0BeeVvs C3KBhEMlXcswadyc8PX6U+iyI+0GAgFowFjHJLk8hNDeGGvIY2vW X-Received: by 2002:a17:903:185:b0:1e4:b16e:7f10 with SMTP id z5-20020a170903018500b001e4b16e7f10mr4450841plg.33.1712803498658; Wed, 10 Apr 2024 19:44:58 -0700 (PDT) Received: from Laptop-X1 ([43.228.180.230]) by smtp.gmail.com with ESMTPSA id a12-20020a170902eccc00b001e3e081d07esm250775plh.179.2024.04.10.19.44.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Apr 2024 19:44:58 -0700 (PDT) Date: Thu, 11 Apr 2024 10:44:54 +0800 From: Hangbin Liu To: Thomas Bogendoerfer Cc: Jay Vosburgh , Andy Gospodarek , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net] bonding: 802.3ad: Avoid packet loss when switching aggregator Message-ID: References: <20240404114908.134034-1-tbogendoerfer@suse.de> 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: <20240404114908.134034-1-tbogendoerfer@suse.de> On Thu, Apr 04, 2024 at 01:49:08PM +0200, Thomas Bogendoerfer wrote: > 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 > Reviewed-by: Hangbin Liu