]> git.baikalelectronics.ru Git - kernel.git/commit
net: Add remcsum_adjust as common function for remote checksum offload
authorTom Herbert <therbert@google.com>
Tue, 25 Nov 2014 19:21:19 +0000 (11:21 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 26 Nov 2014 17:25:43 +0000 (12:25 -0500)
commit2ced0438eb6657c77d3bf7790820b71758462513
treebcb2343db0c704f7deb25246dec535d1b106e467
parent34d9f341eb3313a4f832d4275b709e648ab8b8fc
net: Add remcsum_adjust as common function for remote checksum offload

This function does the work to update a checksum field as part of
remote checksum offload.

remcsum_adjust does the following:

1) Subtract out the calculated checksum from the beginning of the
   packet (ptr arg) to the start offset.
2) Adjust the checksum field indicated by offset based on the modified
   checksum value from above step.
3) Return the difference in the old checksum field value and the
   new one. The caller will use this to update skb->csum and NAPI csum.

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