mptcp: implement TCP_NOTSENT_LOWAT support
authorPaolo Abeni <pabeni@redhat.com>
Fri, 1 Mar 2024 17:43:46 +0000 (18:43 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 4 Mar 2024 10:50:28 +0000 (10:50 +0000)
commit29b5e5ef87397963ca38d3eec0d296ad1c979bbc
tree5cbea6406fe8148d458313229ed38a241b1bfdab
parenta74762675f700a5473ebe54a671a0788a5b23cc9
mptcp: implement TCP_NOTSENT_LOWAT support

Add support for such socket option storing the user-space provided
value in a new msk field, and using such data to implement the
_mptcp_stream_memory_free() helper, similar to the TCP one.

To avoid adding more indirect calls in the fast path, open-code
a variant of sk_stream_memory_free() in mptcp_sendmsg() and add
direct calls to the mptcp stream memory free helper where possible.

Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/464
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Reviewed-by: Mat Martineau <martineau@kernel.org>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/sockopt.c