Subject: Re: Port attributes configuration

From: John Fastabend <[email-masked]>
Date: Tue, 29 Jul 2014 06:46:37 -0700

On 07/29/2014 02:15 AM, Marco Varlese wrote:
> I'm working on a new platform and the network interfaces will have
> quite few new options (roughly 50) to configure. What I definitely
> want to achieve is to use the common tools available on Linux to let
> users configure the port attributes from user-space without writing a
> brand new ad-hoc tool.

Its hard to say without knowing what the attributes are and how many
of them are new.

>
> Considered my requirements I think I've a choice of configuring these
> port attributes via:
> 1) ethtool: this I guess will require patches to the tool itself plus
> patches to the kernel to extend the IOCTL calls performed by it;

Many devices already expose many statistics via ethtool -S and features
via ethtool -k. Depending on the attribute it may make sense to add
it here.

> 2) sysfs: adding new files under /sys/class/net/DEVICE/ and handle the
> sysfs extensions in my kernel driver;

Typically most these are read only options. Without knowing your options
I would guess this is the least likely.

> 3) netlink: I understand this seems to be the path most people prefer
> but I think it will require a new tool to be written?
>

Writing a new tool is not necessarily a bad thing IMO but again need
more details what type of options.

> What would you suggest as the best approach here to have a good
> solution accepted by most?

more details.

>
>
> Thanks,
> Marco
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to [email-masked]
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>

-- 
John Fastabend         Intel Corporation