* Port attributes configuration
@ 2014-07-29 9:15 Marco Varlese
2014-07-29 13:46 ` John Fastabend
2014-07-29 17:53 ` Cong Wang
0 siblings, 2 replies; 3+ messages in thread
From: Marco Varlese @ 2014-07-29 9:15 UTC (permalink / raw)
To: netdev
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.
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;
2) sysfs: adding new files under /sys/class/net/DEVICE/ and handle the
sysfs extensions in my kernel driver;
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?
What would you suggest as the best approach here to have a good
solution accepted by most?
Thanks,
Marco
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Port attributes configuration
2014-07-29 9:15 Port attributes configuration Marco Varlese
@ 2014-07-29 13:46 ` John Fastabend
2014-07-29 17:53 ` Cong Wang
1 sibling, 0 replies; 3+ messages in thread
From: John Fastabend @ 2014-07-29 13:46 UTC (permalink / raw)
To: Marco Varlese; +Cc: netdev
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 majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
John Fastabend Intel Corporation
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Port attributes configuration
2014-07-29 9:15 Port attributes configuration Marco Varlese
2014-07-29 13:46 ` John Fastabend
@ 2014-07-29 17:53 ` Cong Wang
1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2014-07-29 17:53 UTC (permalink / raw)
To: Marco Varlese; +Cc: netdev
On Tue, Jul 29, 2014 at 2:15 AM, Marco Varlese <marco.varlese@gmail.com> 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.
>
Netlink is definitely preferred unless you have a reason not to use it.
You don't give any details so I can't tell much.
You probably don't have to write a new tool from scratch, i.e. parsing
netlink attributes all by yourself, you probably can just patch existing
iproute2.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-07-29 17:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-07-29 9:15 Port attributes configuration Marco Varlese
2014-07-29 13:46 ` John Fastabend
2014-07-29 17:53 ` Cong Wang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).