mptcp: always graft subflow socket to parent
authorPaolo Abeni <pabeni@redhat.com>
Wed, 20 Jan 2021 14:39:10 +0000 (15:39 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 23 Jan 2021 03:21:02 +0000 (19:21 -0800)
commit866f26f2a9c33bc70eb0f07ffc37fd9424ffe501
tree2314f01e3fdbdc52dd4c9178cd0f42f2d701d8e3
parente26ca4b535820b1445dcef3c0f82b3fb5b45108b
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>
net/mptcp/protocol.c
net/mptcp/protocol.h
net/mptcp/subflow.c