All of lore.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: Florian Westphal <fw@strlen.de>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v2 4/5] mptcp: handle join requests via pernet listen socket
Date: Sun, 20 Feb 2022 23:01:43 +0100	[thread overview]
Message-ID: <20220220220143.GA18967@breakpoint.cc> (raw)
In-Reply-To: <5cbaa9-26e5-4ce0-7950-3ff131f9f3f8@linux.intel.com>

Mat Martineau <mathew.j.martineau@linux.intel.com> wrote:
> > If so, the pernet listener is returned and tcp processing resumes.
> > Otherwise, handling is intentical.
> 
> Typo: identical

Thanks, fixed both typos.

> > This patch does not cover timewait sockets.
> > 
> Can you elaborate on what properly covering timewait sockets would look
> like? Does the approach used by multipath-tcp.org (handling token lookup
> after inet_lookup_listener() / case TCP_TW_SYN in tcp_v4_rcv()) fit?

Looks like its as simple as:

diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c
--- a/net/ipv4/tcp_ipv4.c
+++ b/net/ipv4/tcp_ipv4.c
@@ -2189,6 +2189,9 @@ int tcp_v4_rcv(struct sk_buff *skb)
 							iph->daddr, th->dest,
 							inet_iif(skb),
 							sdif);
+		if (!sk2)
+			sk2 = mptcp_handle_join(AF_INET, skb);
+
 		if (sk2) {
 			inet_twsk_deschedule_put(inet_twsk(sk));
 			sk = sk2;
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c
index 3b8608d35dcd..f2f2308c6bda 100644
--- a/net/ipv6/tcp_ipv6.c
+++ b/net/ipv6/tcp_ipv6.c
@@ -1833,6 +1833,9 @@ INDIRECT_CALLABLE_SCOPE int tcp_v6_rcv(struct sk_buff *skb)
 					    ntohs(th->dest),
 					    tcp_v6_iif_l3_slave(skb),
 					    sdif);
+		if (!sk2)
+			sk2 = mptcp_handle_join(AF_INET6, skb);
+
 		if (sk2) {
 			struct inet_timewait_sock *tw = inet_twsk(sk);
 			inet_twsk_deschedule_put(tw);

I think I'll squash this into the previous patch and will just remove
the timewait-socket bit from this patch.

> > +	case AF_INET6:
> > +		lsk = pernet->join6.sk;
> > +		break;
> 
> As kbuild noted, missing an
> 
> #if IS_ENABLED(CONFIG_MPTCP_IPV6)
> 
> check here.

Added.

  reply	other threads:[~2022-02-20 22:01 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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

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=20220220220143.GA18967@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=mathew.j.martineau@linux.intel.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.