summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeliang Tang <geliangtang@gmail.com>2021-06-18 02:46:08 +0300
committerDavid S. Miller <davem@davemloft.net>2021-06-18 21:40:11 +0300
commitd0cc298745f5abb3c43319cb9485daf3471d6f94 (patch)
treee5197c9b483a0902c530fba6284c412eff1aacdb /include
parent752e906732c69412087f716e93baa0330cb7cce3 (diff)
downloadlinux-d0cc298745f5abb3c43319cb9485daf3471d6f94.tar.xz
mptcp: generate the data checksum
This patch added a new member named csum in struct mptcp_ext, implemented a new function named mptcp_generate_data_checksum(). Generate the data checksum in mptcp_sendmsg_frag, save it in mpext->csum. Note that we must generate the csum for zero window probe, too. Do the csum update incrementally, to avoid multiple csum computation when the data is appended to existing skb. Note that in a later patch we will skip unneeded csum related operation. Changes not included here to keep the delta small. Co-developed-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Paolo Abeni <pabeni@redhat.com> Signed-off-by: Geliang Tang <geliangtang@gmail.com> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/net/mptcp.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/net/mptcp.h b/include/net/mptcp.h
index 83f23774b908..23bbd439e115 100644
--- a/include/net/mptcp.h
+++ b/include/net/mptcp.h
@@ -23,6 +23,7 @@ struct mptcp_ext {
u64 data_seq;
u32 subflow_seq;
u16 data_len;
+ __sum16 csum;
u8 use_map:1,
dsn64:1,
data_fin:1,