Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB
From: Gustavo Foletto Mora
Date: Sat Nov 21 2026 - 13:29:42 EST
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