All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Heng Qi <hengqi@linux.alibaba.com>
Cc: netdev@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>,
	"David S. Miller" <davem@davemloft.net>,
	Jason Wang <jasowang@redhat.com>,
	"Michael S. Tsirkin" <mst@redhat.com>,
	vadim.fedorenko@linux.dev,
	Alexander Lobakin <aleksander.lobakin@intel.com>,
	Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Subject: Re: [PATCH net-next v2 2/2] virtio-net: support dim profile fine-tuning
Date: Fri, 29 Mar 2024 08:18:04 -0700	[thread overview]
Message-ID: <20240329081804.1b7de830@kernel.org> (raw)
In-Reply-To: <7e54d23c-caa6-4bbd-aef6-26ed6a9dd889@linux.alibaba.com>

On Fri, 29 Mar 2024 16:56:12 +0800 Heng Qi wrote:
> > About the uAPI - please make sure you add the new stuff to
> > Documentation/netlink/specs/ethtool.yaml
> > see: https://docs.kernel.org/next/userspace-api/netlink/specs.html
> >
> > And break up the attributes, please, no raw C structs of this nature:
> >
> > +	return nla_put(skb, attr_type, sizeof(struct dim_cq_moder) *
> > +		       NET_DIM_PARAMS_NUM_PROFILES, profs);
> >
> > They are hard to extend.  
> 
> Sorry, I don't seem to get your point, why does this make extending hard?

It's not possible to make some fields optional later on.
It's also possible that user space will make assumptions about the size
of this struct so we won't be able to add fields.

So it's preferred to render the C struct members as individual netlink 
attributes. Look around ethtool netlink, you'll see there are no
structs dumped.

> Are you referring to specifying ETHTOOL_A_COALESCE_RX_EQE_PROFILE
> as a nested array, i.e. having each element explicitly have an attr 
> name? or passing the u16 pointer and length as arguments?


  reply	other threads:[~2024-03-29 15:18 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-27  9:19 [PATCH net-next v2 0/2] ethtool: provide the dim profile fine-tuning channel Heng Qi
2024-03-27  9:19 ` [PATCH net-next v2 1/2] ethtool: provide customized dim profile management Heng Qi
2024-03-27  9:19 ` [PATCH net-next v2 2/2] virtio-net: support dim profile fine-tuning Heng Qi
2024-03-27 14:45   ` Alexander Lobakin
2024-03-28  0:32     ` Jakub Kicinski
2024-03-28  2:12       ` Xuan Zhuo
2024-03-28 16:48         ` Jakub Kicinski
2024-03-29  8:56           ` Heng Qi
2024-03-29 15:18             ` Jakub Kicinski [this message]
2024-03-28  2:26       ` Heng Qi
2024-03-28  2:02     ` Heng Qi
2024-03-28  7:27     ` Michael S. Tsirkin
2024-03-28  7:27   ` Michael S. Tsirkin
2024-03-28  7:51     ` Heng Qi

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=20240329081804.1b7de830@kernel.org \
    --to=kuba@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hengqi@linux.alibaba.com \
    --cc=jasowang@redhat.com \
    --cc=mst@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=vadim.fedorenko@linux.dev \
    --cc=vladimir.oltean@nxp.com \
    --cc=xuanzhuo@linux.alibaba.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.