From: Simon Horman <horms@kernel.org>
To: Tariq Toukan <tariqt@nvidia.com>
Cc: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>, Mark Bloch <mbloch@nvidia.com>,
netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
linux-kernel@vger.kernel.org, Gal Pressman <gal@nvidia.com>,
Dragos Tatulea <dtatulea@nvidia.com>
Subject: Re: [PATCH net V2 2/3] net/mlx5e: SHAMPO, Fix skb size check for 64K pages
Date: Wed, 5 Nov 2025 10:04:05 +0000 [thread overview]
Message-ID: <aQshFdIQ4uZBj7XI@horms.kernel.org> (raw)
In-Reply-To: <1762238915-1027590-3-git-send-email-tariqt@nvidia.com>
On Tue, Nov 04, 2025 at 08:48:34AM +0200, Tariq Toukan wrote:
> From: Dragos Tatulea <dtatulea@nvidia.com>
>
> mlx5e_hw_gro_skb_has_enough_space() uses a formula to check if there is
> enough space in the skb frags to store more data. This formula is
> incorrect for 64K page sizes and it triggers early GRO session
> termination because the first fragment will blow up beyond
> GRO_LEGACY_MAX_SIZE.
>
> This patch adds a special case for page sizes >= GRO_LEGACY_MAX_SIZE
> (64K) which uses the skb->len instead. Within this context,
> the check is safe from fragment overflow because the hardware
> will continuously fill the data up to the reservation size of 64K
> and the driver will coalesce all data from the same page to the same
> fragment. This means that the data will span one fragment or at most
> two for such a large page size.
>
> It is expected that the if statement will be optimized out as the
> check is done with constants.
>
> Fixes: 92552d3abd32 ("net/mlx5e: HW_GRO cqe handler implementation")
> Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
> Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2025-11-05 10:04 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-04 6:48 [PATCH net V2 0/3] net/mlx5e: SHAMPO fixes for 64KB page size Tariq Toukan
2025-11-04 6:48 ` [PATCH net V2 1/3] net/mlx5e: SHAMPO, Fix header mapping for 64K pages Tariq Toukan
2025-11-05 10:03 ` Simon Horman
2025-11-04 6:48 ` [PATCH net V2 2/3] net/mlx5e: SHAMPO, Fix skb size check " Tariq Toukan
2025-11-05 10:04 ` Simon Horman [this message]
2025-11-04 6:48 ` [PATCH net V2 3/3] net/mlx5e: SHAMPO, Fix header formulas for higher MTUs and " Tariq Toukan
2025-11-05 10:04 ` Simon Horman
2025-11-06 2:00 ` [PATCH net V2 0/3] net/mlx5e: SHAMPO fixes for 64KB page size 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=aQshFdIQ4uZBj7XI@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=dtatulea@nvidia.com \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@nvidia.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 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.