aboutsummaryrefslogtreecommitdiff
path: root/net/mptcp/protocol.h
diff options
context:
space:
mode:
authorGravatar Maxim Galaganov <max@internet.ru> 2021-12-03 14:35:41 -0800
committerGravatar Jakub Kicinski <kuba@kernel.org> 2021-12-07 11:36:31 -0800
commit4f6e14bd19d6de7831f31cfb3210f2ea93eeb038 (patch)
tree23cdba78ff4fc7a076e445b95a55db44cd213efc /net/mptcp/protocol.h
parentmptcp: expose mptcp_check_and_set_pending (diff)
downloadlinux-4f6e14bd19d6de7831f31cfb3210f2ea93eeb038.tar.gz
linux-4f6e14bd19d6de7831f31cfb3210f2ea93eeb038.tar.bz2
linux-4f6e14bd19d6de7831f31cfb3210f2ea93eeb038.zip
mptcp: support TCP_CORK and TCP_NODELAY
First, add cork and nodelay fields to the mptcp_sock structure so they can be used in sync_socket_options(), and fill them on setsockopt while holding the msk socket lock. Then, on setsockopt set proper tcp_sk(ssk)->nonagle values for subflows by calling __tcp_sock_set_cork() or __tcp_sock_set_nodelay() on the ssk while holding the ssk socket lock. tcp_push_pending_frames() will be invoked on the ssk if a cork was cleared or nodelay was set. Also set MPTCP_PUSH_PENDING bit by calling mptcp_check_and_set_pending(). This will lead to __mptcp_push_pending() being called inside mptcp_release_cb() with new tcp_sk(ssk)->nonagle. Also add getsockopt support for TCP_CORK and TCP_NODELAY. Acked-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net> Signed-off-by: Maxim Galaganov <max@internet.ru> Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r--net/mptcp/protocol.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h
index 147b22da41ca..e1469155fb15 100644
--- a/net/mptcp/protocol.h
+++ b/net/mptcp/protocol.h
@@ -249,7 +249,9 @@ struct mptcp_sock {
bool rcv_fastclose;
bool use_64bit_ack; /* Set when we received a 64-bit DSN */
bool csum_enabled;
- u8 recvmsg_inq:1;
+ u8 recvmsg_inq:1,
+ cork:1,
+ nodelay:1;
spinlock_t join_list_lock;
struct work_struct work;
struct sk_buff *ooo_last_skb;