]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - net/sctp/offload.c
net: use skb->csum_not_inet to identify packets needing crc32c
[karo-tx-linux.git] / net / sctp / offload.c
index 4f5a2b580aa52deb75e00c92d8b60992cf5bdaa6..275925b93b2909a32e9a5ab83a16e9b0f5717e24 100644 (file)
@@ -35,6 +35,7 @@
 static __le32 sctp_gso_make_checksum(struct sk_buff *skb)
 {
        skb->ip_summed = CHECKSUM_NONE;
+       skb->csum_not_inet = 0;
        return sctp_compute_cksum(skb, skb_transport_offset(skb));
 }
 
@@ -98,6 +99,11 @@ static const struct net_offload sctp6_offload = {
        },
 };
 
+static const struct skb_checksum_ops crc32c_csum_ops = {
+       .update  = sctp_csum_update,
+       .combine = sctp_csum_combine,
+};
+
 int __init sctp_offload_init(void)
 {
        int ret;
@@ -110,6 +116,7 @@ int __init sctp_offload_init(void)
        if (ret)
                goto ipv4;
 
+       crc32c_csum_stub = &crc32c_csum_ops;
        return ret;
 
 ipv4: