Article View: linux.kernel.netdev
Article #16695Re: [PATCH net v2 2/2] net: dsa: realtek: rtl8365mb: keep the neutral PVID in VLAN-unaware bridges
From: Stijn Cleynhens
Date: Sun, 15 Nov 2026 16:17
Date: Sun, 15 Nov 2026 16:17
74 lines
14433 bytes
14433 bytes
On Tue, 10 Nov 2026 15:21:01 +0000 netdev-bot+sashiko@kernel.org wrote:
> - [High] In VLAN-unaware bridges, rtl8365mb_port_commit_pvid() now sets
> pvid = 0 (VLANMC index 0, EVID 0).
Jakub, as you asked for a reply: the review is correct. Multicast
entries have no EFID, so with all VLAN-unaware bridges and standalone
ports classified to VID 0 and VID 0 in IVL, they share one {MAC, VID 0}
entry. v3 will not do that.
Luiz, this ties in with your mail. One correction first: the patch
does not move ports without a PVID to the bridge PVID, it does the
reverse, it keeps the neutral PVID on the ports of a VLAN-unaware
bridge. Your main point stands though, and I tested the SVL direction
on hardware.
The switch has a port-based FID (enable mask at 0x07ac, one FID per
port from 0x07ad). I tried it on an RTL8367S and on an RTL8367S-VB, the
latter with the L2 entry layout from Mieczyslaw's v10:
- The port-based FID alone changes nothing while the VLAN4k entry of
the VLAN a frame is classified to has IVL set. The learned key
stays {MAC, VID}.
- With that VLAN4k entry in SVL, the learned key is {MAC, FID}, and
the FID is the one of the ingress port, not the one in the VLAN4k
entry.
- A static unicast entry written as SVL with the port's FID replaces
the learned one in place. The roaming case from the commit message
passes, 10 of 10 pings, on both chips.
- Multicast entries follow the port's FID as well. With an SVL entry
whose only member is an unused port, 0 of about 40 frames reached
the CPU while the ingress port had the entry's FID, and 38 (39 on
the VB) once I gave the port another FID.
- Two VLAN-unaware bridges on the RTL8367S, each with its own FID: the
same MAC and the same group in both give separate entries, deleting
the group in one bridge leaves the other's entry alone, and traffic
of one bridge does not hit the entry of the other.
- Tagged frames, on both chips: with the VLAN4k entry of VLAN 20 in
SVL, a station sending in VLAN 20 is learned as {MAC, port FID} and
the roaming case passes, 10 of 10. With the entry in IVL as today it
fails, 0 of 10.
So for v3 I would drop patch 1, leave VLAN 0 in SVL, and:
- give each VLAN-unaware bridge its own FID and enable it on the
ports of the bridge while they do not filter,
- keep the neutral PVID on those ports, as patch 2 does now, so that
untagged frames are classified to a VLAN in SVL,
- write the VID 0 FDB and MDB entries from DSA as SVL with the FID of
the bridge,
- as a separate patch, write a VLAN4k entry as IVL only while one of
its member ports filters, and as SVL otherwise, so that tagged
frames in a VLAN-unaware bridge are looked up by MAC as well.
VID 0 is then no longer part of any lookup key, and multicast is
separated per bridge by the FID. vlan_filtering_is_global is not
needed. What remains is a VLAN that a filtering and a non-filtering
bridge on the same switch both use: it stays in IVL.
The FID is 4 bits on the RTL8367S and 2 bits on the VB, which limits
the number of such bridges.
Does this direction work for you? As this is no longer a small fix, I
will send v3 for net-next, keeping the Fixes tag, unless you prefer it
in net.
pw-bot: cr
Stijn
Technical Details
Message-ID:
<20261115161701.2351256-1-stijncleynhens@gmail.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363759-linux-kernel-netdev=dewy.ruReferences:
<179432406157.994134.6897059294926012210@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-363759-linux-kernel-netdev=dewy.ru
From: stijncleynhens@gmail.com (Stijn Cleynhens)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v2 2/2] net: dsa: realtek: rtl8365mb: keep the neutral PVID in VLAN-unaware bridges
Date: Sun, 15 Nov 2026 17:17:01 +0100
Organization: Usenet Network
Message-ID: <20261115161701.2351256-1-stijncleynhens@gmail.com>
References: <179432406157.994134.6897059294926012210@kernel.org>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="1848249"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:N7tXvoda/63DjMK3IQlGj1Sfano= sha256:Zod1qCT1n2Gsz9DtyOscb2sOXIg71jpdtFsIcOx7/60=
sha1:Znxyo5pcQCh39hh5rbf+/VOcLKI= sha256:1CLZ34DczeUAQA3RE5FpL/IVcGiM8jVXbz2uXPtY1pY=
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 B54F2114A08; Sun, 15 Nov 2026 19:17:43 +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 zMg0oUB7i9vN;
Sun, 15 Nov 2026 19:17:40 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-363759-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 61652114A07; Sun, 15 Nov 2026 19:17:31 +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 4DCB7391C1; Sun, 15 Nov 2026 16:17:27 +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=1794759447;
b=y88nZ7kLgE9iqVh4TgbGC9R5kTM8UPWD+Itp1Wyz7jfLBTAl480YxqKue+VDiBCHTEGm
hVnRQm6d53Pq4TZD4hTVtg1W59tCslIoyGcdtBOmDZM9PxA7bG+peEwgIavWdoF0bXwMp
bHsVBcehwS9/hw19a06w1SOCN/7s6rlpHzf3WguKjDAl44YkXvAY0Wimpr1WQbnFCqB6R
yN/kpwMj38zNd3I6OR+lh4FjfWTgIfNv7ThXWYHY4tPQdV2J9bi8kul4XYd8Sfon0aIOo
nvwwk76W3I1uEGBCZn2sXaB22CFXdDg945PFBByYX+cS6lApbyCbNZXnoOdyXU8+Pbw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794759447;
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:In-Reply-To:
References:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:
Content-Transfer-Encoding;
bh=q/z14z+d7POgY9c+yc0G66ZMePGWOZhS5NXoDt9IfGc=;
b=MNDY6oZbTz2aS5HLGzU36Wf9zXEF5eu9ITWaqeOlvE/j33d39ZBxSshAxYeDWbvjAzwZ
FaNin5ZtRW4KFXe4g+xxhcWoyncgcytUHKNhXKFAjWKwpPjiniWLTgn2RH2+gRxv+ZnrJ
ktgyVZd85atf5cMMJRiqCeeUhCvusWVt8VTWxIwAi2qLW9m4+FN//FjWGa9n9fRbQyAlv
zWyYUr7GJ2F/Qy5IaK44p9vdmJtY7t/9Nfk6fKcXyw9g7XZgpM9tX2IH1WiHgrZwxaUWb
82ERZfEhSXoqRAwSmezW7SEmP1qRLwxE0hszPFU/0NaR4UpT2ao4DlegIaForNAsaDg==
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=R2rJaiQ5;
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 1FFF4606A327;
Sun, 15 Nov 2026 16:17:27 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20260707 header.b=R2rJaiQ5
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.45
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1794759441;
b=ahcwkk7y7ixgplUnSbf5c+Tah0Pmil3KkJn8/FZ0bdetFbizJkga5bD4E1MeRe2eOve2
pDHKO47ikorOzPT4NSeHbnC0FCCRmcrTTA9r/FVZTT//CfDYZv1pqaxRMDsBuRfA9VJVl
tQ9wpsXgLK/4oVhoC1m5nKem2MkgBKJ9gLQpNK3kmUKJlENR6URCLfW8oPrRBXQlL/mvE
YwtKe9E3EDQW4wge0yR1QtHJ1nN/hIXxOzrQ1plyxm5NJAElhsIhJMp26zr8mElGGAy9k
qu5Zz1Sx1VDsc7jGz05vA34CQQbErIlOKEaio7p00HPR8GiQTNxt1cSs2ftmFJPjZjw==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1794759441;
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:In-Reply-To:References:MIME-Version:
Content-Transfer-Encoding;
bh=q/z14z+d7POgY9c+yc0G66ZMePGWOZhS5NXoDt9IfGc=;
b=yMc1JKllQDAh2LhaKyMj5NvW3U1Wx37POMUYu1TerxP6CZ/PBKWa5tOORR+XMA67elHo
sNGTtSndX08CGbuoyTcvWofjnj9tyoXswi6aDk0TnmvJ6eVVQ+heuH+cmirM8SIsrEK3J
+YC+kYFAS1ZPcXCDnJ51BcODAtx6jMqJwzeSNrJHPvNB628Ot8M5yYnuYgCLyoY9DWf0m
vG9+DiC8v6E0mbkqKfrYJQXIw83aeO6rBFb4TyV6P0aBhhi8B1aygVtEZLz3YlFFtGTJA
QZQZjjIoXkUvM6VnndE36RaRrsTDicP/upMNpHodrpLR4NGA8pOckOqj7l6BZMdM0Pg==
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=R2rJaiQ5;
arc=none smtp.remote-ip=209.85.208.45
X-Received: from mail-ed1-f45.google.com (mail-ed1-f45.google.com [209.85.208.45])
(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 E9719606A31D
for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 16:17:20 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org E9719606A31D
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-ed1-f45.google.com with SMTP id 4fb4d7f45d1cf-6b56bbf8330so3553036a12.3
for <netdev@vger.kernel.org>; Sun, 15 Nov 2026 08:17:20 -0800 (PST)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20260707; t=1794759439; x=1795364239; darn=vger.kernel.org;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=q/z14z+d7POgY9c+yc0G66ZMePGWOZhS5NXoDt9IfGc=;
b=R2rJaiQ5HqWalGyhLP6BMT2OUXd2xSj7dwmo3raaDreSDVlsh0SXIqrJvIz7Umj1ke
iqXhOtvHFOlwItAGVn7ePPpyXoVPUG1UvvHNP/flsEHZKgJG7TOAt16YHnR8VosReTof
i5pQ8UELMRn2LySK6mJkLCUZFFZ/ZVW6J+zyNd+CxEd8I8OPS7rBRi2Lp90oFBimDoJh
q0hzdml2jg1San9mUlzZ2uHV9hLtF2tC+elpQyFBm7MEYdKuxmm4CsheWxvzBKS9h8lv
fhT/E86cAWJkTw3yexjtEZIibs29IZT+3wl5NRPagNRV0NZEFXbfXSzVFmvEduBbwOwd
z7jA==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1794759439; x=1795364239;
h=content-transfer-encoding:mime-version:references:in-reply-to
: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=q/z14z+d7POgY9c+yc0G66ZMePGWOZhS5NXoDt9IfGc=;
b=SY+STMvJweqmUUCaUKAfPibm2oluepuZ0uvZATpiQGJYI22mgLEpzYL/AoMUmr5PbE
KDkXA6Bf9eYoq3TBIQiNX1OvTziuyF5SXFcGS8C3gMfbYJ68uStRjtE/acNXSmTg1Y1X
V12lxz740gpr3sU/I5e2pd51w05cNMXYnGqu3wVhWz6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Q==
X-Received: by 2002:a17:907:1c85:b0:c49:b8ec:a9e3 with SMTP id a640c23a62f3a-c50963bbc82mr656270766b.43.1794759439146;
Sun, 15 Nov 2026 08:17:19 -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-c5095b57c5bsm319832666b.49.2026.11.15.08.17.18
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Sun, 15 Nov 2026 08:17:18 -0800 (PST)
X-Cc: netdev@vger.kernel.org,
netdev-bot+sashiko@kernel.org,
Linus Walleij <linusw@kernel.org>,
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>,
Paolo Abeni <pabeni@redhat.com>,
Mieczyslaw Nalewaj <namiltd@yahoo.com>,
linux-kernel@vger.kernel.org
X-Mailer: git-send-email 2.56.0
X-In-Reply-To: <179432406157.994134.6897059294926012210@kernel.org>
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