netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Jakub Kicinski <kuba@kernel.org>,
	 Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: davem@davemloft.net,  netdev@vger.kernel.org,
	 edumazet@google.com,  pabeni@redhat.com,  andrew+netdev@lunn.ch,
	 horms@kernel.org,  willemb@google.com,  petrm@nvidia.com,
	 dw@davidwei.uk,  shuah@kernel.org,
	 linux-kselftest@vger.kernel.org
Subject: Re: [PATCH net-next 4/5] selftests: hw-net: toeplitz: read indirection table from the device
Date: Fri, 21 Nov 2025 21:16:57 -0500	[thread overview]
Message-ID: <willemdebruijn.kernel.53e77e2eea78@gmail.com> (raw)
In-Reply-To: <20251121173203.7bc1a3f4@kernel.org>

Jakub Kicinski wrote:
> On Fri, 21 Nov 2025 18:12:16 -0500 Willem de Bruijn wrote:
> > > +	if (rsp->_count.indir > RSS_MAX_INDIR)
> > > +		error(1, 0, "RSS indirection table too large (%u > %u)",
> > > +		      rsp->_count.indir, RSS_MAX_INDIR);
> > > +
> > > +	/* If indir table not available we'll fallback to simple modulo math */
> > > +	if (rsp->_count.indir) {
> > > +		memcpy(rss_indir_tbl, rsp->indir,
> > > +		       rsp->_count.indir * sizeof(rss_indir_tbl[0]));  
> > 
> > It can be assumed that rsp->indir elements are sizeof(rss_indir_tbl[0])?
> > 
> > Is there a way to have the test verify element size. I'm not that
> > familiar with YNL.
> 
> I suspect the reaction may be because drivers often use a smaller type.
> But at the uAPI level the indirection table has always been represented
> as an array of u32 (I mean the ioctl). And in the core we also always
> deal with u32s. The Netlink type is not allowed to change either 
> (it's a "C array" not individual attributes so members must be known
> size).
> 
> LMK if you want me to add an assert or rework this. We could technically
> keep the rsp struct around and use it directly?
> 
> Not fully convinced it's worth a respin, but LMK.. :)

Not at all. Thanks for that uAPI context.

  reply	other threads:[~2025-11-22  2:16 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-21  4:02 [PATCH net-next 0/5] selftests: hw-net: toeplitz: read config from the NIC directly Jakub Kicinski
2025-11-21  4:02 ` [PATCH net-next 1/5] selftests: hw-net: auto-disable building the iouring C code Jakub Kicinski
2025-11-23  0:55   ` David Wei
2025-11-25  2:49     ` Jakub Kicinski
2025-11-21  4:02 ` [PATCH net-next 2/5] selftests: hw-net: toeplitz: make sure NICs have pure Toeplitz configured Jakub Kicinski
2025-11-21  4:02 ` [PATCH net-next 3/5] selftests: hw-net: toeplitz: read the RSS key directly from C Jakub Kicinski
2025-11-23  2:07   ` David Wei
2025-11-21  4:02 ` [PATCH net-next 4/5] selftests: hw-net: toeplitz: read indirection table from the device Jakub Kicinski
2025-11-21 23:12   ` Willem de Bruijn
2025-11-22  1:32     ` Jakub Kicinski
2025-11-22  2:16       ` Willem de Bruijn [this message]
2025-11-21  4:02 ` [PATCH net-next 5/5] selftests: hw-net: toeplitz: give the test up to 4 seconds Jakub Kicinski
2025-11-21 23:10 ` [PATCH net-next 0/5] selftests: hw-net: toeplitz: read config from the NIC directly Willem de Bruijn
2025-11-25  3:10 ` patchwork-bot+netdevbpf

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=willemdebruijn.kernel.53e77e2eea78@gmail.com \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=dw@davidwei.uk \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=petrm@nvidia.com \
    --cc=shuah@kernel.org \
    --cc=willemb@google.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;
as well as URLs for NNTP newsgroup(s).