[PATCH v2 mptcp-next 0/7] mptcp: improve accept() and disconnect()

Paolo Abeni posted 7 patches 3 weeks, 3 days ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/cover.1636647623.git.pabeni@redhat.com
Maintainers: "David S. Miller" <davem@davemloft.net>, Matthieu Baerts <matthieu.baerts@tessares.net>, Jakub Kicinski <kuba@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Shuah Khan <shuah@kernel.org>
net/mptcp/options.c                           |  57 +++++--
net/mptcp/pm.c                                |  10 +-
net/mptcp/pm_netlink.c                        |   3 +
net/mptcp/protocol.c                          | 144 +++++++++++------
net/mptcp/protocol.h                          |  16 +-
net/mptcp/subflow.c                           |   1 -
net/mptcp/token.c                             |   1 +
.../selftests/net/mptcp/mptcp_connect.c       | 148 +++++++++++++++---
.../selftests/net/mptcp/mptcp_connect.sh      |  39 ++++-
9 files changed, 324 insertions(+), 95 deletions(-)

[PATCH v2 mptcp-next 0/7] mptcp: improve accept() and disconnect()

Posted by Paolo Abeni 3 weeks, 3 days ago
As outlined in the public mtg, mptcp_accept() is currently quite
suboptimal, both from performance and code complexity

This series tries to clean it up, enforcing a wider lifetime for
the initial subflow, so that we don't need to acquire additional
references there.

To reach such goal we need to properly define the disconnect()
behavior, which is currently quite incomplete. Additionally allow
user-space to really disconnect established connections.

Disconnect() needs in turn an egress FASTCLOSE implementation,
added here according to option R (reset - the simpler form).

Finally, the self-tests need as pre-req Florian's patches implementing
SIOCOUTQ

v1 -> v2:
 - update mptcp_connect argument lists and usage() in patch 7/7

RFC -> v1:
 - added patches 1/7, 3/7, 6/7, 7/7
 - added a few missing bits in patch 4/7

Paolo Abeni (7):
  mptcp: keep snd_una updated for fallback socket
  mptcp: never allow the PM to close a listener subflow
  mptcp: implement fastclose xmit path
  mptcp: full disconnect implementation
  mptcp: cleanup accept and poll
  mptcp: implement support for user-space disconnect
  mptcp: add disconnect selftests

 net/mptcp/options.c                           |  57 +++++--
 net/mptcp/pm.c                                |  10 +-
 net/mptcp/pm_netlink.c                        |   3 +
 net/mptcp/protocol.c                          | 144 +++++++++++------
 net/mptcp/protocol.h                          |  16 +-
 net/mptcp/subflow.c                           |   1 -
 net/mptcp/token.c                             |   1 +
 .../selftests/net/mptcp/mptcp_connect.c       | 148 +++++++++++++++---
 .../selftests/net/mptcp/mptcp_connect.sh      |  39 ++++-
 9 files changed, 324 insertions(+), 95 deletions(-)

-- 
2.33.1


Re: [PATCH v2 mptcp-next 0/7] mptcp: improve accept() and disconnect()

Posted by Matthieu Baerts 2 weeks, 2 days ago
Hi Paolo, Mat,

On 11/11/2021 17:21, Paolo Abeni wrote:
> As outlined in the public mtg, mptcp_accept() is currently quite
> suboptimal, both from performance and code complexity
> 
> This series tries to clean it up, enforcing a wider lifetime for
> the initial subflow, so that we don't need to acquire additional
> references there.
> 
> To reach such goal we need to properly define the disconnect()
> behavior, which is currently quite incomplete. Additionally allow
> user-space to really disconnect established connections.
> 
> Disconnect() needs in turn an egress FASTCLOSE implementation,
> added here according to option R (reset - the simpler form).
> 
> Finally, the self-tests need as pre-req Florian's patches implementing
> SIOCOUTQ

Thank you for the patches and reviews!

Now that Florian's patches are in our tree, we can apply this series
too. Patches are now in our tree with Mat's RvB tags and without some
warnings reported by checkpatch in selftests (except the ones not to
split strings to different lines, so just some small things):

- be5470135e9c: mptcp: keep snd_una updated for fallback socket
- 3dd1385ee6a2: mptcp: never allow the PM to close a listener subflow
- b382fb5fa27c: mptcp: implement fastclose xmit path
- 445bf9531ef7: mptcp: full disconnect implementation
- a2fcf84f7b73: mptcp: cleanup accept and poll
- c999f3f089c7: mptcp: implement support for user-space disconnect
- 707b9bbf2820: mptcp: add disconnect selftests
- Results: 3ebf8b8d1426..736c6532dd92

Builds and tests are now in progress:

https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20211119T164652
https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

Re: [PATCH v2 mptcp-next 0/7] mptcp: improve accept() and disconnect()

Posted by Mat Martineau 3 weeks, 2 days ago
On Thu, 11 Nov 2021, Paolo Abeni wrote:

> As outlined in the public mtg, mptcp_accept() is currently quite
> suboptimal, both from performance and code complexity
>
> This series tries to clean it up, enforcing a wider lifetime for
> the initial subflow, so that we don't need to acquire additional
> references there.
>
> To reach such goal we need to properly define the disconnect()
> behavior, which is currently quite incomplete. Additionally allow
> user-space to really disconnect established connections.
>
> Disconnect() needs in turn an egress FASTCLOSE implementation,
> added here according to option R (reset - the simpler form).
>
> Finally, the self-tests need as pre-req Florian's patches implementing
> SIOCOUTQ
>
> v1 -> v2:
> - update mptcp_connect argument lists and usage() in patch 7/7
>

Thanks for the v2 Paolo. Looks good to me.

(Matthieu, note the dependency on Florian's TCP_INQ series)


Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

> RFC -> v1:
> - added patches 1/7, 3/7, 6/7, 7/7
> - added a few missing bits in patch 4/7
>
> Paolo Abeni (7):
>  mptcp: keep snd_una updated for fallback socket
>  mptcp: never allow the PM to close a listener subflow
>  mptcp: implement fastclose xmit path
>  mptcp: full disconnect implementation
>  mptcp: cleanup accept and poll
>  mptcp: implement support for user-space disconnect
>  mptcp: add disconnect selftests
>
> net/mptcp/options.c                           |  57 +++++--
> net/mptcp/pm.c                                |  10 +-
> net/mptcp/pm_netlink.c                        |   3 +
> net/mptcp/protocol.c                          | 144 +++++++++++------
> net/mptcp/protocol.h                          |  16 +-
> net/mptcp/subflow.c                           |   1 -
> net/mptcp/token.c                             |   1 +
> .../selftests/net/mptcp/mptcp_connect.c       | 148 +++++++++++++++---
> .../selftests/net/mptcp/mptcp_connect.sh      |  39 ++++-
> 9 files changed, 324 insertions(+), 95 deletions(-)
>
> -- 
> 2.33.1
>
>
>

--
Mat Martineau
Intel