[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240703224850.1226697-11-tom@herbertland.com>
Date: Wed, 3 Jul 2024 15:48:50 -0700
From: Tom Herbert <tom@...bertland.com>
To: davem@...emloft.net,
kuba@...nel.org,
jesse.brandeburg@...el.com,
anthony.l.nguyen@...el.com,
cai.huoqing@...ux.dev,
netdev@...r.kernel.org,
felipe@...anda.io
Cc: Tom Herbert <tom@...bertland.com>
Subject: [RFC net-next 10/10] wangxun: Call skb_set_csum_crc32_unnecessary
When a validated offload CRC for SCTP is detected call
skb_set_csum_crc32_unnessary instead of setting
CHECKSUM_UNNECESSARY
Signed-off-by: Tom Herbert <tom@...bertland.com>
---
drivers/net/ethernet/wangxun/libwx/wx_lib.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/wangxun/libwx/wx_lib.c b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
index ac0e1d42fe55..8f4ffc961abf 100644
--- a/drivers/net/ethernet/wangxun/libwx/wx_lib.c
+++ b/drivers/net/ethernet/wangxun/libwx/wx_lib.c
@@ -558,7 +558,10 @@ static void wx_rx_checksum(struct wx_ring *ring,
}
/* It must be a TCP or UDP or SCTP packet with a valid checksum */
- skb->ip_summed = CHECKSUM_UNNECESSARY;
+ if (dptype.prot == WX_DEC_PTYPE_PROT_SCTP)
+ skb_set_csum_crc32_unnecessary(skb);
+ else
+ skb->ip_summed = CHECKSUM_UNNECESSARY;
/* If there is an outer header present that might contain a checksum
* we need to bump the checksum level by 1 to reflect the fact that
--
2.34.1
Powered by blists - more mailing lists