Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
From: Gustavo Foletto Mora
Date: Fri Nov 20 2026 - 15:56:20 EST
Hi Mieczyslaw, Oleksij,
On a TP-Link EX511 v2 (RTL8367S-VB, family D), with v12 on top of the
rtl8365mb DCB series, an untagged frame that the switch forwards to a
port where its VLAN is egress-tagged leaves with PCP 1. With v12's
family D code before the rebase (v12-pre3 in OpenWrt PR #19644),
without the DCB series, it leaves with PCP 0.
Test: a VLAN-aware bridge with lan2 and lan3 as untagged members of
VLAN 100 (PVID 100), then lan3 made a tagged member ("bridge vlan add
dev lan3 vid 100 pvid"). 100 frames per case sent into lan2 and counted
by PCP behind lan3, over loopback cables:
- untagged: all leave tagged with PCP 1 (without the DCB series: PCP 0)
- tagged with PCP 1 or 5: the PCP is kept
- lan3 untagged again: all leave untagged
CONFIG_DCB is not set, so only the baseline from rtl8365mb_setup()
runs. The untagged PCP register (0x0851-0x0852) reads 0 in both cases,
while the port priority (0x0877-0x0878) goes from 0 to 1 with the
series (IEEE8021Q_TT_BE, set by rtl83xx_qos_init_port()). So on this
chip the PCP added to an untagged frame seems to follow the frame's
internal priority (here the port priority), not 0x0851, and untagged
traffic leaves a trunk as Background (PCP 1) instead of Best Effort. I
could not change the port priority to confirm it (no CONFIG_DCB).
The Realtek API in the board's stock firmware points the same way: for
family C the PVID is set together with a priority, written at 0x0851;
for family D, dal_rtl8367d_vlan_portPvid_set() writes only the VID and
rejects any priority other than 0, and dal_rtl8367d_qos_init() sets
the port priority to 0.
The rest of our tests give the same results on v12 as on v12-pre3.
Tested on OpenWrt's 6.18.44 with both series backported (PR #19644).
Thanks,
Gustavo