diff options
author | Davide Caratti | 2017-05-18 15:44:37 +0200 |
---|---|---|
committer | David S. Miller | 2017-05-19 19:21:29 -0400 |
commit | 9617813dba5b6c112922c60cd2bc57c6e11ae907 (patch) | |
tree | ce7dfcb633751f2aaed7fe3b19988aa88f401270 /net/sctp | |
parent | 6f5b24eed0278136c29c27f2a7b3a2b6a202ac68 (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 'net/sctp')
-rw-r--r-- | net/sctp/offload.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/sctp/offload.c b/net/sctp/offload.c index 4f5a2b580aa5..b67198429db5 100644 --- a/net/sctp/offload.c +++ b/net/sctp/offload.c @@ -98,6 +98,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 +115,7 @@ int __init sctp_offload_init(void) if (ret) goto ipv4; + crc32c_csum_stub = &crc32c_csum_ops; return ret; ipv4: |