From patchwork Sat May 15 07:44:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Birger Koblitz X-Patchwork-Id: 1478810 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=EajH3Or3; 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 4FhyD048gLz9sCD for ; Sat, 15 May 2021 17:47:27 +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-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Date:Message-ID:To:Subject:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=yfQBJhJoVCRcP9vddH5XRNbGD1AFF7uzzjBMY2iehwk=; b=EajH3Or3DnmiSd zvMOxiOtR2IqeHAnOv2m9lLHRfE9XyW09/AzmpyxEnrbyb0SFRzKsYpUhlUo/7vwnlS/jeChtXYKj 6FcO+JlRkqocsJLSRG7laJba046g1On5TvNkYqv9dedTrNTsbM/o9y0GhwBtb5rr7uinIW8jNQbO0 U/grC7585PLaEz4lIJy8gSaMddxWTILvILN81/hT6vseaqcn6n5C4vHChzayxdivxm8GJD+9SHDDk 07bTcJS69m6ppAKEqRJpw6x1Le6OH58XkccjxHQeluvgNZ0HArpo+Jvlaqj5sOek1xAiJNwqGB3ZY SQBL5WY5vTrn6GUPY3HA==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhoyx-009wNo-G4; Sat, 15 May 2021 07:45:07 +0000 Received: from wp175.webpack.hosteurope.de ([2a01:488:42:1000:50ed:84b6::]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhoys-009wN4-Ek for openwrt-devel@lists.openwrt.org; Sat, 15 May 2021 07:45:04 +0000 Received: from p5dcf30f3.dip0.t-ipconnect.de ([93.207.48.243] helo=[192.168.1.113]); authenticated by wp175.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) id 1lhoyn-0006oO-A0; Sat, 15 May 2021 09:44:57 +0200 From: Birger Koblitz Subject: [PATCH v2] realtek: Fix VLAN issues introduced by multicast patches To: openwrt-devel@lists.openwrt.org Message-ID: Date: Sat, 15 May 2021 09:44:50 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.0 MIME-Version: 1.0 Content-Language: en-US X-bounce-key: webpack.hosteurope.de; mail@birger-koblitz.de; 1621064702; 117f9151; X-HE-SMSGID: 1lhoyn-0006oO-A0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210515_084502_623053_157CC674 X-CRM114-Status: UNSURE ( 8.79 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: Spam detection software, running on the system "desiato.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: realtek: Fix VLAN issues introduced by multicast patches 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 Content analysis details: (0.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 SPF_NONE SPF: sender does not publish an SPF Record 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 realtek: Fix VLAN issues introduced by multicast patches 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 --- v2: fixed typo in "unknown" 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 8f66ae6f8f..7c0d55b67a 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 @@ -501,7 +501,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 74472461a1..c62dc441c1 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 820c78165a..7ff0001ec7 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 unknown MC flooding portmask all ports, including the CPU-port + p[3] = 0x1fffffff; // IPv4 unknown MC flooding portmask + p[4] = 0x1fffffff; // IPv6 unknown MC flooding portmask sw_w32(p[0], RTL930X_VLAN_PROFILE_SET(profile)); sw_w32(p[1], RTL930X_VLAN_PROFILE_SET(profile) + 4);