Re: [PATCH net-next V2 12/13] selftests: drv-net: psp: Fix responder parsing

Jakub Kicinski <[email protected]>
Newsgroups org.kernel.vger.linux-rdma,org.kernel.vger.linux-kernel,org.kernel.vger.linux-kselftest,org.kernel.vger.netdev
Message-ID <[email protected]>
On Tue, 11 Aug 2026 14:59:26 +0000 Cosmin Ratiu wrote:
> > > I'm sorry, but the code is wrong.
> > > cmd() matches on n (which never changes!) but __consume() only
> > > decrements off. Strap a loop on top and the result is just
> > > confusion
> > > and a source of bugs (e.g. the one I'm trying to fix with this
> > > patch).
> > > 
> > > A single variable should be used to keep track of the length of
> > > data
> > > left to parse.  
> > 
> > and in your opinion that variable, which represents the amount of
> > data
> > left to parse is supposed to be called "off" ?  
> 
> "off" is clearly not a great name, it focuses on the offset in the
> buffer where data should be received. Perhaps it could be renamed to
> "len"? 

len would work, or we can stick to n?

> And then perhaps I can rephrase this patch as "Fix psp_responder parsing"?

ack
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.