Re: [PATCH net-next v3 6/8] net: dsa: soce: Add basic support for SoC-e switch IP cores

From: Vasilij Strassheim

Date: Wed Sep 30 2026 - 15:24:56 EST


On Wed, 2026-09-30 at 20:29 +0200, Andrew Lunn wrote:
> > > Once all the setup is finished, what is the state of the switch?
> > >
> > > What we want is that the user ports are isolated from each other, and
> > > can only exchange frames with the CPU. That makes the hardware
> > > basically a port expander, and you do bridging in software. Later
> > > patches can then add offload of bridging, and whatever else the
> > > hardware can do, which Linux can also do in software.
> >
> > That is exactly the state I want to achieve after the setup.
>
> Great. Just looking at the code, this is not obvious. Most switches
> tend to default to all ports can talk to all ports, and you need to
> tell it which port is the CPU port, and block everything else. So i
> look for such code, and did not see anything here.

The CPU port is set during synthesis of the jellyware. The driver must
therefore assume that it will be configured correctly in the DT.
There is only one read-only register that I could use to determine
which port has been configured as the CPU port. Until now, I thought it
wasn't worth checking.
I will take a closer look at that, maybe it is worth to reduce any
assumptions.

>
>      Andrew

Thanks,
Vasilij