diff options
author | Tom Herbert <therbert@google.com> | 2014-06-11 05:54:19 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-12 02:46:13 +0400 |
commit | 7e3cead5172927732f51fde77fef6f521e22f209 (patch) | |
tree | 7b7cad61aa68ba302c395b9a1ea3dafb69881d0d /include/linux | |
parent | 5d0c2b95bc57cf8fdc0e7b3e9d7e751eb65ad052 (diff) | |
download | linux-7e3cead5172927732f51fde77fef6f521e22f209.tar.xz |
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')
-rw-r--r-- | include/linux/skbuff.h | 3 |
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 |