net: Store checksum result for offloaded GSO checksums
authorAlexander Duyck <aduyck@mirantis.com>
Fri, 5 Feb 2016 23:27:49 +0000 (15:27 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 11 Feb 2016 13:55:33 +0000 (08:55 -0500)
commit08b64fcca942733413bc5ac2321d57021d3e8578
tree538f8cccfb4ea113334bd86b8433fba6b48a9d98
parent7fbeffed77c130ecf64e8a2f7f9d6d63a9d60a19
net: Store checksum result for offloaded GSO checksums

This patch makes it so that we can offload the checksums for a packet up
to a certain point and then begin computing the checksums via software.
Setting this up is fairly straight forward as all we need to do is reset
the values stored in csum and csum_start for the GSO context block.

One complication for this is remote checksum offload.  In order to allow
the inner checksums to be offloaded while computing the outer checksum
manually we needed to have some way of indicating that the offload wasn't
real.  In order to do that I replaced CHECKSUM_PARTIAL with
CHECKSUM_UNNECESSARY in the case of us computing checksums for the outer
header while skipping computing checksums for the inner headers.  We clean
up the ip_summed flag and set it to either CHECKSUM_PARTIAL or
CHECKSUM_NONE once we hand the packet off to the next lower level.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/linux/skbuff.h
net/ipv4/tcp_offload.c
This page took 0.026213 seconds and 5 git commands to generate.