Re: [PATCH net-next v12 13/13] net: dsa: realtek: rtl8365mb: add support for RTL8367S-VB

From: Mieczyslaw Nalewaj

Date: Mon Nov 23 2026 - 07:47:55 EST


Hi Oleksij,

On Mon, Nov 23, 2026 at 01:46:00PM +0100, Oleksij Rempel wrote:
> 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.

That matches what Gustavo observed on the RTL8367S-VB: without
0x0851/0x0852, newly inserted 802.1Q tags take their PCP directly from
the frame's internal priority.

> 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

Good to know, thanks. Numbering the internal priorities like PCP values
on family D (matching the vendor RTL8367D API) makes the newly inserted
tag match the traffic type without needing remarking.

> > [...] 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.

Agreed. I have refactored the QoS priority handling behind
rtl8365mb_family_info hooks (qos_iprio_to_hw, qos_hw_to_iprio and
qos_set_untag_pcp) and implemented the PCP-numbered family D hooks on
top of that in v14, which I will send shortly.

Regards,
Mieczyslaw