aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorDavide Caratti <dcaratti@redhat.com>2017-05-18 09:44:37 -0400
committerDavid S. Miller <davem@davemloft.net>2017-05-19 19:21:29 -0400
commit9617813dba5b6c112922c60cd2bc57c6e11ae907 (patch)
treece7dfcb633751f2aaed7fe3b19988aa88f401270 /include/linux/skbuff.h
parent6f5b24eed0278136c29c27f2a7b3a2b6a202ac68 (diff)
skbuff: add stub to help computing crc32c on SCTP packets
sctp_compute_checksum requires crc32c symbol (provided by libcrc32c), so it can't be used in net core. Like it has been done previously with other symbols (e.g. ipv6_dst_lookup), introduce a stub struct skb_checksum_ops to allow computation of crc32c checksum in net core after sctp.ko (and thus libcrc32c) has been loaded. Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 7c0cb2ce8b01..b1f46a0d18e2 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3076,6 +3076,8 @@ struct skb_checksum_ops {
3076 __wsum (*combine)(__wsum csum, __wsum csum2, int offset, int len); 3076 __wsum (*combine)(__wsum csum, __wsum csum2, int offset, int len);
3077}; 3077};
3078 3078
3079extern const struct skb_checksum_ops *crc32c_csum_stub __read_mostly;
3080
3079__wsum __skb_checksum(const struct sk_buff *skb, int offset, int len, 3081__wsum __skb_checksum(const struct sk_buff *skb, int offset, int len,
3080 __wsum csum, const struct skb_checksum_ops *ops); 3082 __wsum csum, const struct skb_checksum_ops *ops);
3081__wsum skb_checksum(const struct sk_buff *skb, int offset, int len, 3083__wsum skb_checksum(const struct sk_buff *skb, int offset, int len,