public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Gal Pressman <gal@nvidia.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	netdev@vger.kernel.org, Andrew Lunn <andrew@lunn.ch>,
	Simon Horman <horms@kernel.org>,
	Dragos Tatulea <dtatulea@nvidia.com>
Subject: Re: [PATCH net-next v2] ethtool: Clarify len/n_stats fields in/out semantics
Date: Wed, 14 Jan 2026 19:31:21 -0800	[thread overview]
Message-ID: <20260114193121.7366d02d@kernel.org> (raw)
In-Reply-To: <e4f56293-34f4-4f1f-a3a2-456c46f25071@nvidia.com>

On Wed, 14 Jan 2026 08:50:01 +0200 Gal Pressman wrote:
> On 14/01/2026 5:06, Jakub Kicinski wrote:
> > On Mon, 12 Jan 2026 13:57:08 +0200 Gal Pressman wrote:  
> >> --- a/include/uapi/linux/ethtool.h
> >> +++ b/include/uapi/linux/ethtool.h
> >> @@ -1101,6 +1101,13 @@ enum ethtool_module_fw_flash_status {
> >>   * Users must use %ETHTOOL_GSSET_INFO to find the number of strings in
> >>   * the string set.  They must allocate a buffer of the appropriate
> >>   * size immediately following this structure.
> >> + *
> >> + * Setting @len on input is optional (though preferred), but must be zeroed
> >> + * otherwise.
> >> + * When set, @len will return the requested count if it matches the actual
> >> + * count; otherwise, it will be zero.
> >> + * This prevents issues when the number of strings is different than the
> >> + * userspace allocation.  
> > 
> > Thanks the new text looks good, but we should also remove the 
> > "On return, the " from the field kdoc?  
> 
> I think it makes sense to keep.
> 
> The new text clarifies the in behavior, but the out behavior remains.

I'd interpret the "On return," as an indication that it's an output
only field. Not saying that's an intelligent interpretation, but it's
an existence proof. The uAPI comments should avoid ambiguity...

      reply	other threads:[~2026-01-15  3:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 11:57 [PATCH net-next v2] ethtool: Clarify len/n_stats fields in/out semantics Gal Pressman
2026-01-14  3:06 ` Jakub Kicinski
2026-01-14  6:50   ` Gal Pressman
2026-01-15  3:31     ` Jakub Kicinski [this message]

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=20260114193121.7366d02d@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dtatulea@nvidia.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox