From: Cosmin Ratiu <cratiu@nvidia.com>
To: Tariq Toukan <tariqt@nvidia.com>,
"netdev-bot+sashiko@kernel.org" <netdev-bot+sashiko@kernel.org>
Cc: Boris Pismenny <borisp@nvidia.com>,
"andrew+netdev@lunn.ch" <andrew+netdev@lunn.ch>,
"daniel.zahka@gmail.com" <daniel.zahka@gmail.com>,
"davem@davemloft.net" <davem@davemloft.net>,
Jianbo Liu <jianbol@nvidia.com>,
"sd@queasysnail.net" <sd@queasysnail.net>,
Emeel Hakim <ehakim@nvidia.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"edumazet@google.com" <edumazet@google.com>,
"pabeni@redhat.com" <pabeni@redhat.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
Raed Salem <raeds@nvidia.com>,
"leon@kernel.org" <leon@kernel.org>,
Dragos Tatulea <dtatulea@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>, Roi Dayan <roid@nvidia.com>,
"kuba@kernel.org" <kuba@kernel.org>,
Mark Bloch <mbloch@nvidia.com>,
Lior Nahmanson <liorna@nvidia.com>,
Parav Pandit <parav@nvidia.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
Rahul Rameshbabu <rrameshbabu@nvidia.com>,
Gal Pressman <gal@nvidia.com>,
"steffen.klassert@secunet.com" <steffen.klassert@secunet.com>,
Saeed Mahameed <saeedm@nvidia.com>
Subject: Re: [PATCH net 7/7] net/mlx5e: shampo: Do not merge PSP packets
Date: Wed, 23 Sep 2026 08:50:51 +0000 [thread overview]
Message-ID: <92d0a1ddc4fa5e6c1ecf1e64920ad3eeab1b5fa7.camel@nvidia.com> (raw)
In-Reply-To: <179001655196.2160803.14482188682686687561@kernel.org>
On Mon, 2026-09-21 at 18:49 +0000, netdev-bot+sashiko@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found more severe
> issue(s) in other patches of this series. This mail is only an FYI,
> in case
> you want to address the nit picks below when you respin.
>
> Low priority / nit picks for your consideration:
>
> - [Low] net/mlx5e: redundant #ifdef for PSP in
> mlx5e_hw_gro_psp_match()
>
> --
>
> > diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
> > @@ -2224,6 +2224,16 @@ static bool
> > mlx5e_hw_gro_skb_has_enough_space(struct sk_buff *skb,
> > return page_size * nr_frags + data_bcnt <=
> > GRO_LEGACY_MAX_SIZE;
> > }
> >
> > +static bool mlx5e_hw_gro_psp_match(struct sk_buff *skb, struct
> > mlx5_cqe64 *cqe)
> > +{
> > +#ifdef CONFIG_MLX5_EN_PSP
> > + /* PSP packets cannot be merged. */
> > + return !mlx5e_psp_is_rx_flow(cqe);
> > +#else
> > + return true;
> > +#endif
> > +}
> > +
> > static void mlx5e_handle_rx_cqe_mpwrq_shampo(struct mlx5e_rq *rq,
> > struct mlx5_cqe64 *cqe)
> > {
> > u16 data_bcnt = mpwrq_get_cqe_byte_cnt(cqe) -
> > cqe->shampo.header_size;
>
> [Severity: Low]
> The #ifdef CONFIG_MLX5_EN_PSP in mlx5e_hw_gro_psp_match() is
> redundant. en_accel/psp_rxtx.h already provides a stub
> mlx5e_psp_is_rx_flow() that returns false when CONFIG_MLX5_EN_PSP is
> not set, so !mlx5e_psp_is_rx_flow(cqe) already evaluates to true in
> that configuration, which is exactly what the #else branch returns.
>
> Please drop the conditional and just return
> !mlx5e_psp_is_rx_flow(cqe) unconditionally. That keeps both
> configurations compiling the same code path, avoids the risk of the
> two branches drifting apart when the PSP helper changes, and matches
> the rest of the driver, which relies on the header stubs rather than
> sprinkling #ifdefs through en_rx.c. It also means the stub keeps
> getting type-checked when PSP is disabled.
>
> While you are there: the skb argument of mlx5e_hw_gro_psp_match() is
> never used. Is it there for a follow-up that will compare the
> in-progress skb against the new CQE, or can it be dropped?
>
Will address.
next prev parent reply other threads:[~2026-09-23 8:50 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 17:54 [PATCH net 0/7] net/mlx5e: Fix offload lifetime, cleanup and exclusion bugs Tariq Toukan
2026-09-17 17:54 ` [PATCH net 1/7] net/mlx5e: ipsec: Block eswitch mode changes during policy creation Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 7:27 ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 2/7] net/mlx5e: ipsec: Block eswitch mode changes before accessing priv->ipsec Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 7:52 ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 3/7] net/mlx5e: tc: Tie esw & accel blocking refs to the flow's lifetime Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 7:59 ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 4/7] net/mlx5e: macsec: Track hardware object ownership for SA teardown Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 8:32 ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 5/7] net/mlx5e: macsec: Delete remaining SecYs during cleanup Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 8:49 ` Cosmin Ratiu
2026-09-17 17:54 ` [PATCH net 6/7] net/mlx5e: Serialize TC and IPsec offload exclusion counters Tariq Toukan
2026-09-17 17:54 ` [PATCH net 7/7] net/mlx5e: shampo: Do not merge PSP packets Tariq Toukan
2026-09-21 18:49 ` netdev-bot+sashiko
2026-09-23 8:50 ` Cosmin Ratiu [this message]
2026-09-22 10:44 ` [PATCH net 0/7] net/mlx5e: Fix offload lifetime, cleanup and exclusion bugs Paolo Abeni
2026-09-23 10:47 ` Cosmin Ratiu
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=92d0a1ddc4fa5e6c1ecf1e64920ad3eeab1b5fa7.camel@nvidia.com \
--to=cratiu@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=borisp@nvidia.com \
--cc=cjubran@nvidia.com \
--cc=daniel.zahka@gmail.com \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=ehakim@nvidia.com \
--cc=gal@nvidia.com \
--cc=jianbol@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=liorna@nvidia.com \
--cc=mbloch@nvidia.com \
--cc=netdev-bot+sashiko@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=parav@nvidia.com \
--cc=raeds@nvidia.com \
--cc=roid@nvidia.com \
--cc=rrameshbabu@nvidia.com \
--cc=saeedm@nvidia.com \
--cc=sd@queasysnail.net \
--cc=steffen.klassert@secunet.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®