Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp571330pxb; Tue, 9 Feb 2021 07:27:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJz0fKr6LnQkQ7O8j/Tnar54SkY4qZkPfmqJPp64vLf4saklNV6Kq0qNGhLSzzpWscnzyNjM X-Received: by 2002:a50:a6ce:: with SMTP id f14mr23263224edc.346.1612884422396; Tue, 09 Feb 2021 07:27:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1612884422; cv=none; d=google.com; s=arc-20160816; b=k/ktGYNgKvg9l6/DIVME8LAQfQpGchEzEOBWoJnWhZzqO/Hcz/waE4JeMFHuhsXVAJ zhSN9Ag+/DYl/lhY+s7+IrOc0rj9P9+CXSU3X6TEsWBXN2iuWMXdSzJ/3XB0kqVIpqjW pGvrRsgL5cMQ4dNVLhOIl+DVvdENiSD1ClCoREs/8TWdGYckOyA4u1Lgo1ELfaz+2WzG NqTAIB6II6B4tj7/2jdZj4+1CfSmv7teUvoLFRJUsN/AE8wixQUBQjtaKyahjFGaDhfX EFnVsqZbPPWUQP4gQPK8iVMyqI49ILUZo1qUtAJnPXjsU5Hm9N21j4npeHGDMyUnFN06 4gng== 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=AkDQjrnrduVZMAhweD9hW9j4GkN22HKFVzGcpRaV+qE=; b=IjXE1/KFKJR0obXFKm1iEqKEuVrgfKCnOsoY57TAwmx3XhFngOi2F+uTVTc6AhPpuG 4nSMKbw2FBnnIG4YVek+NJNzPCDBCjSR2+4Axwu+kfCBBNt5PlhNYuMP0S6cFBlxsV7f s0XUarrhQkICPwcZ58mTUU1Iw/GBSzpdMtgISJEWYB1xQs7Yh54GZqo3wHet2umgzjvN 3wrwXpVToaNIggNMPcWowQuFVlO44hLTR/UTMIPdvPgRpjgEvT07wkLHUDIHjYbel7oZ X6QG/B79f5ioqlRv0jNULGlP5XCUWiZLUjoPu4icRlHv2pRYHlsDc3eosK+xXyiwsYgi V9Dg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=e2T4P1lz; 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 4si8365952edc.221.2021.02.09.07.26.38; Tue, 09 Feb 2021 07:27:02 -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=e2T4P1lz; 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 S232549AbhBIPV6 (ORCPT + 99 others); Tue, 9 Feb 2021 10:21:58 -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-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 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 --- 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 */ -- 2.25.1