Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp3592928pxb; Sun, 7 Feb 2021 15:28:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+NR05B152wLaEYY5M7aW7mZvh8XfQXCdh8IYZTxCkFITr3pmAnx1DzmJxVWc4b3p1VQEB X-Received: by 2002:a05:6402:c9:: with SMTP id i9mr14412805edu.123.1612740487146; Sun, 07 Feb 2021 15:28:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612740487; cv=none; d=google.com; s=arc-20160816; b=Ao6XMrc+DpmmpFb13LvleNfJT2fogfqbGAZNMBy7Ajx3bt8dSTtZU71reo34eS4Tub GwLZdbznrKguegNJYt5T2+KdF0x+TKD0YQIFD1gX45dVTPUqLzLlODGQINvWTDLPdsQ5 PL2QnMd2VNG9enaDcDHyL4+InFisO/eLZN1mGOSeuzoUo1dMFAXH/uX0semXHSaSD7ZQ 1guShWREfcLwmNS+66nYlpvgzkf66o6TJtK51M6Vw6816umD8O7+GPsHnN8owQ18mabP 18whL4m5FwwU1HaznDsby+PX7mtiIkPU4Hh015cca6vOtwCmdZDJfLokwaTqvZv/qSR7 GgPg== 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=e9XiWgYMfVUBSKTt2/GH7FXs22RSflWWzqO+GytFND8=; b=bzfgqv7DD+HFt2gYABs3gm5keZPIS9BzAoPdw7iZgdpmutDLkwiaE1ivAjmcSEEhBN 4sYNquhjA0CeXWE/Hey2/TJBajQjUZbpmoNagnM1wfEWprcHfNRbvnW2UjZnU2pHjRmX Iqw48u0xMFFpT5xJP1rjhJSGRVGTJOkXV4UIqZo9Ck2CO/E7xUe/PyWNfviD/eT3XDps r1ZaWCdnoPFmdu77LcuBhCQihWWuYPS2EiafF/8TrSmC+t7HztEQRAZYdeCWn+UFcQEz DooK80DYzZAvzLsTXwrDH8LWUN8ddCyzI+mSCScPwME8DjWDupzyYESoycYvD6PH5W9A Y7sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=hrNsNNr9; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c16si10426997edu.304.2021.02.07.15.27.43; Sun, 07 Feb 2021 15:28:07 -0800 (PST) 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=@gmail.com header.s=20161025 header.b=hrNsNNr9; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229770AbhBGXY2 (ORCPT + 99 others); Sun, 7 Feb 2021 18:24:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229702AbhBGXXt (ORCPT ); Sun, 7 Feb 2021 18:23:49 -0500 Received: from mail-ej1-x62f.google.com (mail-ej1-x62f.google.com [IPv6:2a00:1450:4864:20::62f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F26CC06178A; Sun, 7 Feb 2021 15:23:08 -0800 (PST) Received: by mail-ej1-x62f.google.com with SMTP id l25so4535966eja.9; Sun, 07 Feb 2021 15:23:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=e9XiWgYMfVUBSKTt2/GH7FXs22RSflWWzqO+GytFND8=; b=hrNsNNr92ti6PuUoJlwmbCFI/0za7J7d0/Mr1fl7pIVF/V67yqcNAU7YeBI1zSE4BR vSgZbG8ewwmWuad2Q2X9OSAP4c84PibFdy8bnfSPBkaQ9FmMBRHaN3w/O9cdp6mm9EV8 peKBNbGwlC6Vf40m7+O7ezFrNYLrfBDQGu+ob/LKU8JvBMEyGf3HXYSNIAPqbIBS7vif 3Eri2/HMq/LZ13WJHBIo1J5K9kcfOKCIJav6wJ+e3tptTsOgagQ5kZPg9d+zYB7WFel+ pb0WnbEwHIyu8EbFSKaQgXu1bBNnxT99UcGWQbSWSZ1xu9g3g6ZWAW8/5kh+P6vKWZ9M uU4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=e9XiWgYMfVUBSKTt2/GH7FXs22RSflWWzqO+GytFND8=; b=iKXJ2ODQAbBoRNzAkAs/QuHRs+6VA4fqHfaTcC/b+9EXZDq0IscHbQc0k/ZvsN/3zK ahzgV9P9JBDRMq2B2gEZ9v7LuS3BeU2nigI1gCNT2ik0qx6FvmM2I5YJMPWDvBjIy3pk AWGj7hPDZTUlaqdwQQX+qAgUU70WCTRZ89fY3lrU5EzT+nDKSZiAsC+wLBJqhajS30SZ 6p2ocRy/cwkMlWOsx4VzwJhO05D/Vvhruz305i61F8MZHE0Q5t+sIJxEd9Y3a0gtbp+X kzAsoHrtJlhYC4MwnUuTJCB5bYS7zUpPLCnSFvRFmxcZg2w9tRnGAHm30kkBqW1tcbxl 3MIA== X-Gm-Message-State: AOAM533rRMtmZPosopqVpmgrb1cxlPQ1P1+jkVw9e0m31MTozQND9+fC 78wZ271/qha9SP7VvkR+M30= X-Received: by 2002:a17:906:f4f:: with SMTP id h15mr14443806ejj.498.1612740187258; Sun, 07 Feb 2021 15:23:07 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id u21sm7540016ejj.120.2021.02.07.15.23.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 07 Feb 2021 15:23:06 -0800 (PST) From: Vladimir Oltean To: Jakub Kicinski , "David S. Miller" Cc: Andrew Lunn , Vivien Didelot , Florian Fainelli , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, bridge@lists.linux-foundation.org, Roopa Prabhu , Nikolay Aleksandrov , Jiri Pirko , Ido Schimmel , Claudiu Manoil , Alexandre Belloni , UNGLinuxDriver@microchip.com, Vadym Kochan , Taras Chornyi , Grygorii Strashko , Ioana Ciornei , Ivan Vecera , linux-omap@vger.kernel.org Subject: [PATCH net-next 3/9] net: dsa: stop setting initial and final brport flags Date: Mon, 8 Feb 2021 01:21:35 +0200 Message-Id: <20210207232141.2142678-4-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210207232141.2142678-1-olteanv@gmail.com> References: <20210207232141.2142678-1-olteanv@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Vladimir Oltean With the bridge driver doing that for us now, we can simplify our mid-layer logic a little bit, which would have otherwise needed some tuning for the disabling of address learning that is necessary in standalone mode. Signed-off-by: Vladimir Oltean --- net/dsa/port.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/net/dsa/port.c b/net/dsa/port.c index 5e079a61528e..aa1cbba7f89f 100644 --- a/net/dsa/port.c +++ b/net/dsa/port.c @@ -132,11 +132,6 @@ int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br) }; int err; - /* Set the flooding mode before joining the port in the switch */ - err = dsa_port_bridge_flags(dp, BR_FLOOD | BR_MCAST_FLOOD); - if (err) - return err; - /* Here the interface is already bridged. Reflect the current * configuration so that drivers can program their chips accordingly. */ @@ -145,10 +140,8 @@ int dsa_port_bridge_join(struct dsa_port *dp, struct net_device *br) err = dsa_broadcast(DSA_NOTIFIER_BRIDGE_JOIN, &info); /* The bridging is rolled back on error */ - if (err) { - dsa_port_bridge_flags(dp, 0); + if (err) dp->bridge_dev = NULL; - } return err; } @@ -172,9 +165,6 @@ void dsa_port_bridge_leave(struct dsa_port *dp, struct net_device *br) if (err) pr_err("DSA: failed to notify DSA_NOTIFIER_BRIDGE_LEAVE\n"); - /* Port is leaving the bridge, disable flooding */ - dsa_port_bridge_flags(dp, 0); - /* Port left the bridge, put in BR_STATE_DISABLED by the bridge layer, * so allow it to be in BR_STATE_FORWARDING to be kept functional */ -- 2.25.1