๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #12222

[PATCH net v2 0/2] net: dsa: realtek: rtl8365mb: fix FDB lookups in VLAN-unaware bridges

#12222
From: Stijn Cleynhens
Date: Fri, 06 Nov 2026 15:02
56 lines
13838 bytes
In a VLAN-unaware bridge, DSA installs FDB and MDB entries with VID 0,
but the switch classifies untagged frames to the bridge PVID and looks up
VID 0 by FID, while the driver installs IVL entries. Nothing matches, so
a station that roams from behind a user port to behind the CPU port (a
Wi-Fi client moving between access points) stays unreachable until the
learned entry ages out.

Patch 1 makes VID 0 use IVL; patch 2 depends on it. Patch 2 keeps the
neutral PVID (VID 0) on ports of a VLAN-unaware bridge and only programs
the bridge PVID while the port filters VLANs. Tagged frames in a
VLAN-unaware bridge are not covered, see patch 2.

Tested on OpenWrt's 6.18 kernel, which carries the rtl8365mb backports up
to v7.4; the code these patches touch is the same as in net. A station
learned behind the uplink that moves behind the CPU port answers 10/10
pings, its learned entry replaced by the CPU one, with VLAN filtering
switched off at runtime: on an RTL8367S (TP-Link Deco X50-Outdoor), and
on an RTL8367S-VB (Deco X50-PoE, with the family D series applied and a
family D branch in rtl8365mb_vlan_pvid_port_commit()), where it also
passes with VLAN filtering on. Before these patches the RTL8367S
answered 0/10. Both patches build without warnings with W=1 C=1.

Note for Mieczyslaw's RTL8367S-VB series in net-next (v8): patch 2
replaces rtl8365mb_vlan_pvid_port_set() and
rtl8365mb_vlan_pvid_port_clear() with rtl8365mb_vlan_pvid_port_commit(),
which gets the target VID (0 for the neutral PVID) and the filtering
state. The family D paths that series adds to set and clear become one
branch there that writes the PVID register and the frame filter from
those two inputs. Happy to send that as a follow-up once both are in.

Changes in v2:
- Patch 1: add Alvin's Reviewed-by.
- Patch 2: replace rtl8365mb_vlan_pvid_port_set() and
  rtl8365mb_vlan_pvid_port_clear() with rtl8365mb_vlan_pvid_port_commit(),
  which is now the only place that sets the frame filter;
  rtl8365mb_port_vlan_filtering() no longer does (Alvin).
- Patch 2: one variable per declaration and an explicit else (Alvin).
- Patch 2: commit message: say what "the VID of the bridge entries" is
  and that the per-bridge EFID keeps lookups local (Alvin).
- v1: https://lore.kernel.org/netdev/20261104082514.2139278-1-stijncleynhens@gmail.com/

Stijn Cleynhens (2):
  net: dsa: realtek: rtl8365mb: use IVL in VLAN 0
  net: dsa: realtek: rtl8365mb: keep the neutral PVID in VLAN-unaware
    bridges

 drivers/net/dsa/realtek/rtl8365mb_main.c | 157 ++++++++-------
 drivers/net/dsa/realtek/rtl8365mb_vlan.c | 233 ++++++++++-------------
 drivers/net/dsa/realtek/rtl8365mb_vlan.h |   7 +-
 3 files changed, 191 insertions(+), 206 deletions(-)


base-commit: 787268686c64be60023743b527645a907e38ccca
-- 
2.56.0
Technical Details
Message-ID: <20261106150225.3700205-1-stijncleynhens@gmail.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358046-linux-kernel-netdev=dewy.ru

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-358046-linux-kernel-netdev=dewy.ru
From: stijncleynhens@gmail.com (Stijn Cleynhens)
Newsgroups: linux.kernel.netdev
Subject: [PATCH net v2 0/2] net: dsa: realtek: rtl8365mb: fix FDB lookups in VLAN-unaware bridges
Date: Fri,  6 Nov 2026 16:02:23 +0100
Organization: Usenet Network
Message-ID: <20261106150225.3700205-1-stijncleynhens@gmail.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3909452"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AtR5kT+okdU/k+4YOmwTs7urreQ= sha256:V8dCju05cySbxrb6803cYPzTFzsm4GLIfP1G5OW++88=
	sha1:QrTAtjQReJ77pT0DDTvEjjFEWK0= sha256:TU9TCrLsNrTGgyeHmbFFN0cZqa9by0qbXjAScGYnw7g=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id C0442113294; Fri,  6 Nov 2026 18:11:16 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.049
