From: Chia-Yu Chang Currently, hns3 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 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: d474d88f88261 ("net: hns3: add hns3_gro_complete for HW GRO process") Signed-off-by: Chia-Yu Chang --- drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c index a3206c97923e..e1b0dba56182 100644 --- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c +++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c @@ -3904,7 +3904,7 @@ static int hns3_gro_complete(struct sk_buff *skb, u32 l234info) skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count; if (th->cwr) - skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ECN; + skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_ACCECN; if (l234info & BIT(HNS3_RXD_GRO_FIXID_B)) skb_shinfo(skb)->gso_type |= SKB_GSO_TCP_FIXEDID; -- 2.34.1