From: Jakub Kicinski <kuba@kernel.org>
To: Cosmin Ratiu <cratiu@nvidia.com>
Cc: Tariq Toukan <tariqt@nvidia.com>,
Patrisious Haddad <phaddad@nvidia.com>,
"davem@davemloft.net" <davem@davemloft.net>,
"daniel.zahka@gmail.com" <daniel.zahka@gmail.com>,
Chris Mi <cmi@nvidia.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"horms@kernel.org" <horms@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kees@kernel.org" <kees@kernel.org>,
Dragos Tatulea <dtatulea@nvidia.com>,
Boris Pismenny <borisp@nvidia.com>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Jianbo Liu <jianbol@nvidia.com>,
"leon@kernel.org" <leon@kernel.org>,
Saeed Mahameed <saeedm@nvidia.com>,
"shuah@kernel.org" <shuah@kernel.org>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
Mark Bloch <mbloch@nvidia.com>, Alex Lazar <alazar@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
"sd@queasysnail.net" <sd@queasysnail.net>,
Raed Salem <raeds@nvidia.com>,
"Jacob.e.keller@intel.com" <Jacob.e.keller@intel.com>,
"skhan@linuxfoundation.org" <skhan@linuxfoundation.org>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
Lama Kayal <lkayal@nvidia.com>,
"linux-kselftest@vger.kernel.org"
<linux-kselftest@vger.kernel.org>,
"sdf.kernel@gmail.com" <sdf.kernel@gmail.com>,
"doruk@0sec.ai" <doruk@0sec.ai>,
"sdf@fomichev.me" <sdf@fomichev.me>,
"aleksandr.loktionov@intel.com" <aleksandr.loktionov@intel.com>
Subject: Re: [PATCH net-next V2 12/13] selftests: drv-net: psp: Fix responder parsing
Date: Mon, 10 Aug 2026 13:33:05 -0700 [thread overview]
Message-ID: <20260810133305.3b7448c8@kernel.org> (raw)
In-Reply-To: <51b31f2497f1c42464f803818b0e9b6cc6b9aa56.camel@nvidia.com>
On Mon, 10 Aug 2026 11:42:36 +0000 Cosmin Ratiu wrote:
> > > +#define cmd(_name,
> > > _extra_sz) \
> > > ({
> > > \
> > > ssize_t sz =
> > > sizeof(_name); \
> > > - bool match = n >= sz
> > > && !memcmp(buf, _name, sz); \
> > > + bool match = off >= sz + (_extra_sz)
> > > && \
> > > + !memcmp(buf, _name,
> > > sz); \
> >
> > Please don't replace off by n.
>
> I actually replaced n by off. Did you mean "don't replace n by off"?
Of course!
> Because the two are identical after the recv error checking. I don't
> see the point of maintaining two variables when one suffices. Either n
> or off can describe the number of bytes in buf. off is static and
> persists across chunks, while n is temporary.
The variables have semantic meaning, which makes it easier to follow
the code.
> So to clarify, do you want to keep both?
Yes.
next prev parent reply other threads:[~2026-08-10 20:33 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 8:35 [PATCH net-next V2 00/13] net/mlx5e: Add support for HW-GRO to PSP Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 01/13] net/mlx5e: Generalize TC <-> IPsec mutual exclusion Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 02/13] net/mlx5e: ipsec: Block TC offload when IPsec is enabled Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 03/13] net/mlx5e: psp: Block TC offload when PSP " Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 04/13] net/mlx5e: macsec: Block TC offload when MACsec " Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 05/13] net/mlx5e: psp: Move RX marker from ft_metadata to flow_tag Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 06/13] net/mlx5e: ipsec: " Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 07/13] net/mlx5e: macsec: " Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 08/13] net/mlx5e: psp: Handle HW-decapsulated RX PSP packets Tariq Toukan
2026-08-04 17:34 ` Daniel Zahka
2026-08-10 11:46 ` Cosmin Ratiu
2026-08-04 8:35 ` [PATCH net-next V2 09/13] net/mlx5e: psp: Add an rx_decap steering table Tariq Toukan
2026-08-04 17:19 ` Daniel Zahka
2026-08-10 11:48 ` Cosmin Ratiu
2026-08-04 8:35 ` [PATCH net-next V2 10/13] net/mlx5e: shampo: Flush session on PSP mismatch Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 11/13] net/mlx5e: psp: Dynamically reconfigure based on SHAMPO mode Tariq Toukan
2026-08-04 8:35 ` [PATCH net-next V2 12/13] selftests: drv-net: psp: Fix responder parsing Tariq Toukan
2026-08-08 0:58 ` Jakub Kicinski
2026-08-10 11:42 ` Cosmin Ratiu
2026-08-10 20:33 ` Jakub Kicinski [this message]
2026-08-11 12:41 ` Cosmin Ratiu
2026-08-04 8:35 ` [PATCH net-next V2 13/13] selftests: drv-net: psp: Add a test for PSP with HW-GRO Tariq Toukan
2026-08-04 18:05 ` Daniel Zahka
2026-08-10 11:52 ` Cosmin Ratiu
2026-08-08 1:00 ` Jakub Kicinski
2026-08-10 14:30 ` Cosmin Ratiu
2026-08-10 20:31 ` Jakub Kicinski
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=20260810133305.3b7448c8@kernel.org \
--to=kuba@kernel.org \
--cc=Jacob.e.keller@intel.com \
--cc=alazar@nvidia.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=borisp@nvidia.com \
--cc=cjubran@nvidia.com \
--cc=cmi@nvidia.com \
--cc=cratiu@nvidia.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=doruk@0sec.ai \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=horms@kernel.org \
--cc=jianbol@nvidia.com \
--cc=kees@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkayal@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=phaddad@nvidia.com \
--cc=raeds@nvidia.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=sd@queasysnail.net \
--cc=sdf.kernel@gmail.com \
--cc=sdf@fomichev.me \
--cc=shuah@kernel.org \
--cc=skhan@linuxfoundation.org \
--cc=tariqt@nvidia.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.