From patchwork Tue Feb 9 15:19:30 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Oltean X-Patchwork-Id: 12078395 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E93BC4332B for ; Tue, 9 Feb 2021 15:21:27 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EB82564EB9 for ; Tue, 9 Feb 2021 15:21:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232513AbhBIPVN (ORCPT ); Tue, 9 Feb 2021 10:21:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52548 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232496AbhBIPVJ (ORCPT ); Tue, 9 Feb 2021 10:21:09 -0500 Received: from mail-ed1-x529.google.com (mail-ed1-x529.google.com [IPv6:2a00:1450:4864:20::529]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E4176C061793; Tue, 9 Feb 2021 07:19:57 -0800 (PST) Received: by mail-ed1-x529.google.com with SMTP id t5so24173402eds.12; Tue, 09 Feb 2021 07:19:57 -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=AkDQjrnrduVZMAhweD9hW9j4GkN22HKFVzGcpRaV+qE=; b=e2T4P1lz4I17kuV+wPzF1odR3ie/Bvx7chGzyBa5nLxDS8zpjyOYw8E+gekxi6Njg9 ulUBBz8A8aEw+NvwMpr0MF+G1OJwGToo92OHEW3NLxI0xqx1P7AlcP+NzOYNcxadP5AS WK4ofM/FGyYPIoMFl3mP0MWvBuXplNVio5f69uaUqTR5lFdls58Nv3Hq+Rte3izKImPA YCod4c7oT1Z/WDDmZAXNgyRjPW4RHyNLszvIPSVzKPBsTwQjxwKUEID5lzKBN7yCcaIp jouIKljFoOWvTyqSUDR8Brx2jsMHaYw06yglaGx/QJHduZF6+x0auRXnfR+gNzyUv8Vt FobQ== 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=AkDQjrnrduVZMAhweD9hW9j4GkN22HKFVzGcpRaV+qE=; b=GrGCcv+8nCza39kc+Ji3L9XWDTHvZR6n4foo3vawBz3zmusRuELN1fcT0OgeR2d+Qy 7yZqclIo4sXoySs5kbfz26ZLlR2lpK9i0Pt9f9/Fps13gHFlN0eMyo0+7PlMyJPhvEYI EcSgXpOZCoGLIrk55Tij5rXUkGXelOfQ5Qw14qdEktJ4sQbQ0X7m/bWPnE+XYzZeJJvV wUuH+Fx3voCsqdUoY4ICVpBqZl520GCNbthVTo5f8nh0U0p1CeMpBbBVxj8fDvhl0Fi4 cPMfsfuM4GCiJaNal8UGEigH6/YxEnMKIF7BX4KU/uzLh39ayriqclGLbIrBmrtknuuW 7m0w== X-Gm-Message-State: AOAM532tcvWwH1Vd96a/rJYnzfk2siqGpUb2WTeaCZH5nvdiQ1nwPN/0 UelkCA/IsXAXeXc21kcbkwE= X-Google-Smtp-Source: ABdhPJzuQ7mcFJMPpcDbAQrcHufwzjpf1Hv43yQmuPKOGw0AryBbWqbIGRzaRdH0jH3N8t3NrTFg4A== X-Received: by 2002:aa7:ce15:: with SMTP id d21mr24001894edv.246.1612883996701; Tue, 09 Feb 2021 07:19:56 -0800 (PST) Received: from localhost.localdomain (5-12-227-87.residential.rdsnet.ro. [5.12.227.87]) by smtp.gmail.com with ESMTPSA id q2sm11686108edv.93.2021.02.09.07.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Feb 2021 07:19:55 -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 v2 net-next 05/11] net: dsa: stop setting initial and final brport flags Date: Tue, 9 Feb 2021 17:19:30 +0200 Message-Id: <20210209151936.97382-6-olteanv@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210209151936.97382-1-olteanv@gmail.com> References: <20210209151936.97382-1-olteanv@gmail.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-omap@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 --- Changes in v2: None. 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 */