From patchwork Sun May 9 10:04:16 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Bj=C3=B8rn_Mork?= X-Patchwork-Id: 1475951 X-Patchwork-Delegate: ynezz@true.cz Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1:d65d:64ff:fe57:4e05; helo=desiato.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=desiato.20200630 header.b=c9qA/qND; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=mork.no header.i=@mork.no header.a=rsa-sha256 header.s=b header.b=oip45CLi; dkim-atps=neutral Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FdKZv4lsjz9tlG for ; Sun, 9 May 2021 20:06:15 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=desiato.20200630; h=Sender:Content-Transfer-Encoding :Content-Type:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date: Subject:Cc:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YyJP4+Cbwby/5MUQ6QRzsr7hAlvQmkZx0e6WDrB5vl8=; b=c9qA/qND3EkbL8cjLk83oe9+S rJ/X08mDYMbOqJrZX0jOiFv/BIjAlMED+VvfFkDqvoM7wEF4slmVQtc+OyrmQV8B/yLVDSmHrc1gn 2ckeIOMFawDhEJhvsIM+QXiqTS3qjAvEIyIN8df8ZHbfTstY/zVwdyeyJOYZqUUV3oUxG3Zo3i1zd B8f3gEmDHg591MQ96DyrGFkAYIdOH4blNDdc7DE9/Bzf0bCG9D6OfVD7b/deBcrIMt5DA5mnLbK8l TtfqNgeIWt065ckFTBP4jOFmEV2lY1sqxP74zZAXIlSNZRHoDXw5+Ld2JWOr8fdvcsGri5ygJ8S7x eE6Q45pGA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lfgIg-00BOwj-Ii; Sun, 09 May 2021 10:04:38 +0000 Received: from canardo.mork.no ([2001:4641::1]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lfgIY-00BOvs-FT for openwrt-devel@lists.openwrt.org; Sun, 09 May 2021 10:04:32 +0000 Received: from canardo.mork.no (ip6-localhost [IPv6:0:0:0:0:0:0:0:1]) by canardo.mork.no (8.15.2/8.15.2) with ESMTPS id 149A4OEF027610 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=OK); Sun, 9 May 2021 12:04:24 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mork.no; s=b; t=1620554664; bh=udSGw787QkkHjqdTkvNDEs0VMkclsjiGVCmvPGJXh+c=; h=From:To:Cc:Subject:Date:Message-Id:References:From; b=oip45CLiZv8PJwnOJte85/FSr0X2PnwDz/cMc/rxlh/3vDXCpfgPe//rtaOdL8uAX CYNPiEMhExjqFkmQeDR2NHN0Z+Fvw9RxsMLk+6stwYYRnEOnUCDFwAO0Mn0Ro/Yquh FIm8Q9nX22z3iwLgNei4xo8cToUrFZ5CMfnfbfoI= Received: (from bjorn@localhost) by canardo.mork.no (8.15.2/8.15.2/Submit) id 149A4Njb027609; Sun, 9 May 2021 12:04:23 +0200 From: =?utf-8?q?Bj=C3=B8rn_Mork?= To: openwrt-devel@lists.openwrt.org Cc: Birger Koblitz , =?utf-8?q?Bj=C3=B8rn_Mork?= Subject: [PATCH v2] realtek: Fix VLAN issues introduced by multicast patches Date: Sun, 9 May 2021 12:04:16 +0200 Message-Id: <20210509100416.27537-1-bjorn@mork.no> X-Mailer: git-send-email 2.20.1 In-Reply-To: <658203b8-b037-3e5e-53f0-66e5d4df9fe0@birger-koblitz.de> References: <658203b8-b037-3e5e-53f0-66e5d4df9fe0@birger-koblitz.de> MIME-Version: 1.0 X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on canardo.mork.no X-Virus-Scanned: clamav-milter 0.102.4 at canardo X-Virus-Status: Clean X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210509_110430_809193_2F94F695 X-CRM114-Status: GOOD ( 10.03 ) X-Spam-Score: -2.5 (--) X-Spam-Report: =?unknown-8bit?q?Spam_detection_software=2C_running_on_the_sy?= =?unknown-8bit?q?stem_=22desiato=2Einfradead=2Eorg=22=2C?= =?unknown-8bit?q?_has_NOT_identified_this_incoming_email_as_spam=2E__The_ori?= =?unknown-8bit?q?ginal?= =?unknown-8bit?q?_message_has_been_attached_to_this_so_you_can_view_it_or_la?= =?unknown-8bit?q?bel?= =?unknown-8bit?q?_similar_future_email=2E__If_you_have_any_questions=2C_see?= =?unknown-8bit?q?_the_administrator_of_that_system_for_details=2E?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_preview=3A__From=3A_Birger_Koblitz_=3Cmail=40birge?= =?unknown-8bit?q?r-koblitz=2Ede=3E_This_adds_the?= =?unknown-8bit?q?_CPU_port_to_the_unknown_multicast_flooding_port_mask=2C_wh?= =?unknown-8bit?q?ich_fixes_the_VLAN?= =?unknown-8bit?q?_issues_introduced_by_the_multicast_group_patches_Signed-of?= =?unknown-8bit?q?f-by=3A_Birger_Koblitz?= =?unknown-8bit?q?_=3Cmail=40birger-koblitz=2Ede=3E_Signed-off-by=3A_Bj=C3=B8?= =?unknown-8bit?q?rn_Mork_=3Cbjorn=40mork=2Eno=3E_=5Bwhitespace?= =?unknown-8bit?q?_fix=5D_---_Massaged_through_sed_-e_=27s/=5E=2E_/=5C+_/=27_?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_Content_analysis_details=3A___=28-2=2E5_points=2C_5=2E0_re?= =?unknown-8bit?q?quired=29?= =?unknown-8bit?q?_?= =?unknown-8bit?q?_pts_rule_name______________description?= =?unknown-8bit?q?_----_----------------------_------------------------------?= =?unknown-8bit?q?--------------------?= =?unknown-8bit?q?_-2=2E3_RCVD=5FIN=5FDNSWL=5FMED______RBL=3A_Sender_listed_a?= =?unknown-8bit?q?t_https=3A//www=2Ednswl=2Eorg/=2C?= =?unknown-8bit?q?_medium_trust?= =?unknown-8bit?b?IFsyMDAxOjQ2NDE6MDowOjA6MDowOjEgbGlzdGVkIGluXQ==?= =?unknown-8bit?b?IFtsaXN0LmRuc3dsLm9yZ10=?= =?unknown-8bit?q?_-0=2E0_SPF=5FPASS_______________SPF=3A_sender_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E0_SPF=5FHELO=5FPASS__________SPF=3A_HELO_matches_SPF_?= =?unknown-8bit?q?record?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID_____________Message_has_at_least_one_v?= =?unknown-8bit?q?alid_DKIM_or_DK_signature?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FAU__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_author=27s_domain?= =?unknown-8bit?q?_-0=2E1_DKIM=5FVALID=5FEF__________Message_has_a_valid_DKIM?= =?unknown-8bit?q?_or_DK_signature_from?= =?unknown-8bit?q?_envelope-from_domain?= =?unknown-8bit?q?_0=2E1_DKIM=5FSIGNED____________Message_has_a_DKIM_or_DK_si?= =?unknown-8bit?q?gnature=2C_not_necessarily?= =?unknown-8bit?q?_valid?= X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org From: Birger Koblitz This adds the CPU port to the unknown multicast flooding port mask, which fixes the VLAN issues introduced by the multicast group patches Signed-off-by: Birger Koblitz Signed-off-by: Bjørn Mork [whitespace fix] --- Massaged through sed -e 's/^. /\+ /' Bjørn .../realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c | 2 +- .../realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c | 2 +- .../realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c index dfd773c5e6fc..f2bac01ffa62 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl838x.c @@ -398,7 +398,7 @@ static void rtl838x_vlan_profile_setup(int profile) * On RTL93XX, the portmask is directly set in the profile, * see e.g. rtl9300_vlan_profile_setup */ - rtl838x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0xfffffff); + rtl838x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x1fffffff); } static inline int rtl838x_vlan_port_egr_filter(int port) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c index 74472461a15b..c7e827b67494 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl839x.c @@ -411,7 +411,7 @@ static void rtl839x_vlan_profile_setup(int profile) sw_w32(p[0], RTL839X_VLAN_PROFILE(profile)); sw_w32(p[1], RTL839X_VLAN_PROFILE(profile) + 4); - rtl839x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x000fffffffffffff); + rtl839x_write_mcast_pmask(UNKNOWN_MC_PMASK, 0x001fffffffffffff); } static inline int rtl839x_vlan_port_egr_filter(int port) diff --git a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c index 820c78165a3c..4f590621bea6 100644 --- a/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c +++ b/target/linux/realtek/files-5.4/drivers/net/dsa/rtl83xx/rtl930x.c @@ -153,9 +153,9 @@ static void rtl930x_vlan_profile_setup(int profile) // Enable routing of Ipv4/6 Unicast and IPv4/6 Multicast traffic p[0] |= BIT(17) | BIT(16) | BIT(13) | BIT(12); - p[2] = 0x0fffffff; // L2 unknwon MC flooding portmask: all but the CPU-port - p[3] = 0x0fffffff; // IPv4 unknwon MC flooding portmask - p[4] = 0x0fffffff; // IPv6 unknwon MC flooding portmask + p[2] = 0x1fffffff; // L2 unknwon MC flooding portmask all ports, including the CPU-port + p[3] = 0x1fffffff; // IPv4 unknwon MC flooding portmask + p[4] = 0x1fffffff; // IPv6 unknwon MC flooding portmask sw_w32(p[0], RTL930X_VLAN_PROFILE_SET(profile)); sw_w32(p[1], RTL930X_VLAN_PROFILE_SET(profile) + 4);