Netdev List
 help / color / mirror / Atom feed
* [PATCH net-next] net/mlx5e: SHAMPO, Remove dead CWR handling in GRO header update
@ 2026-07-23  7:28 Tariq Toukan
  0 siblings, 0 replies; only message in thread
From: Tariq Toukan @ 2026-07-23  7:28 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	netdev, Paolo Abeni
  Cc: Cosmin Ratiu, Dragos Tatulea, Gal Pressman, Leon Romanovsky,
	linux-kernel, linux-rdma, Mark Bloch, Saeed Mahameed,
	Tariq Toukan, Chia-Yu Chang

From: Dragos Tatulea <dtatulea@nvidia.com>

mlx5e_shampo_update_ipv{4,6}_tcp_hdr() runs only from the
gro_count > 1 path in mlx5e_shampo_flush_skb(). HW-GRO flushes the
current session on a CWR packet and delivers it as a single-segment
skb via napi_gro_receive(), so the aggregated (gro_count > 1) skb
never carries a CWR-set TCP header.

This patch drops the unreachable branch. Discussion context:
https://lore.kernel.org/all/8b610e49-ff64-497e-8712-588b2228df02@nvidia.com/

Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Dragos Tatulea <dtatulea@nvidia.com>
Cc: Chia-Yu Chang <chia-yu.chang@nokia-bell-labs.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
index 04af54b704d8..fb7110b1b683 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c
@@ -1178,9 +1178,6 @@ static void mlx5e_shampo_update_ipv4_tcp_hdr(struct mlx5e_rq *rq, struct iphdr *
 
 	skb->csum_start = (unsigned char *)tcp - skb->head;
 	skb->csum_offset = offsetof(struct tcphdr, check);
-
-	if (tcp->cwr)
-		skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
 }
 
 static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr *ipv6,
@@ -1199,9 +1196,6 @@ static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr
 	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6;
 	skb->csum_start = (unsigned char *)tcp - skb->head;
 	skb->csum_offset = offsetof(struct tcphdr, check);
-
-	if (tcp->cwr)
-		skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN;
 }
 
 static void mlx5e_shampo_update_hdr(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe, bool match)

base-commit: 1df10cef2d1e7f9f2fb7eddb67fc70d3abf101f9
-- 
2.44.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2026-07-23  7:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23  7:28 [PATCH net-next] net/mlx5e: SHAMPO, Remove dead CWR handling in GRO header update Tariq Toukan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox