[OpenWrt-Devel] [PATCH 1/3] swconfig: add SWITCH_TYPE_LINK and support sending link info to user space

Stefan Rompf stefan at loplof.de
Sun Dec 20 13:23:20 EST 2015


Hi Rafał,

On Mittwoch, 16. Dezember 2015 18:19:01 Rafał Miłecki wrote:

> So far we were sending link data as a string. It got some drawbacks:
> 1) Didn't allow writing clean user space apps reading link state. It was
>    needed to do some screen scraping.
> 2) Forced whole PORT_LINK communication to be string based. Adding
>    support for *setting* port link required passing string and parting
>    it in the kernel space.

indeed, this interface looks a lot better than passing a string. It will make 
setting the link parameters easier.

Minor nitpick: I'm not sure about the naming of these attributes:

> +	SWITCH_LINK_FLAG_ADVERTISED_100BASET_FULL,
> +	SWITCH_LINK_FLAG_ADVERTISED_1000BASET_FULL,

As far as I understand the code, they specify whether EEE should be 
adverstised / is enabled for a specific speed. Therefore maybe they should be 
called f.e.

SWITCH_LINK_EEE_100BASET and
SWITCH_LINK_EEE_1000BASET

Stefan
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list