Embedded switch instead of stadard PHY

Adrian Chadd adrian at freebsd.org
Mon May 9 06:30:23 UTC 2011


On 8 May 2011 21:16, Marius Strobl <marius at alchemy.franken.de> wrote:

[snip]

> Depends on what you understand by properly. One idea I particularly
> like is to handle switch ports as pseudo-interfaces hanging off of the
> the MAC driver parent roughly similar to vlan(4). That way you'd have
> per port link status and could configure the media.

The reason I like this is because I realise that these switch PHYs
tend to have quite a bit of varying but useful functionality, that
isn't just "multi-port single-VLAN switch PHY."

Besides there being per-port status, there can also be per-port
error/packet/byte counts, VLAN setups (tagged/untagged), QoS
configuration, sometimes some L2 filtering and (even more creepy)
sometimes L3 filtering/routing.

They can sometimes hang off the MII bus, but ISTR datasheets which
show they can hang off an SPI bus too. So although they can look like
PHYs complete with the register layouts, there's extended commands to
implement other features as well. There may even be more than one CPU
ethernet port hooked up - I think the Routerstation Pro has both CPU
GigE ports wired to the switch PHY and defaults to mapping port 1 ->
arge0 and Port 2,3,4,5 -> arge1.

I'd really appreciate it if someone were able to sit down, take the
existing work done by Luiz and others and flesh out a bare minimum set
of switch PHY drivers that configure them with some sensible defaults
(rather than leaving it up to the boot firmware to do it for you) and
have all of the interface/configuration glue in the kernel. As I said
earlier, figuring out how to expose all the functionality - including
per-port error counts and such - can come later.


Adrian


More information about the freebsd-hackers mailing list