Skip to content

mptcp: get rid of msk->subflow

Paolo Abeni mptcp 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest13 patches 6 repliesIn review
  2. v114 patches 19 repliesSuperseded

Changes in v2 from the cover letter

- dropped first patch (already applied)
- a bunch of typos and comments, the only patches with code changes are 7/13, 9/13, 13/13, see the individual changelog for the details.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/13mptcp: avoid unneeded mptcp_token_destroy() callsnet/mptcp/protocol.c+0 -20 replies
2/13mptcp: avoid additional __inet_stream_connect() callnet/mptcp/protocol.c+32 -110 replies
3/13mptcp: avoid subflow socket usage in mptcp_get_port()net/mptcp/protocol.c+3 -50 replies
4/13net: factor out inet{,6}_bind_sk helpersinclude/net/inet_common.h include/net/ipv6.h net/ipv4/af_inet.c +1 more+15 -51 reply
5/13mptcp: mptcp: avoid additional indirection in mptcp_bind()net/mptcp/protocol.c+12 -50 replies
6/13net: factor out __inet_listen_sk() helperinclude/net/inet_common.h net/ipv4/af_inet.c+23 -161 reply
7/13mptcp: avoid additional indirection in mptcp_listen()net/mptcp/protocol.c+9 -40 replies
8/13mptcp: avoid additional indirection in mptcp_poll()net/mptcp/protocol.c+3 -30 replies
9/13mptcp: avoid unneeded indirection in mptcp_stream_accept()net/mptcp/protocol.c+10 -190 replies
10/13mptcp: avoid additional indirection in sockoptnet/mptcp/sockopt.c+16 -120 replies
11/13mptcp: avoid ssock usage in mptcp_pm_nl_create_listen_socket()net/mptcp/pm_netlink.c+15 -90 replies
12/13mptcp: change the mpc check helper to return a sknet/mptcp/pm_netlink.c net/mptcp/protocol.c net/mptcp/protocol.h +1 more+38 -550 replies
13/13mptcp: get rid of msk->subflownet/mptcp/protocol.c net/mptcp/protocol.h+12 -262 replies

Reviews trailers per patch

2 of 13 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchMat Martineau
SeriesR-b
1/13
2/13
3/13
4/13A-b
5/13
6/13A-b
7/13
8/13
9/13
10/13
11/13
12/13
13/13

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 mptcp-next 00/13] mptcp: get rid of msk->subflow

The mptcp protocol maintains an additional struct socket per connection, mainly to be able to use easily tcp-level struct socket operations.

That lead to several ill side effects, beyond the quite unfortunate/ confusing field name
- active and passive sockets behavior is incosistent, as only active ones have not NULL msk->subflow, leading to different error handling (and different error code returned to the user-space) in several places.
- active sockets uses an unneeded, larger amount of memory
- passive sockets can't successfully go through accept()/disconnect() accept()

This series address all the above finally getting rid of the blamed field. The first patch is a minor clean-up, in the next 11 patches msk->subflow usage is sistematically removed from the mptcp protocol, replacing it with direct msk->first usage, eventually introducing new core helpers as needed.

The final patch finally dispose the field, and it's the only patch in the series intened to produce functional changes.

v1 -> v2:
- dropped first patch (already applied)
- a bunch of typos and comments, the only patches with code changes are 7/13, 9/13, 13/13, see the individual changelog for the details.

Paolo Abeni (13):
mptcp: avoid unneeded mptcp_token_destroy() calls
mptcp: avoid additional __inet_stream_connect() call
mptcp: avoid subflow socket usage in mptcp_get_port()
net: factor out inet{,6}_bind_sk helpers
mptcp: mptcp: avoid additional indirection in mptcp_bind()
net: factor out __inet_listen_sk() helper
mptcp: avoid additional indirection in mptcp_listen()
mptcp: avoid additional indirection in mptcp_poll()
mptcp: avoid unneeded indirection in mptcp_stream_accept()
mptcp: avoid additional indirection in sockopt
mptcp: avoid ssock usage in mptcp_pm_nl_create_listen_socket()
mptcp: change the mpc check helper to return a sk
mptcp: get rid of msk->subflow

 include/net/inet_common.h |   2 +
 include/net/ipv6.h        |   1 +
 net/ipv4/af_inet.c        |  46 ++++++----
 net/ipv6/af_inet6.c       |  10 ++-
 net/mptcp/pm_netlink.c    |  30 ++++---
 net/mptcp/protocol.c      | 177 +++++++++++++++++++-------------------
 net/mptcp/protocol.h      |  15 ++--
 net/mptcp/sockopt.c       |  65 +++++++-------
 8 files changed, 181 insertions(+), 165 deletions(-)
Signature · 1 line
2.41.0