Re: [PATCH net-next v19 01/13] rtase: Add pci table supported in this module

From: Andrew Lunn
Date: Wed May 22 2024 - 11:53:52 EST


> Thank you very much for your clear reply.
>
> As I mentioned, it works like a NIC connected to an Ethernet Switch, not a
> Management port.
> The packets from this GMAC are routed according to switch rules such as
> ACL, L2, .... and it does not control packet forwarding through any special
> header or descriptor. In this case, we have our switch tool which is used
> for provisioning these rules in advance. Once the switch boots up, the
> rules will be configured into the switch after the initialization. With this
> driver and the provisioning by our switch tool, it can make switch forward
> the frame as what you want. So it's not a DSA like device.

How does spanning tree work? You need to send bridge PDUs out specific
ports. Or do you not support STP and your network must never have
loops otherwise it dies in a broadcast storm? That does not sound very
reliable.

There are other protocols which require sending packets out specific
ports. Are they simply not supported?

> In another case, we do have other function which is used for controlling
> the switch registers instead of sending packets from the switch ports.
> At the meanwhile, we are investigating how to implement the function to
> Integrate into switchdev.

In general, we don't support configuration of hardware from user
space, which is what your switch tool sounds like. We will want to see
a switchdev driver of some form.

It might be you need to use VLAN overlays, using
net/dsa/tag_8021q.c. Each port of the switch is given a dedicated
VLAN, and the switch needs to add/strip the VLAN header. Its not
great, but it does allow 'simple' switches to have basic functionality
if they are missing header/dma descriptor support for selecting ports.

Andrew