All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: mptcp@lists.linux.dev
Subject: [PATCH mptcp-next 00/14] mptcp: get rid of msk->subflow
Date: Mon, 10 Jul 2023 14:54:55 +0200	[thread overview]
Message-ID: <cover.1688993569.git.pabeni@redhat.com> (raw)

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 2 patches are minor cleanups, 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.

Paolo Abeni (14):
  mptcp: more accurate NL event generation.
  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        |  47 ++++++-----
 net/ipv6/af_inet6.c       |  10 ++-
 net/mptcp/pm_netlink.c    |  30 ++++---
 net/mptcp/protocol.c      | 161 +++++++++++++++++++-------------------
 net/mptcp/protocol.h      |  15 ++--
 net/mptcp/sockopt.c       |  65 ++++++++-------
 8 files changed, 174 insertions(+), 157 deletions(-)

-- 
2.41.0


             reply	other threads:[~2023-07-10 12:55 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-10 12:54 Paolo Abeni [this message]
2023-07-10 12:54 ` [PATCH mptcp-next 01/14] mptcp: more accurate NL event generation Paolo Abeni
2023-07-13  9:02   ` Matthieu Baerts
2023-07-13 16:44     ` Mat Martineau
2023-07-13 16:45   ` Mat Martineau
2023-07-13 19:15     ` Matthieu Baerts
2023-07-10 12:54 ` [PATCH mptcp-next 02/14] mptcp: avoid unneeded mptcp_token_destroy() calls Paolo Abeni
2023-07-10 12:54 ` [PATCH mptcp-next 03/14] mptcp: avoid additional __inet_stream_connect() call Paolo Abeni
2023-07-12 21:49   ` Mat Martineau
2023-07-13  9:00     ` Matthieu Baerts
2023-07-14  8:38       ` Paolo Abeni
2023-07-17 13:47         ` Matthieu Baerts
2023-07-14  8:15     ` Paolo Abeni
2023-07-10 12:54 ` [PATCH mptcp-next 04/14] mptcp: avoid subflow socket usage in mptcp_get_port() Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 05/14] net: factor out inet{,6}_bind_sk helpers Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 06/14] mptcp: mptcp: avoid additional indirection in mptcp_bind() Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 07/14] net: factor out __inet_listen_sk() helper Paolo Abeni
2023-07-12 21:50   ` Mat Martineau
2023-07-14  8:16     ` Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 08/14] mptcp: avoid additional indirection in mptcp_listen() Paolo Abeni
2023-07-12 21:52   ` Mat Martineau
2023-07-14  8:22     ` Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 09/14] mptcp: avoid additional indirection in mptcp_poll() Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 10/14] mptcp: avoid unneeded indirection in mptcp_stream_accept() Paolo Abeni
2023-07-12 21:55   ` Mat Martineau
2023-07-14  8:42     ` Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 11/14] mptcp: avoid additional indirection in sockopt Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 12/14] mptcp: avoid ssock usage in mptcp_pm_nl_create_listen_socket() Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 13/14] mptcp: change the mpc check helper to return a sk Paolo Abeni
2023-07-10 12:55 ` [PATCH mptcp-next 14/14] mptcp: get rid of msk->subflow Paolo Abeni
2023-07-10 14:03   ` mptcp: get rid of msk->subflow: Tests Results MPTCP CI
2023-07-12 21:59   ` [PATCH mptcp-next 14/14] mptcp: get rid of msk->subflow Mat Martineau
2023-07-14  9:00     ` Paolo Abeni
2023-07-13 17:59   ` mptcp: get rid of msk->subflow: Tests Results MPTCP CI

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cover.1688993569.git.pabeni@redhat.com \
    --to=pabeni@redhat.com \
    --cc=mptcp@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.