MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Geliang Tang <geliangtang@gmail.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v3 2/8] mptcp: add start_seq in the msk
Date: Tue, 14 Sep 2021 17:40:12 +0200	[thread overview]
Message-ID: <fe013dceb2b12f0b346557a1dee18971ce6d5c9a.camel@redhat.com> (raw)
In-Reply-To: <7b4984f87a23369f9e4896d959945d01289a721d.1631610729.git.geliangtang@gmail.com>

On Tue, 2021-09-14 at 17:19 +0800, Geliang Tang wrote:
> This patch added a new member named start_seq to the msk to keep track of
> the beginning of the last fully-acked data segment. This would be updated
> in __mptcp_clean_una.
> 
> Signed-off-by: Geliang Tang <geliangtang@gmail.com>
> ---
>  net/mptcp/protocol.c | 3 +++
>  net/mptcp/protocol.h | 1 +
>  2 files changed, 4 insertions(+)
> 
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 71a5427609a9..e804ca0ac9e1 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1071,6 +1071,7 @@ static void __mptcp_clean_una(struct sock *sk)
>  			WRITE_ONCE(msk->first_pending, mptcp_send_next(sk));
>  		}
>  
> +		msk->start_seq = dfrag->data_seq;
>  		dfrag_clear(sk, dfrag);
>  		cleaned = true;
>  	}
> @@ -2891,6 +2892,7 @@ struct sock *mptcp_sk_clone(const struct sock *sk,
>  	msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd;
>  	msk->setsockopt_seq = mptcp_sk(sk)->setsockopt_seq;
>  	msk->last_retrans_seq = subflow_req->idsn - 1;
> +	msk->start_seq = 0;

I think 'start_seq' should be initialized to 'subflow_req->idsn - 1'.

The field name itself is a bit unclear to me. Something like
'last_fully_acked_dss_start_seq' would be more expressive, but it would
not be a better name at all ;) Any suggestion for a good alternative
name more than welcome! (otherwise we could add some more verbose
comment nearby the field definition)

/P


  reply	other threads:[~2021-09-14 15:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-14  9:18 [PATCH mptcp-next v3 0/8] The infinite mapping support Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 1/8] mptcp: add mptcp_is_data_contiguous helper Geliang Tang
2021-09-14 15:32   ` Paolo Abeni
2021-09-15  0:37     ` Mat Martineau
2021-09-14  9:19 ` [PATCH mptcp-next v3 2/8] mptcp: add start_seq in the msk Geliang Tang
2021-09-14 15:40   ` Paolo Abeni [this message]
2021-09-14  9:19 ` [PATCH mptcp-next v3 3/8] mptcp: infinite mapping sending Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 4/8] mptcp: add the fallback check Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 5/8] mptcp: infinite mapping receiving Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 6/8] mptcp: add mib for infinite map sending Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 7/8] selftests: mptcp: add infinite map mibs check Geliang Tang
2021-09-14  9:19 ` [PATCH mptcp-next v3 8/8] DO-NOT-MERGE: mptcp: mp_fail test Geliang Tang

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=fe013dceb2b12f0b346557a1dee18971ce6d5c9a.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=geliangtang@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox