Message ID | 20240703224850.1226697-6-tom@herbertland.com (mailing list archive) |
---|---|
State | RFC |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | crc-offload: Split RX CRC offload from csum offload | expand |
diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_main.c b/drivers/net/ethernet/cavium/thunder/nicvf_main.c index aebb9fef3f6e..72157f9542c5 100644 --- a/drivers/net/ethernet/cavium/thunder/nicvf_main.c +++ b/drivers/net/ethernet/cavium/thunder/nicvf_main.c @@ -824,7 +824,10 @@ static void nicvf_rcv_pkt_handler(struct net_device *netdev, skb_record_rx_queue(skb, rq_idx); if (netdev->hw_features & NETIF_F_RXCSUM) { /* HW by default verifies TCP/UDP/SCTP checksums */ - skb->ip_summed = CHECKSUM_UNNECESSARY; + if (cqe_rx->l4_type == L4TYPE_SCTP) + skb_set_csum_crc32_unnecessary(skb); + else + skb->ip_summed = CHECKSUM_UNNECESSARY; } else { skb_checksum_none_assert(skb); }
When a validated offload CRC for SCTP is detected call skb_set_csum_crc32_unnecessary instead of setting CHECKSUM_UNNECESSARY Signed-off-by: Tom Herbert <tom@herbertland.com> --- drivers/net/ethernet/cavium/thunder/nicvf_main.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)