TL-WR1043: switch
Stefan Bethke
stb at lassitu.de
Tue Dec 13 17:19:05 UTC 2011
Am 13.12.2011 um 16:41 schrieb Warner Losh:
>> I'm using sbin/ifconfig/if_media.c unchanged except for exporting some of the low level functions for printing and parsing media and mediaopt. I'm not certain where this code would go to be shared efficiently. Also, wherever it goes ifconfig still needs to be buildable for /rescue.
>
> Unless the code is huge, I'd like to see it in ifconfig as well from a usability standpoint. Why require yet another application to do this? We put all the wireless stuff into ifconfig.
>
> If the infrastructure really is getting in the way, I'd like to look at ways to make ifconfig more flexible and less in the way.
I'm fine with rolling all this into ifconfig, but please note that the switch configuration has very little to do with the systems ethernet interfaces. It just so happens that usually one of the systems ethernet interfaces is also connected to the switch. The PHYs connected to the switch are completely separate from any interface ifconfig manages*. I just wanted to simplify my own work by trying to use the existing miibus code.
The commands and the output from my prototype configuration utility are intentionally similar to ifconfig, but the ioctls go through a separate cdev, not through the socket ioctl. I believe it would be counterintuitive to try and fit the switch configuration through the interface configuration interface, as there is very little overlap beyond the PHY stuff.
If we want to integrate the switch configuration into ifconfig, the first question from a usability perspective would be how to identify the switch and it's various configurable entities (ports, vlans, queues, etc.), since that namespace would be distinct from the ifnet namespace.
Stefan
* On some switch chip models, one of the built-in PHYs is exposed through a separate MII, and can be used as any discrete PHY would be used. But that has little to do with the switch itself.
--
Stefan Bethke <stb at lassitu.de> Fon +49 151 14070811
More information about the freebsd-embedded
mailing list