Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1761440pxj; Wed, 19 May 2021 13:18:48 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuG2P5WnhZm347vrnfJOPgz218xoEs9Qzo34lSHcLlpOxVyORCxTSMYjeNAfn3l2ZJmhMb X-Received: by 2002:a92:130a:: with SMTP id 10mr903994ilt.159.1621455528464; Wed, 19 May 2021 13:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621455528; cv=none; d=google.com; s=arc-20160816; b=mch1YMHTnqY9Jn2oCCixVN/RHLEgvPtVrzMyGqS4ioV9MKONH2d/SlDzmt4cTvZqtN pJ5O0AEcxShRCuTqAl422CU5efnWwRWKAqyBe7ZoOTURl6STbOMAzETzPxq1hdL3WdT7 1a1W2vk+Pw8bT+bGzkcJiv6BpMhToGNmrW/wP9enFccfwId/Z/r5MCCL3Bav1JcqErSM BqurEKLQmgQbkqGybVpw/6fh3GoVHjGsUpwVaUpHq3DNbFAaudhha5mxGzRSkISaVLFr VU4pf5X/EhwSC3IO+8oOnr3n9erc/9TZZEV4nHYKSuhugfhW1hallAJYjbMEAZUg7YdW 6CGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :content-id:mime-version:comments:references:in-reply-to:subject:cc :to:from; bh=LTDq11u6BxHypGRy722j70N5One4t0MpkrKSYJPxi8w=; b=DeCd4DRmXqMryHVw5U4bcUhSyc7BHdcAJT+B8FnQr3eb2Gciwall6bbpWvZpwrgNjL RUO6dOrgY0A5NXotrk8jyQsPKb4Za9jkMTwv1wfAg1jXNWYGEqoxHhFSFmfCvX02ySid ifE7QbHYGhiaj6tPTLYuRKsieo+YixeTeMZWHVEJl8DEY+jhGe3IZl/d4x8efxNU2w2d ZIN0mpFfaCu/WvL3XVsxZveJKvgFSPdbFtKKcKZCk+mQt1scG16dN2B1SAF1agCm6+9P 7CrIQDrBDUt1vCfdP9YNcUZCgIdrsc9826A5Gq5rz3DaiG8rF9+q+NadHWt5V+OqsRTd 4OjQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t22si330271ioh.58.2021.05.19.13.18.36; Wed, 19 May 2021 13:18:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=canonical.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355394AbhESQsq convert rfc822-to-8bit (ORCPT + 99 others); Wed, 19 May 2021 12:48:46 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:36727 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231124AbhESQsl (ORCPT ); Wed, 19 May 2021 12:48:41 -0400 Received: from 1.general.jvosburgh.us.vpn ([10.172.68.206] helo=famine.localdomain) by youngberry.canonical.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.93) (envelope-from ) id 1ljPLo-0002HK-NM; Wed, 19 May 2021 16:47:16 +0000 Received: by famine.localdomain (Postfix, from userid 1000) id 5F8265FDD5; Wed, 19 May 2021 09:47:14 -0700 (PDT) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id 59812A040C; Wed, 19 May 2021 09:47:14 -0700 (PDT) From: Jay Vosburgh To: Jarod Wilson cc: linux-kernel@vger.kernel.org, Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Jakub Kicinski , Thomas Davis , netdev@vger.kernel.org Subject: Re: [PATCH 4/4] bond_alb: put all slaves into promisc In-reply-to: <20210518210849.1673577-5-jarod@redhat.com> References: <20210518210849.1673577-1-jarod@redhat.com> <20210518210849.1673577-5-jarod@redhat.com> Comments: In-reply-to Jarod Wilson message dated "Tue, 18 May 2021 17:08:49 -0400." X-Mailer: MH-E 8.6+git; nmh 1.6; GNU Emacs 27.0.50 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <27877.1621442834.1@famine> Content-Transfer-Encoding: 8BIT Date: Wed, 19 May 2021 09:47:14 -0700 Message-ID: <27878.1621442834@famine> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jarod Wilson wrote: >ALB mode bonding can receive on all slaves, so it would seem to make sense >that they're all in promisc, unlike other modes that have a primary >interface and can only receive on that interface. When I first read the subject and this description, I thought you meant that all of the alb slaves would be in promisc mode all the time, not that enabling promisc on an alb bond would set promisc for all slaves (instead of just the primary, the current behavior). Regardless, since in alb mode the expectation is that all of the slaves will be on the same subnet (Ethernet broadcast domain), setting all of the bonded interfaces to promisc instead of just one sounds like a recipe for duplicate packets, as each would deliver multiple copies of all "no longer filtered" traffic. The bond_should_deliver_exact_match() logic will still suppress broadcast and multicast frames to the non-primary interface(s), but, e.g., unicast frames flooded to all switch ports will be delivered once for each member of the bond. Unless you have a specific use case that this will improve, I think this will cause more confusion that it will capture frames that would have otherwise been missed. -J >Cc: Jay Vosburgh >Cc: Veaceslav Falico >Cc: Andy Gospodarek >Cc: "David S. Miller" >Cc: Jakub Kicinski >Cc: Thomas Davis >Cc: netdev@vger.kernel.org >Signed-off-by: Jarod Wilson >--- > drivers/net/bonding/bond_main.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c >index d71e398642fb..93f57ff1c552 100644 >--- a/drivers/net/bonding/bond_main.c >+++ b/drivers/net/bonding/bond_main.c >@@ -644,9 +644,10 @@ static int bond_check_dev_link(struct bonding *bond, > static int bond_set_promiscuity(struct bonding *bond, int inc) > { > struct list_head *iter; >- int err = 0; >+ int mode, err = 0; > >- if (bond_uses_primary(bond)) { >+ mode = BOND_MODE(bond); >+ if (mode == BOND_MODE_ACTIVEBACKUP || mode == BOND_MODE_TLB) { > struct slave *curr_active = rtnl_dereference(bond->curr_active_slave); > > if (curr_active) >-- >2.30.2 > --- -Jay Vosburgh, jay.vosburgh@canonical.com