All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH mptcp-next v2 0/5] mptcp: replace per-addr listener sockets
@ 2022-02-17 14:25 Florian Westphal
  2022-02-17 14:25 ` [PATCH mptcp-next v2 1/5] mptcp: check netns in mptcp_token_exists Florian Westphal
                   ` (4 more replies)
  0 siblings, 5 replies; 16+ messages in thread
From: Florian Westphal @ 2022-02-17 14:25 UTC (permalink / raw)
  To: mptcp; +Cc: Florian Westphal

Changes since v1:
- avoid uneeded sk refcount inc/dec pair
- use more descriptive name for function name
- fix typo in rfc number (Mathieu)
- don't increment listner refcount, caller assumes noref

Not changed:
 - hook location, plain tcp sockets take precedence.
 - per-netns listener

Global listener means other namespaces are affected in case
of backlog overflow. Pernet listeners avoid that, so I don't see
a strong argument for tcp refactoring that would allow global sk.

This series introduces a hidden per-netns pseudo "listener" socket to
handle mptcp join requests with a valid token but that do not match an
existing listening socket.

First patch extens existing helper to also restrict search to the
given netns.

Second patch is a minor preparation patch: MPTCP Join requests packets
that fail to find a suitable socket by means of standard address/port
demultiplexing will be steered to a pseudo-listener, similar to TPROXY
interception.

This pseudo listener isn't bound to an address or port (all zero), so we
need to fetch the port number from the tcp header and not the listener sk.

Patch three adds a stub to the tcp demux code.
This has no functionality, its extra to make tcp datapath change stand out.

Fourth patch is the bulk work, it adds per netns listener and implements
token-based socket demultiplexing.

Last patch zaps the per-address sockets from mptcp, they are not needed
anymore.

Florian Westphal (5):
  mptcp: check netns in mptcp_token_exists
  mptcp: prefer ip address in syn skb instead of listen sk bound address
  tcp: add mptcp join demultiplex hooks
  mptcp: handle join requests via pernet listen socket
  mptcp: remove per-address listening sockets

 include/net/mptcp.h    |  15 +++
 net/ipv4/tcp_ipv4.c    |   4 +
 net/ipv6/tcp_ipv6.c    |  23 +++--
 net/mptcp/ctrl.c       | 211 ++++++++++++++++++++++++++++++++++++++++-
 net/mptcp/pm_netlink.c |  82 +++-------------
 net/mptcp/protocol.c   |   2 +-
 net/mptcp/protocol.h   |   6 +-
 net/mptcp/subflow.c    |  12 ++-
 net/mptcp/token.c      |   5 +-
 9 files changed, 272 insertions(+), 88 deletions(-)
-- 
2.34.1


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2022-02-23 18:07 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-17 14:25 [PATCH mptcp-next v2 0/5] mptcp: replace per-addr listener sockets Florian Westphal
2022-02-17 14:25 ` [PATCH mptcp-next v2 1/5] mptcp: check netns in mptcp_token_exists Florian Westphal
2022-02-17 14:25 ` [PATCH mptcp-next v2 2/5] mptcp: prefer ip address in syn skb instead of listen sk bound address Florian Westphal
2022-02-17 14:25 ` [PATCH mptcp-next v2 3/5] tcp: add mptcp join demultiplex hooks Florian Westphal
2022-02-17 21:58   ` Paolo Abeni
2022-02-18  7:29     ` Florian Westphal
2022-02-18  8:49       ` Paolo Abeni
2022-02-17 14:25 ` [PATCH mptcp-next v2 4/5] mptcp: handle join requests via pernet listen socket Florian Westphal
2022-02-17 19:46   ` kernel test robot
2022-02-17 19:46     ` kernel test robot
2022-02-17 19:47   ` kernel test robot
2022-02-17 19:47     ` kernel test robot
2022-02-17 23:52   ` Mat Martineau
2022-02-20 22:01     ` Florian Westphal
2022-02-23 18:07   ` Kishen Maloor
2022-02-17 14:25 ` [PATCH mptcp-next v2 5/5] mptcp: remove per-address listening sockets Florian Westphal

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.