Re: [PATCH net-next] net: dsa: mv88e6xxx: Add partial support for TCAM entries
From: Cedric Jehasse
Date: Mon Feb 16 2026 - 08:32:33 EST
> Have you looked at other generations of switches? The TCAM has been
> around a while. We need a clear understanding of what is generic, and
> what is specific to the mv88e6390 and mv88e6393. You can then pick the
> appropriate function names. Anything which is specific to these two
> devices needs to use the prefix mv88e6390 and mv88e6393. Anything
> which is generic to all switches with a TCAN can use the prefix
> mv88e6xxx. The 6320, 6341, 6352 families have a TCAM, so we need the
> naming to reflect if there is anything specific to a family, so
> somebody can later add TCAM support for the other families without
> having to rename things.
I've looked at the TCAM documentation for the other families.
The 6320 and 6352 use device address 0x1d for the TCAM registers,
while the 6341, 6390, and 6393 use device address 0x1f.
The match registers (pages 0 and 1) are almost identical across all of these
families.
The only difference is the register at page 0 offset 0x01 is used on the 6393
and is reserved on all the others.
The action registers differ between families:
* The devices with address 0x1d (6320 and 6352) share the same ingress action
registers (page 2).
* The devices with address 0x1f (6341, 6390, and 6393) share a common base
set of action registers. And the families with more features have
additional registers
* The 6341 has the base set of action registers and is a subset of the 6390
* The 6390 registers are a subset of the 6393 registers
I think:
* Writing the match part of the TCAM entry can be generic
* Writing the action part of the TCAM entry is family-specific,
but can be shared between some families as long as only the base set
of actions is implemented. The implementation in this patch could be used
for the 6341, 6390 and 6393
Cedric