]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
[UDP]: Clean up UDP-Lite receive checksum
authorHerbert Xu <herbert@gondor.apana.org.au>
Mon, 26 Mar 2007 03:10:56 +0000 (20:10 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:23:51 +0000 (22:23 -0700)
commit759e5d006462d53fb708daa8284b4ad909415da1
treeedcc4e9d975199b3fe5e2aadc3d1e06824755e75
parent1ab6eb62b02e0949a392fb19bf31ba59ae1022b1
[UDP]: Clean up UDP-Lite receive checksum

This patch eliminates some duplicate code for the verification of
receive checksums between UDP-Lite and UDP.  It does this by
introducing __skb_checksum_complete_head which is identical to
__skb_checksum_complete_head apart from the fact that it takes
a length parameter rather than computing the first skb->len bytes.

As a result UDP-Lite will be able to use hardware checksum offload
for packets which do not use partial coverage checksums.  It also
means that UDP-Lite loopback no longer does unnecessary checksum
verification.

If any NICs start support UDP-Lite this would also start working
automatically.

This patch removes the assumption that msg_flags has MSG_TRUNC clear
upon entry in recvmsg.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
include/net/udp.h
include/net/udplite.h
net/core/datagram.c
net/ipv4/udp.c
net/ipv4/udplite.c
net/ipv6/udp.c
net/ipv6/udplite.c