[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>
This commit is contained in:

committed by
David S. Miller

parent
1ab6eb62b0
commit
759e5d0064
@@ -1372,6 +1372,7 @@ static inline void __net_timestamp(struct sk_buff *skb)
|
||||
}
|
||||
|
||||
|
||||
extern __sum16 __skb_checksum_complete_head(struct sk_buff *skb, int len);
|
||||
extern __sum16 __skb_checksum_complete(struct sk_buff *skb);
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user