From: Chia-Yu Chang Currently, mlx5 Rx paths use SKB_GSO_TCP_ECN flag when a TCP segment with the CWR flag set. This is wrong because SKB_GSO_TCP_ECN is only valid for RFC3168 ECN on Tx, and using it on Rx allows RFC3168 ECN offload to clear the CWR flag. As a result, incoming TCP segments may lose their ACE signal integrity required for AccECN (RFC9768), especially when the packet is forwarded and later re-segmented by GSO. Fix this by setting SKB_GSO_TCP_ACCECN for any Rx segment with the CWR flag set. SKB_GSO_TCP_ACCECN ensure that RFC3168 ECN offload will not clear the CWR flag, therefore preserving the ACE signal. Fixes: 92552d3abd329 ("net/mlx5e: HW_GRO cqe handler implementation") Signed-off-by: Chia-Yu Chang --- drivers/net/ethernet/mellanox/mlx5/core/en_rx.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c index efcfcddab376..64fb829e1f0f 100644 --- a/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c +++ b/drivers/net/ethernet/mellanox/mlx5/core/en_rx.c @@ -1137,7 +1137,7 @@ static void mlx5e_shampo_update_ipv4_tcp_hdr(struct mlx5e_rq *rq, struct iphdr * skb->csum_offset = offsetof(struct tcphdr, check); if (tcp->cwr) - skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; + skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ACCECN; } static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr *ipv6, @@ -1158,7 +1158,7 @@ static void mlx5e_shampo_update_ipv6_tcp_hdr(struct mlx5e_rq *rq, struct ipv6hdr skb->csum_offset = offsetof(struct tcphdr, check); if (tcp->cwr) - skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; + skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ACCECN; } static void mlx5e_shampo_update_hdr(struct mlx5e_rq *rq, struct mlx5_cqe64 *cqe, bool match) -- 2.34.1