]> git.baikalelectronics.ru Git - kernel.git/commit
mptcp: generate the data checksum
authorGeliang Tang <geliangtang@gmail.com>
Thu, 17 Jun 2021 23:46:08 +0000 (16:46 -0700)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jun 2021 18:40:11 +0000 (11:40 -0700)
commit7dd76008075ddcaa228524ea7c6fde0fa45b8010
treee5197c9b483a0902c530fba6284c412eff1aacdb
parentba13bc62ee74916e9ccb0f50b40793c6f52a8b56
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>
include/net/mptcp.h
net/mptcp/protocol.c
net/mptcp/protocol.h