[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <willemdebruijn.kernel.53e77e2eea78@gmail.com>
Date: Fri, 21 Nov 2025 21:16:57 -0500
From: Willem de Bruijn <willemdebruijn.kernel@...il.com>
To: Jakub Kicinski <kuba@...nel.org>,
Willem de Bruijn <willemdebruijn.kernel@...il.com>
Cc: davem@...emloft.net,
netdev@...r.kernel.org,
edumazet@...gle.com,
pabeni@...hat.com,
andrew+netdev@...n.ch,
horms@...nel.org,
willemb@...gle.com,
petrm@...dia.com,
dw@...idwei.uk,
shuah@...nel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next 4/5] selftests: hw-net: toeplitz: read
indirection table from the device
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.
Powered by blists - more mailing lists