Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1403010pxj; Fri, 21 May 2021 13:23:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxZvcQL12qvfiuRzXf8dXvpNKwYLSmblYY7xY3+AKGqhzbt4Narpknks9lAh0fCq8OqGnnn X-Received: by 2002:a05:6e02:4a6:: with SMTP id e6mr721223ils.254.1621628635487; Fri, 21 May 2021 13:23:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621628635; cv=none; d=google.com; s=arc-20160816; b=xsv2gsogOKhZh7vkZVX3qcLsCXZmJ0/SLRNu+AE0v8WPUWpxYGBK9zozFUaUcssRZU EV1OnCDDbQlS1V6Z4JNxE2J7iq4RF74XEcioetUXWIkRvSRQU3NWitkGAvf40Egy0ebR J/a+XBPlF7/Z3IepmwDDZNX2p+o48pDDl4NSFNWbIBnudSxQDhhIW/+7qDreXIDhIFnX R9bIG2zbSA5fqtFCGfaqkB6+yx3XySLHxjuHrIcTtH2VoXxuGJXMRaNiOrSsIdFF+k1H Q+KhFv0WAqyNVTYtLCp85Ixjj07L1alleApr5575RyHiVwueLeyYGZ9FcxdJKpmkU2bV BIqw== 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=2aPLZ3Y73SFChHYbt53o/v0fUEW0CAt2PHSuevhfpXQ=; b=yMXHKJTVZzIAh4wcce2pKZ+2R67YxzEKjyYkijWGw4MqzqAFmDcL5HWX0akkAGURMF CjK93QmmdTaE4xyJU6NaAnQOT4DxDqiPokYDQAFJMkVgR+dFIHm88xfYo/9wKTlcd5Pz InWveXBqQ3bfgBP5pUCui74biMFJmQLS9CSP3HXlECoD1IYXja4YimiYZ09BCqTjkDzd 1rb+zvemp/xA3wEjIofd3Xps2YCM8I5G6eAZsjVJO1domVR4zSyCdLj5pvPWvQ3JPTb0 YxqXaA9/t1HaM1Tpto9st++wSbzpdlanh6CTfP698v4bxEEfEhC9tvwKC0BBLfXjK+wm +bMA== 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 k43si7015327jav.84.2021.05.21.13.23.42; Fri, 21 May 2021 13:23:55 -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 S237746AbhEURCc convert rfc822-to-8bit (ORCPT + 99 others); Fri, 21 May 2021 13:02:32 -0400 Received: from youngberry.canonical.com ([91.189.89.112]:50644 "EHLO youngberry.canonical.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233990AbhEURCb (ORCPT ); Fri, 21 May 2021 13:02:31 -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 1lk8WE-00061Z-5Q; Fri, 21 May 2021 17:01:02 +0000 Received: by famine.localdomain (Postfix, from userid 1000) id 77D0A5FDD5; Fri, 21 May 2021 10:01:00 -0700 (PDT) Received: from famine (localhost [127.0.0.1]) by famine.localdomain (Postfix) with ESMTP id 7069BA040C; Fri, 21 May 2021 10:01:00 -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 net-next v2 4/4] bonding/balance-alb: put all slaves into promisc In-reply-to: <20210521132756.1811620-5-jarod@redhat.com> References: <20210518210849.1673577-1-jarod@redhat.com> <20210521132756.1811620-1-jarod@redhat.com> <20210521132756.1811620-5-jarod@redhat.com> Comments: In-reply-to Jarod Wilson message dated "Fri, 21 May 2021 09:27:56 -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: <18878.1621616460.1@famine> Content-Transfer-Encoding: 8BIT Date: Fri, 21 May 2021 10:01:00 -0700 Message-ID: <18879.1621616460@famine> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Jarod Wilson wrote: >Unlike most other modes with a primary interface, ALB mode bonding can >receive on all slaves. That includes traffic destined for a non-local MAC >behind a bridge on top of the bond. Such traffic gets dropped if the >interface isn't in promiscuous mode. Therefore, it would seem to make >sense to put all slaves into promisc. I'm still confused by this description and the actual changes of the patch; the description above reads to me as you're intending that all slaves of an alb bond should be promisc all the time, but the patch below doesn't do that (it causes all alb mode slaves to be set to promisc when the bond itself is set to promisc mode). Could you clarify? Also, your phrasing that "it would seem to make sense" suggests to me that this change is speculative. Do you have a specific example of when the prior behavior causes an issue? -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 32785e9d0295..6d95f9e46059 100644 >--- a/drivers/net/bonding/bond_main.c >+++ b/drivers/net/bonding/bond_main.c >@@ -647,9 +647,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