Message ID | 20240703224850.1226697-4-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/net/sctp/input.c b/net/sctp/input.c index 17fcaa9b0df9..aefcc3497d27 100644 --- a/net/sctp/input.c +++ b/net/sctp/input.c @@ -124,14 +124,12 @@ int sctp_rcv(struct sk_buff *skb) /* Pull up the IP header. */ __skb_pull(skb, skb_transport_offset(skb)); - skb->csum_valid = 0; /* Previous value not applicable */ - if (skb_csum_unnecessary(skb)) - __skb_decr_checksum_unnecessary(skb); + if (skb_csum_crc32_unnecessary(skb)) + skb_reset_csum_crc32_unnecessary(skb); else if (!sctp_checksum_disable && !is_gso && sctp_rcv_checksum(net, skb) < 0) goto discard_it; - skb->csum_valid = 1; __skb_pull(skb, sizeof(struct sctphdr));
Instead of checking for CHECKSUM_UNNECESSARY, call skb_csum_crc32_unnecessary to see if the SCTP CRC has been validated. If it is then call skb_reset_csum_crc32_unnecessary to clear the flag Signed-off-by: Tom Herbert <tom@herbertland.com> --- net/sctp/input.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)