[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201120072322.slrpgqydcupm63ep@lion.mk-sys.cz>
Date: Fri, 20 Nov 2020 08:23:22 +0100
From: Michal Kubecek <mkubecek@...e.cz>
To: tanhuazhong <tanhuazhong@...wei.com>
Cc: Andrew Lunn <andrew@...n.ch>, davem@...emloft.net,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linuxarm@...wei.com, kuba@...nel.org
Subject: Re: [RFC net-next 1/2] ethtool: add support for controling the type
of adaptive coalescing
On Fri, Nov 20, 2020 at 10:59:59AM +0800, tanhuazhong wrote:
> On 2020/11/20 6:02, Michal Kubecek wrote:
> >
> > We could use a similar approach as struct ethtool_link_ksettings, e.g.
> >
> > struct kernel_ethtool_coalesce {
> > struct ethtool_coalesce base;
> > /* new members which are not part of UAPI */
> > }
> >
> > get_coalesce() and set_coalesce() would get pointer to struct
> > kernel_ethtool_coalesce and ioctl code would be modified to only touch
> > the base (legacy?) part.
> > > While already changing the ops arguments, we could also add extack
> > pointer, either as a separate argument or as struct member (I slightly
> > prefer the former).
>
> If changing the ops arguments, each driver who implement
> set_coalesce/get_coalesce of ethtool_ops need to be updated. Is it
> acceptable adding two new ops to get/set ext_coalesce info (like
> ecc31c60240b ("ethtool: Add link extended state") does)? Maybe i can send V2
> in this way, and then could you help to see which one is more suitable?
If it were just this one case, adding an extra op would be perfectly
fine. But from long term point of view, we should expect extending also
other existing ethtool requests and going this way for all of them would
essentially double the number of callbacks in struct ethtool_ops.
Michal
Powered by blists - more mailing lists