Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1693087pxj; Wed, 19 May 2021 11:36:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzE5/y2IuUsRz0VmuclDDrsIpl168YcC12mFnP2V9Z+sX1RFPc28YAkpZEPD7j1iyeborce X-Received: by 2002:a17:906:5a83:: with SMTP id l3mr563362ejq.50.1621449402081; Wed, 19 May 2021 11:36:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621449402; cv=none; d=google.com; s=arc-20160816; b=SSRzaWGRLZsDxnf/PC1F54TwcKhEklGdoRxoRtWUvfMH2HTaWwofhw+oFBsyn8+fYO I+hW1+GCBwyr1ufJaW05obi3i78/6oULHx3dRePeObr1rGmCLAfssLPXXE7dNgrRsF+B MrqIwrdQqYYvTBbUuAc8TMMf2E0Pm1VHMyuVbXYmmghW9051yq1VaFQKBZmhtWJhMQhF VrwyStEBLqH5kdLjOx85LwEnLbKDjG2xxDqipylV5IZzzJEgl7wQBzs5032fv/aaB9Kt IQr4Q2nGnoel3KANCnaAIu4iFNwBzlGuTQ94VIp07lcj2nPlk+CvDHaYFDi5l0e9Olj6 GwOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=prvD609VA1uqqbSC01aL2lSdSeHhEcopBWufKRbRPx8=; b=Iq9zOvnROJOH7mALLWemaUHG+wS8DK0aFaIChxWci+VhmFoDqMkqg2dPigLcn1DlzK Av6qtP94v4mZvAfqJjSkikaD0M72cY48BHwftMwEYzYQGajw0snOAcpsril7IwpEmFcp /rQ0kyUoaFwE6IW/Kziq7OxMIoSzFq5p+GE5UaV0uyvqfr2xF8TUBnb+J6VkED83sjbe ycuzP7KK47z5zIONasqXCOGCRLHc3HApS59T++WsZwUPNq+VTWD8U1RyPNnM2IEz+cp+ 5v2icYni+TCpq/lGkbQtHLq6EXzIYLViSRH1qAXQt7vbFxKsOlRfGk5Lu31h4jROawxh ZNUQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BvuRIvVx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id k9si485889eje.366.2021.05.19.11.36.18; Wed, 19 May 2021 11:36:42 -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; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=BvuRIvVx; 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=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352414AbhERVKu (ORCPT + 99 others); Tue, 18 May 2021 17:10:50 -0400 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:29516 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352412AbhERVKk (ORCPT ); Tue, 18 May 2021 17:10:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1621372161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=prvD609VA1uqqbSC01aL2lSdSeHhEcopBWufKRbRPx8=; b=BvuRIvVxUV2hcYkAegVsnOR7b3BSPxTJbEB2rh5eMULcLs9Tm0ct4srqQ6EwZUWap4Mrp1 EJsXND4sln7UdGnmRhUKOF6h8rj26s2IxEoctt6y977WMyNoTrYt2HGu+odxzTi2UDM64f ZEr2x0B/EuxyE1vJSenzT0QydLR9mR4= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-195-Be5p2DJaNYep39DMoDgl_g-1; Tue, 18 May 2021 17:09:18 -0400 X-MC-Unique: Be5p2DJaNYep39DMoDgl_g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 89E288015DB; Tue, 18 May 2021 21:09:16 +0000 (UTC) Received: from f33vm.wilsonet.com (dhcp-17-185.bos.redhat.com [10.18.17.185]) by smtp.corp.redhat.com (Postfix) with ESMTP id 554A95C1A1; Tue, 18 May 2021 21:09:15 +0000 (UTC) From: Jarod Wilson To: linux-kernel@vger.kernel.org Cc: Jarod Wilson , Jay Vosburgh , Veaceslav Falico , Andy Gospodarek , "David S. Miller" , Jakub Kicinski , Thomas Davis , netdev@vger.kernel.org Subject: [PATCH 4/4] bond_alb: put all slaves into promisc Date: Tue, 18 May 2021 17:08:49 -0400 Message-Id: <20210518210849.1673577-5-jarod@redhat.com> In-Reply-To: <20210518210849.1673577-1-jarod@redhat.com> References: <20210518210849.1673577-1-jarod@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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