mptcp.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Dmytro Shytyi <dmytro@shytyi.net>,
	mptcp@lists.linux.dev, Christoph Paasch <cpaasch@apple.com>
Subject: Re: [RFC PATCH mptcp-next v7 07/11] mptfo variables for msk, options. Fix loop retrans
Date: Mon, 19 Sep 2022 13:26:32 +0200	[thread overview]
Message-ID: <d2dbb643e29250730a2610986cde88c188986c3b.camel@redhat.com> (raw)
In-Reply-To: <be427fe3457391b7b50af213c255d8fd1f3703c7.camel@redhat.com>

On Mon, 2022-09-19 at 13:11 +0200, Paolo Abeni wrote:
> On Sun, 2022-09-18 at 00:28 +0200, Dmytro Shytyi wrote:
> > Introduce mptfo variables for msk and options.
> > Also fixe the infinite retransmissions in the end of second session.
> > Suggestion @palbeni (SEP 1) during the meting to 'look at ack'
> > 
> > Signed-off-by: Dmytro Shytyi <dmytro@shytyi.net>
> > ---
> >  net/mptcp/fastopen.c | 16 ++++++++++++++++
> >  net/mptcp/options.c  |  3 +++
> >  net/mptcp/protocol.h |  6 +++++-
> >  3 files changed, 24 insertions(+), 1 deletion(-)
> > 
> > diff --git a/net/mptcp/fastopen.c b/net/mptcp/fastopen.c
> > index 436e773d798a..149a4b1d3dac 100644
> > --- a/net/mptcp/fastopen.c
> > +++ b/net/mptcp/fastopen.c
> > @@ -91,3 +91,19 @@ int mptcp_setsockopt_sol_tcp_fastopen(struct mptcp_sock *msk, sockptr_t optval,
> >  
> >  	return ret;
> >  }
> > +
> > +void mptcp_treat_hshake_ack_fastopen(struct mptcp_sock *msk, struct mptcp_subflow_context *subflow,
> > +				     struct mptcp_options_received mp_opt)
> > +{
> > +	u64 ack_seq;
> > +
> > +	if (mp_opt.suboptions & OPTIONS_MPTCP_MPC && mp_opt.is_mptfo && msk->is_mptfo) {
> > +		msk->can_ack = true;
> > +		msk->remote_key = mp_opt.sndr_key;
> > +		mptcp_crypto_key_sha(msk->remote_key, NULL, &ack_seq);
> > +		ack_seq++;
> > +		WRITE_ONCE(msk->ack_seq, ack_seq);
> > +		pr_debug("ack_seq=%llu sndr_key=%llu", msk->ack_seq, mp_opt.sndr_key);
> > +		atomic64_set(&msk->rcv_wnd_sent, ack_seq);
> 
> It's not clear to me why the above is needed. According to the RFC we
> should not do additional MPTCP-level key management for TFO' sake ?!?

Addendum: instead here you likely want to setup-up a special DSS
mapping for the TFO data. Such mapping will additionally require some
special handling in  __mptcp_move_skb(), as 'msk->ack_seq' must not be
incremented by the in-sequence TFO data.

@Christoph: AFAICS, even with TFO, the initiator nor the listener can't
send any other data after the syn until the MPC handshake is completed.
Is that correct?

Thanks!

Paolo


  reply	other threads:[~2022-09-19 11:26 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-17 22:28 [RFC PATCH mptcp-next v7 00/11] mptcp: Fast Open Mechanism Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 01/11] Add separate fastopen.c file Dmytro Shytyi
2022-09-19 10:21   ` Paolo Abeni
2022-09-20 13:29     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 02/11] add mptcp_stream_connect to protocol.h Dmytro Shytyi
2022-09-19 10:19   ` Paolo Abeni
2022-09-20 13:30     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 03/11] Initiator: MSG_FASTOPEN sendto(). request cookie Dmytro Shytyi
2022-09-19 10:35   ` Paolo Abeni
2022-09-19 10:44     ` Paolo Abeni
2022-09-19 11:22       ` Matthieu Baerts
2022-09-20 13:32         ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 04/11] rfree(), rmem_uncharge() prototypes to protocol.h Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 05/11] Initiator: add locks() to mptcp_sendmsg_fastopen Dmytro Shytyi
2022-09-19 10:46   ` Paolo Abeni
2022-09-20 13:33     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 06/11] add mptcp_setsockopt_fastopen Dmytro Shytyi
2022-09-19 10:48   ` Paolo Abeni
2022-09-20 13:33     ` Dmytro Shytyi
2022-09-20  9:37   ` Matthieu Baerts
2022-09-20 13:34     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 07/11] mptfo variables for msk, options. Fix loop retrans Dmytro Shytyi
2022-09-19 11:11   ` Paolo Abeni
2022-09-19 11:26     ` Paolo Abeni [this message]
2022-09-20 16:32       ` Christoph Paasch
2022-09-20 13:40     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 08/11] Fix unxpctd val of subflow->map_seq(dscrd packet) Dmytro Shytyi
2022-09-19 11:27   ` Paolo Abeni
2022-09-19 11:31     ` Matthieu Baerts
2022-09-19 14:02       ` Paolo Abeni
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 09/11] Listener: Add received skb to msk Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 10/11] mptcp_fastopen_add_skb() helpers (skb to msk) Dmytro Shytyi
2022-09-19 14:06   ` Paolo Abeni
2022-09-20 13:36     ` Dmytro Shytyi
2022-09-17 22:28 ` [RFC PATCH mptcp-next v7 11/11] selftests: mptfo initiator/listener Dmytro Shytyi
2022-09-19 14:11   ` Paolo Abeni

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=d2dbb643e29250730a2610986cde88c188986c3b.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=cpaasch@apple.com \
    --cc=dmytro@shytyi.net \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).