summaryrefslogtreecommitdiffstats
path: root/include/linux/skbuff.h
diff options
context:
space:
mode:
authorTom Herbert2014-06-11 03:54:19 +0200
committerDavid S. Miller2014-06-12 00:46:13 +0200
commit7e3cead5172927732f51fde77fef6f521e22f209 (patch)
tree7b7cad61aa68ba302c395b9a1ea3dafb69881d0d /include/linux/skbuff.h
parentnet: Preserve CHECKSUM_COMPLETE at validation (diff)
downloadkernel-qcow2-linux-7e3cead5172927732f51fde77fef6f521e22f209.tar.gz
kernel-qcow2-linux-7e3cead5172927732f51fde77fef6f521e22f209.tar.xz
kernel-qcow2-linux-7e3cead5172927732f51fde77fef6f521e22f209.zip
net: Save software checksum complete
In skb_checksum complete, if we need to compute the checksum for the packet (via skb_checksum) save the result as CHECKSUM_COMPLETE. Subsequent checksum verification can use this. Also, added csum_complete_sw flag to distinguish between software and hardware generated checksum complete, we should always be able to trust the software computation. Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/skbuff.h')
-rw-r--r--include/linux/skbuff.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 72a53805858a..5b5cd3189c98 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -573,7 +573,8 @@ struct sk_buff {
__u8 encapsulation:1;
__u8 encap_hdr_csum:1;
__u8 csum_valid:1;
- /* 4/6 bit hole (depending on ndisc_nodetype presence) */
+ __u8 csum_complete_sw:1;
+ /* 3/5 bit hole (depending on ndisc_nodetype presence) */
kmemcheck_bitfield_end(flags2);
#if defined CONFIG_NET_DMA || defined CONFIG_NET_RX_BUSY_POLL