Subject: Re: [RFC] ethtool netlink interface

From: Jeff Garzik <[email-masked]>
Date: Mon, 25 Feb 2008 12:30:07 -0500

Thomas Graf wrote:
> Hello,
> 
> Before I continue to finish this work I'd like to get a few comments
> on my implementation attempt.
> 
> The following patch implements the ETHTOOL_SSET and ETHTOOL_GSET
> command via netlink. The individual commands are implemented as
> separate functions and hooked into a table holding a validate,
> set and fill function for each command. Additionaly an entry must
> be made in the attribute policy to validate attributes when received.
> 
> Each ethtool command bundle is stored as a nested attribute in
> the regular link netlink message, therefore, unlike the ioctl
> interface, multiple ethtool commands can be issued in the same
> message allowing for links to be fully configured with a single
> message.
> 
> There is one big disadvantage: Due to the nature of ioctl it is
> basically not possible to share any code between the ioctl and
> neltink implementation therefore it implies duplicating code
> unless we want to do the same hack as fib fronted by constructing
> netlink messages inside the kernel.

No objections, and it certainly makes sense that you would need a 
separate "thunking" layer to unwrap ethtool-nl msgs rather than handling 
an ioctl.

However, I would think it inconsistent to only do SSET/GSET.  If others 
are OK with this patch, are you open to implementing the full set of 
ethtool operations?

	Jeff