All of lore.kernel.org
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH v2 mptcp-net 2/2] mptcp: do not reset MP_CAPABLE subflow on mapping errors
Date: Tue, 18 May 2021 16:17:16 +0200	[thread overview]
Message-ID: <d816c5c2b4bcb0d69effdb3b8fc4fd09fa2a9003.camel@redhat.com> (raw)
In-Reply-To: <2651afa0-d371-8730-a685-def56669d6e@linux.intel.com>

On Mon, 2021-05-17 at 17:16 -0700, Mat Martineau wrote:
> On Mon, 17 May 2021, Paolo Abeni wrote:
> 
> > When some mapping related errors occours we close the main
> > MPC subflow with a RST. We should instead fallback gracefully
> > to TCP, and do the reset only for MPJ subflows.
> > 
> > Fixes: d22f4988ffec ("mptcp: process MP_CAPABLE data option")
> > Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/192
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > net/mptcp/subflow.c | 39 +++++++++++++++++++--------------------
> > 1 file changed, 19 insertions(+), 20 deletions(-)
> > 
> > diff --git a/net/mptcp/subflow.c b/net/mptcp/subflow.c
> > index 278986585088..9befe9fe7bca 100644
> > --- a/net/mptcp/subflow.c
> > +++ b/net/mptcp/subflow.c
> > @@ -1110,10 +1110,9 @@ static bool subflow_check_data_avail(struct sock *ssk)
> > 
> > 		status = get_mapping_status(ssk, msk);
> > 		trace_subflow_check_data_avail(status, skb_peek(&ssk->sk_receive_queue));
> > -		if (unlikely(status == MAPPING_INVALID)) {
> > -			ssk->sk_err = EBADMSG;
> > -			goto fatal;
> > -		}
> > +		if (unlikely(status == MAPPING_INVALID))
> > +			goto fallback;
> > +
> 
> There are a bunch of other ways to get MAPPING_INVALID during the life of 
> a connection, including when there are multiple subflows active and 
> fallback is not a valid option. Can the new fallback condition be more 
> targeted to this "out of order / packet loss at connection time" issue so 
> truly fatal MAPPING_INVALID cases still reset the connection?

What we should do if we get a MAPPING_INVALID and we have a single
(MPC) subflow? I could not find any specific reference in the RFC. I
think it's roughly the same as 'no mapping' at all: if we can fallback
we do fallback, otherwise we reset.

Note that with this patch, under the 'fallback' label, checks if a
reset is needed or not. The current patch does a reset only if the
subflow is an MP_JOIN one, but that condition could be additionally
extended to 'msk has multiple subflows' - even if the latter looks like
a net-next patch.

WDYT?

Thanks!

Paolo


  reply	other threads:[~2021-05-18 14:17 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17 16:56 [PATCH v2 mptcp-net 1/2] mptcp: always parse mptcp options for MPC reqsk Paolo Abeni
2021-05-17 16:56 ` [PATCH v2 mptcp-net 2/2] mptcp: do not reset MP_CAPABLE subflow on mapping errors Paolo Abeni
2021-05-17 17:22   ` [PATCH v2 mptcp-net 3/2] mptcp: update selftest for fallback due to OoO Paolo Abeni
2021-05-18  0:16   ` [PATCH v2 mptcp-net 2/2] mptcp: do not reset MP_CAPABLE subflow on mapping errors Mat Martineau
2021-05-18 14:17     ` Paolo Abeni [this message]
2021-05-18 17:28       ` Mat Martineau

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=d816c5c2b4bcb0d69effdb3b8fc4fd09fa2a9003.camel@redhat.com \
    --to=pabeni@redhat.com \
    --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.