net: skb_checksum: allow custom update/combine for walking skb
authorDaniel Borkmann <dborkman@redhat.com>
Wed, 30 Oct 2013 10:50:51 +0000 (11:50 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Nov 2013 04:04:57 +0000 (23:04 -0500)
Currently, skb_checksum walks over 1) linearized, 2) frags[], and
3) frag_list data and calculats the one's complement, a 32 bit
result suitable for feeding into itself or csum_tcpudp_magic(),
but unsuitable for SCTP as we're calculating CRC32c there.

Hence, in order to not re-implement the very same function in
SCTP (and maybe other protocols) over and over again, use an
update() + combine() callback internally to allow for walking
over the skb with different algorithms.

Signed-off-by: Daniel Borkmann <dborkman@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

No differences found