X-Spam-Status: No, score=-3.049 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.001,
	FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001,
	SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=gmail.com
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id fRTCYCiEX2Ic;
	Fri,  6 Nov 2026 18:11:12 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-358046-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=gmail.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 8FCDC113286; Fri,  6 Nov 2026 18:11:03 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 2F5E12A72A; Fri,  6 Nov 2026 15:03:36 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1793977359;
	b=Jjqee4aSfdl9k/pweQqG0hAUEoeo850sdrRCi1GOT0H50BYsoBXeN3ANVnw8mua6mm6t
	 9E1/4t6vsbmUn3dPJCpp/mz2N4fnZryql+RA+3evmV7tDqA04HiQkNhzeza5+V6oz7HMR
	 Wubl7Ap0DjTFyEFMssNVTK8wg1T0C9HYGUvSSlx/0Feg3LYkCZLNTvAzDwRYDTG3JMNro
	 ZNiSFeiVPZVBk6anZxaeaH6dT1Ah6lX6g1X6JkcJgKkaJ79U8nuJdwov1rZr0JsRlI4VH
	 4g1BZ4n/UM2pnmSOx7Z45945Ua2Qlmp5K8gTXxrBfz+7uGgzU3JJ3Jgx2+eNKa6pjJw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793977359;
	h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:
	 X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg:X-Received:
	 Received:From:To:Cc:Subject:Date:Message-ID:X-Mailer:X-Mailing-List:
	 List-Id:List-Post:List-Help:List-Subscribe:List-Unsubscribe:
	 List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=ivDi103aMzN/RYAG1NnirSPo+83ZQbk6RdxH4xYelZQ=;
	b=PgPJgL1MlDTgYtQBKDgAdIN0l6R5MjlCg5jYuMwNcsUxLVhhUiZbo85wjMO000jWJbFL
	 ex0wch/n9LiSO8DV9TyK953n4UqTo7+K81EQaS4Jx2MOF7JjMQeNAsa1Jf2TJNi1y0n18
	 5tfgtSqBMwFFoRqJAlvUfs7cwNGllsxL6f+sUnFEhgdEw5ipiyPpG+8hZgbhHVuZMdNs9
	 XHoPgNTLVI/NXRGxUAihutGidhAas+emLoXTltWP/hC3tPcAks8LTCGw7XUb8RbsTddTk
	 3zctD9y7zuQEQYN9w46hsdElMS3K7PsxyaCRABiQCwUX+OEuwfMIBviEYlVdsmcQRtw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dOpCm78M;
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 3737E6082BFD;
	Fri,  6 Nov 2026 15:02:39 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dOpCm78M
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.218.42
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1793977353;
	b=t/h5ddFExeFtD8XfhUY1H0DodKmzQxSyIhK6oXnoolgUGaB1d9log+HQ3C56/roexfkh
	 NO6SuTBcEYYpBleFo5Yo0aHFxOaeaFAqV9AwCcm3/hP89WT71Ni4jFZMF39m8h4ootLL5
	 GByXuRERXSiySRWVzo0Prr2yYz60c+y5fzwwVLTeaj+M4JtKVSlC2RHq+XmW6OP1a21YN
	 4qeUClTmgp3fP5RerpRbFe15CKEi04jo2OJQaB8SGU2GlWomBocdNcHanfl+h/QHl7ako
	 4HCxaIM13yhfmqYJtGpZnpg6cu3kyYpQobp5nSHl0MU+o8ORaouSqAM3klt1MsH2nGw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1793977353;
	h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature:
	 X-Gm-Message-State:X-Gm-Gg:X-Received:Received:From:To:Cc:Subject:
	 Date:Message-ID:X-Mailer:MIME-Version:Content-Type:
	 Content-Transfer-Encoding;
	bh=ivDi103aMzN/RYAG1NnirSPo+83ZQbk6RdxH4xYelZQ=;
	b=pmrH1Of3/TO1mVhhTRLGg5kxvikZtkde+KF9wzjPa2lG0FXJ7UCCChzzMMuK2UtsnC4k
	 /Gordx3FSBcUNqarOBYU+fRmbvfb6+J6MQOhmeojeqMLdJb16hj2h1ZcOHRiIE/RRt4Zk
	 C5lFkbNT//kqxoH5V6bllBdfqZiPDaq99xCJX6vx1OFmKKHJv5OXR2FgWSdCWVOgjYunw
	 i8pgN7zYi0CJKm+EtTqRj9ZBh4miVukjAJsu5bFcQD+OOButyCm0+XJQJ4bBUtot4zJFU
	 HlYitn8eIQkvkPamh/CkkK+MXbyMh+/KFsqtvP+R6OCSlhxCKF1zGLkEYW7VvhjrnaA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=gmail.com;
	spf=pass smtp.mailfrom=gmail.com;
	dkim=pass header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=dOpCm78M;
	arc=none smtp.remote-ip=209.85.218.42
