OSDN Git Service

net: Generalize checksum_init functions
authorTom Herbert <therbert@google.com>
Fri, 2 May 2014 23:29:18 +0000 (16:29 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 5 May 2014 19:26:29 +0000 (15:26 -0400)
commit76ba0aae673075c77a8b775e9133c8e8b1a44563
tree503e545954aca2b7a2359bf38719acdaaae6707b
parent20fce54fa74a55ad1e821b61612393d7159b6af8
net: Generalize checksum_init functions

Create a general __skb_checksum_validate function (actually a
macro) to subsume the various checksum_init functions. This
function can either init the checksum, or do the full validation
(logically checksum_init+skb_check_complete)-- a flag specifies
if full vaidation is performed. Also, there is a flag to the function
to indicate that zero checksums are allowed (to support optional
UDP checksums).

Added several stub functions for calling __skb_checksum_validate.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h