|
|
@@ -2243,6 +2243,32 @@ __wsum skb_copy_and_csum_bits(const struct sk_buff *skb, int offset,
|
|
|
}
|
|
|
EXPORT_SYMBOL(skb_copy_and_csum_bits);
|
|
|
|
|
|
+static __wsum warn_crc32c_csum_update(const void *buff, int len, __wsum sum)
|
|
|
+{
|
|
|
+ net_warn_ratelimited(
|
|
|
+ "%s: attempt to compute crc32c without libcrc32c.ko\n",
|
|
|
+ __func__);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static __wsum warn_crc32c_csum_combine(__wsum csum, __wsum csum2,
|
|
|
+ int offset, int len)
|
|
|
+{
|
|
|
+ net_warn_ratelimited(
|
|
|
+ "%s: attempt to compute crc32c without libcrc32c.ko\n",
|
|
|
+ __func__);
|
|
|
+ return 0;
|
|
|
+}
|
|
|
+
|
|
|
+static const struct skb_checksum_ops default_crc32c_ops = {
|
|
|
+ .update = warn_crc32c_csum_update,
|
|
|
+ .combine = warn_crc32c_csum_combine,
|
|
|
+};
|
|
|
+
|
|
|
+const struct skb_checksum_ops *crc32c_csum_stub __read_mostly =
|
|
|
+ &default_crc32c_ops;
|
|
|
+EXPORT_SYMBOL(crc32c_csum_stub);
|
|
|
+
|
|
|
/**
|
|
|
* skb_zerocopy_headlen - Calculate headroom needed for skb_zerocopy()
|
|
|
* @from: source buffer
|