diff options
author | Tom Herbert <tom@herbertland.com> | 2015-08-17 22:42:26 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-18 06:33:06 +0200 |
commit | abc5d1ff3e8f9b4a9d274818459b123e31981dc9 (patch) | |
tree | bfe90be833065a4707499800e25c8b65bcbb25b0 /include/net/checksum.h | |
parent | net: Change pseudohdr argument of inet_proto_csum_replace* to be a bool (diff) | |
download | linux-abc5d1ff3e8f9b4a9d274818459b123e31981dc9.tar.xz linux-abc5d1ff3e8f9b4a9d274818459b123e31981dc9.zip |
net: Add inet_proto_csum_replace_by_diff utility function
This function updates a checksum field value and skb->csum based on
a value which is the difference between the old and new checksum.
Signed-off-by: Tom Herbert <tom@herbertland.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/checksum.h')
-rw-r--r-- | include/net/checksum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/net/checksum.h b/include/net/checksum.h index 619f3445d57e..9fcaedf994ee 100644 --- a/include/net/checksum.h +++ b/include/net/checksum.h @@ -144,6 +144,8 @@ void inet_proto_csum_replace4(__sum16 *sum, struct sk_buff *skb, void inet_proto_csum_replace16(__sum16 *sum, struct sk_buff *skb, const __be32 *from, const __be32 *to, bool pseudohdr); +void inet_proto_csum_replace_by_diff(__sum16 *sum, struct sk_buff *skb, + __wsum diff, bool pseudohdr); static inline void inet_proto_csum_replace2(__sum16 *sum, struct sk_buff *skb, __be16 from, __be16 to, |