All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Michal Kubecek <mkubecek@suse.cz>
Cc: tanhuazhong <tanhuazhong@huawei.com>,
	davem@davemloft.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org, linuxarm@huawei.com,
	kuba@kernel.org
Subject: Re: [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing
Date: Fri, 20 Nov 2020 14:39:38 +0100	[thread overview]
Message-ID: <20201120133938.GG1804098@lunn.ch> (raw)
In-Reply-To: <20201120072322.slrpgqydcupm63ep@lion.mk-sys.cz>

On Fri, Nov 20, 2020 at 08:23:22AM +0100, Michal Kubecek wrote:
> 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.

coccinella might be useful here.

	   Andrew

  reply	other threads:[~2020-11-20 13:40 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-19  3:54 [RFC net-next 0/2] net: updates for -next Huazhong Tan
2020-11-19  3:54 ` [RFC net-next 1/2] ethtool: add support for controling the type of adaptive coalescing Huazhong Tan
2020-11-19  4:15   ` Andrew Lunn
2020-11-19  8:56     ` tanhuazhong
2020-11-19 22:02       ` Michal Kubecek
2020-11-20  1:52         ` tanhuazhong
2020-11-20  2:59         ` tanhuazhong
2020-11-20  7:23           ` Michal Kubecek
2020-11-20 13:39             ` Andrew Lunn [this message]
2020-11-20 21:22               ` Michal Kubecek
2020-11-21  1:56                 ` tanhuazhong
2020-11-19 21:43     ` Michal Kubecek
2020-11-19  3:54 ` [RFC net-next 2/2] net: hns3: add support for dynamic interrupt moderation Huazhong Tan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201120133938.GG1804098@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=mkubecek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=tanhuazhong@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.