X-Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42])
	(using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id A8341606EEAD
	for <netdev@vger.kernel.org>; Fri,  6 Nov 2026 15:02:32 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A8341606EEAD
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com
X-Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-c4ced671398so89008366b.3
        for <netdev@vger.kernel.org>; Fri, 06 Nov 2026 07:02:32 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=20260707; t=1793977351; x=1794582151; darn=vger.kernel.org;
        h=content-transfer-encoding:content-type:mime-version:message-id:date
         :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to
         :content-type;
        bh=ivDi103aMzN/RYAG1NnirSPo+83ZQbk6RdxH4xYelZQ=;
        b=dOpCm78M/VPxYuZmJ+Uwj1dorCYRDFb/sSDieAzjFqTTCFx/gDjqfCuioUbQ7MTO1L
         BYTyKhF3MRsF/FMOlQm5MAspqwSw6RiiVC4oe8sRP86Oui7/HyDVPy9a0nzAoViHynmB
         R92Ne2/IbwWMQRXOiaePiFSN/VT9QL7l/WB1urcbvl2suxX/9nS0wAPpRM6V5mtr1nWA
         MzD4BCwVp8Lc0Iep/uYWLwFhuqFAIgemof2I3CLPsJQYf+ETpsKsQXJZDbJOXe/AIl9l
         wjmSgCTqhLYlz/3ZenbtlD/+Pu1rPpl686A+2T3mfGi+KHJr50Tjo4fGLKzzCgcLaR84
         gYfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20260707; t=1793977351; x=1794582151;
        h=content-transfer-encoding:content-type:mime-version:message-id:date
         :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject
         :date:message-id:reply-to:content-type;
        bh=ivDi103aMzN/RYAG1NnirSPo+83ZQbk6RdxH4xYelZQ=;
        b=GD6KSpJB87+igAD2jXZJP8lVnJ4t8oxoxmSRaPrRdBZubP+q/ozhCEB8gp93ltoab9
         LA+tjz9RwTcoDQeFHM+AfE/3lyHGWX76IySswqcAr5EL2UUKRp7xguc9k54OTTIikzpL
         aUA9u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84yQ2D7WUn1JRCDwco1bbykjH5N7/ba4+8AjR55q
	by
X-Received: by 2002:a17:906:dc8b:b0:c49:cdc8:10cf with SMTP id a640c23a62f3a-c4d35531e7fmr229620166b.40.1793977350879;
        Fri, 06 Nov 2026 07:02:30 -0800 (PST)
X-Received: from desktop.home.arpa (2a02-1810-1e16-ac80-898e-1938-27eb-b890.ip6.access.telenet.be. [2a02:1810:1e16:ac80:898e:1938:27eb:b890])
        by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c4d356a2ee4sm84905766b.60.2026.11.06.07.02.30
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Fri, 06 Nov 2026 07:02:30 -0800 (PST)
X-Cc: Linus Walleij <linusw@kernel.org>,
	Luiz Angelo Daros de Luca <luizluca@gmail.com>,
	Alvin ล ipraga <alvin.sipraga@analog.com>,
	Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>,
	Paolo Abeni <pabeni@redhat.com>,
	Mieczyslaw Nalewaj <namiltd@yahoo.com>,
	linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.56.0
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list