Re: [PATCH net-next v2 3/4] net: dsa: yt921x: Add port police support

From: David Yang

Date: Fri Apr 03 2026 - 11:20:42 EST


On Fri, Apr 3, 2026 at 10:19 PM Andrew Lunn <andrew@xxxxxxx> wrote:
>
> > Does it unnecessarily depend on __int128? Otherwise it's good.
>
> Ah, it seems to be a 64 bit architecture only thing.
>
> Shame, because it would make this code easier to understand.
>
> For these u96 values, the masks i looked at would fit into a u64. Are
> there any fields which cross from bits < 64 to > 64? Could you
> represent it as a u64+u32?
>
> Andrew

EBS crosses word #0 and #1 and CBS crosses word #1 and #2, and I
didn't find any boundary patterns among other u96 registers.

But maybe I could drop those multi-word register helpers and use
manual updates, since I have to use unaligned modifications anyway.