diff options
author | Paolo Abeni <pabeni@redhat.com> | 2021-01-20 15:39:10 +0100 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-01-22 19:21:02 -0800 |
commit | 866f26f2a9c33bc70eb0f07ffc37fd9424ffe501 (patch) | |
tree | 2314f01e3fdbdc52dd4c9178cd0f42f2d701d8e3 /net/mptcp/protocol.h | |
parent | e26ca4b535820b1445dcef3c0f82b3fb5b45108b (diff) |
mptcp: always graft subflow socket to parent
Currently, incoming subflows link to the parent socket,
while outgoing ones link to a per subflow socket. The latter
is not really needed, except at the initial connect() time and
for the first subflow.
Always graft the outgoing subflow to the parent socket and
free the unneeded ones early.
This allows some code cleanup, reduces the amount of memory
used and will simplify the next patch
Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'net/mptcp/protocol.h')
-rw-r--r-- | net/mptcp/protocol.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/net/mptcp/protocol.h b/net/mptcp/protocol.h index d6400ad2d615..65d200a1072b 100644 --- a/net/mptcp/protocol.h +++ b/net/mptcp/protocol.h @@ -473,6 +473,7 @@ void mptcp_subflow_shutdown(struct sock *sk, struct sock *ssk, int how); void __mptcp_close_ssk(struct sock *sk, struct sock *ssk, struct mptcp_subflow_context *subflow); void mptcp_subflow_reset(struct sock *ssk); +void mptcp_sock_graft(struct sock *sk, struct socket *parent); /* called with sk socket lock held */ int __mptcp_subflow_connect(struct sock *sk, const struct mptcp_addr_info *loc, |