aboutsummaryrefslogtreecommitdiffstats
path: root/net/core/dev.c
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2025-05-19 10:50:03 -0700
committerJakub Kicinski <kuba@kernel.org>2025-05-21 15:39:58 -0700
commit55d22ee0358597185f8f5272558ec7cf1a49eb41 (patch)
tree6d3f0cd2bc45a590a39145c70fca091be924564f /net/core/dev.c
parentMerge branch 'tools-ynl-gen-add-support-for-inherited-selector-and-therefore-tc' (diff)
downloadlinux-rng-55d22ee0358597185f8f5272558ec7cf1a49eb41.tar.xz
linux-rng-55d22ee0358597185f8f5272558ec7cf1a49eb41.zip
net: introduce CONFIG_NET_CRC32C
Add a hidden kconfig symbol NET_CRC32C that will group together the functions that calculate CRC32C checksums of packets, so that these don't have to be built into NET-enabled kernels that don't need them. Make skb_crc32c_csum_help() (which is called only when IP_SCTP is enabled) conditional on this symbol, and make IP_SCTP select it. Signed-off-by: Eric Biggers <ebiggers@google.com> Reviewed-by: Hannes Reinecke <hare@suse.de> Link: https://patch.msgid.link/20250519175012.36581-2-ebiggers@kernel.org Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/core/dev.c')
-rw-r--r--net/core/dev.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/net/core/dev.c b/net/core/dev.c
index 6d1a238dd440..c27607b7f8b0 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -3596,6 +3596,7 @@ out:
}
EXPORT_SYMBOL(skb_checksum_help);
+#ifdef CONFIG_NET_CRC32C
int skb_crc32c_csum_help(struct sk_buff *skb)
{
__le32 crc32c_csum;
@@ -3635,6 +3636,7 @@ out:
return ret;
}
EXPORT_SYMBOL(skb_crc32c_csum_help);
+#endif /* CONFIG_NET_CRC32C */
__be16 skb_network_protocol(struct sk_buff *skb, int *depth)
{