Thread View: linux.kernel.netdev
3 messages
3 total messages
Started by Gustavo Foletto Mora
Fri, 20 Nov 2026 20:56
Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Author: Gustavo Foletto Mora
Date: Fri, 20 Nov 2026 20:56
Date: Fri, 20 Nov 2026 20:56
38 lines
13832 bytes
13832 bytes
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
Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Author: Gustavo Foletto Mora
Date: Sat, 21 Nov 2026 18:29
Date: Sat, 21 Nov 2026 18:29
41 lines
13885 bytes
13885 bytes
Hi Mieczyslaw, On 21/11/2026 Mieczyslaw Nalewaj wrote: > 1. Does a non-zero value written to 0x0851 on your board change > anything (PCP of untagged frames, or the register reading back)? Not yet answered: on my test image the switch registers are read-only from userspace (regmap debugfs) and CONFIG_DCB is not set, so nothing writes 0x0851 other than the baseline's 0. It needs a test kernel that allows debugfs writes; I will report back if I do that. > 2. Does the Realtek API in your stock firmware have an 802.1p > remarking table (internal priority -> PCP, with a per-port > enable) for this chip, and at which registers? Yes. The family D functions write the same registers as family C's rtl8367c_setAsicRemarkingDot1p*(): - dal_rtl8367d_qos_1pRemarkEnable_set(): per-port enable, bit 12 of 0x000E + 0x20 * port - dal_rtl8367d_qos_1pRemark_set(): internal priority -> PCP, 0x1211 for priorities 0-3 and 0x1212 for 4-7, 3 bits per priority at a 4-bit stride - dal_rtl8367d_qos_1pRemarkSrcSel_set(): the remark source, 0x09DF bit 2 dal_rtl8367d_qos_init() clears the per-port enable on every port. One thing to keep in mind: the remark applies to every frame that leaves the port tagged, not only to the untagged ones. If I read the baseline's priority decision right (port priority only, weights 0001 0000 0000 0000 at 0x087b), every frame gets internal priority 1, so an inverse table would also turn tagged PCP 5 into PCP 0, while today tagged frames keep their PCP (1 and 5 measured). With an apptrust that includes PCP, the inverse table would keep the tagged PCPs and give untagged frames PCP 0. I have not tried any of this on hardware. Thanks, Gustavo
Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
Author: Oleksij Rempel
Date: Mon, 23 Nov 2026 08:01
Date: Mon, 23 Nov 2026 08:01
34 lines
11611 bytes
11611 bytes
Hi Gustavo, Mieczyslaw, thank you. I have no family D hardware, so only some pointers from family C. On 21/11/2026 Gustavo Foletto Mora wrote: > On 21/11/2026 Mieczyslaw Nalewaj wrote: >> 1. Does a non-zero value written to 0x0851 on your board change >> anything (PCP of untagged frames, or the register reading back)? > > Not yet answered: on my test image the switch registers are read-only On family C the added tag takes its PCP from 0x0851/0x0852. If family D ignores that field, the tag probably carries the internal priority unconverted. Other places that can set this PCP on family C, in case they matter on family D: - remarking, bit 12 of 0x000e + 0x20 * port (off after reset) - 0x093a bit 0: when set, an untagged IPv4 frame takes its PCP from the DSCP table > [...] so an inverse table would also turn tagged PCP 5 into PCP 0 Agreed, without PCP trust that table would change tagged frames too. Family D is not merged, so the DCB code has no bug in net-next and needs no Fixes: tag. I think the family D part belongs behind a hook in rtl8365mb_family_info, like VLAN, PVID and L2 in v12. Regards, Oleksij
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads