MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Matthieu Baerts <matthieu.baerts@tessares.net>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v2 1/6] mptcp: add subflow unique id
Date: Tue, 23 May 2023 18:45:28 +0200	[thread overview]
Message-ID: <7e490b1f2ada9d3caaf29118f5bc2fb1484aa0ec.camel@redhat.com> (raw)
In-Reply-To: <18e20b8f-aaf1-81ae-1f88-8572bf270098@tessares.net>

On Tue, 2023-05-23 at 17:20 +0200, Matthieu Baerts wrote:
> Hi Paolo,
> 
> On 22/05/2023 15:56, Paolo Abeni wrote:
> > The user-space need to preperly account the data received/sent by
> > individual subflows. When additional subflows are created and/or
> > closed during the MPTCP socket lifetime, the information currently
> > exposed via MPTCP_TCPINFO are not enough: subflows are identifed only
> > by the sequential position inside the info dumps, and that will change
> > with the above mentioned events.
> > 
> > To solve the above problem, this patch introduces a new subflow identifier
> > that is unique inside the given mptcp socket scope.
> > 
> > The initial subflow get the id 1 and the other subflows get incremental
> > values at join time.
> > 
> > Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> > ---
> > v1 -> v2:
> >  - properly set subflow_id for the first passive subflow and active subflows, too
> >  - drop the tcpi_fackets overload
> > ---
> 
> (...)
> 
> > @@ -3203,6 +3206,7 @@ struct sock *mptcp_sk_clone_init(const struct sock *sk,
> >  	msk->snd_nxt = msk->write_seq;
> >  	msk->snd_una = msk->write_seq;
> >  	msk->wnd_end = msk->snd_nxt + req->rsk_rcv_wnd;
> > +	msk->subflow_id++;
> 
> It is a bit confusing. Just to be sure, here it would be the same to do
> 
>   msk->subflow_id = 1;
> 
> because subflow_id from the listener will be 0, right?

You are right, my code above is confusing and even incorrect. I'll
replace it with the plain assignment.

Thanks!

/P


  reply	other threads:[~2023-05-23 16:45 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-22 13:56 [PATCH mptcp-next v2 0/6] mptcp: add some more diag info Paolo Abeni
2023-05-22 13:56 ` [PATCH mptcp-next v2 1/6] mptcp: add subflow unique id Paolo Abeni
2023-05-23 15:20   ` Matthieu Baerts
2023-05-23 16:45     ` Paolo Abeni [this message]
2023-05-22 13:56 ` [PATCH mptcp-next v2 2/6] mptcp: introduce MPTCP_FULL_INFO getsockopt Paolo Abeni
2023-05-23 15:31   ` Matthieu Baerts
2023-05-23 16:46     ` Paolo Abeni
2023-05-23 16:55       ` Matthieu Baerts
2023-05-23 17:10         ` Paolo Abeni
2023-05-22 13:56 ` [PATCH mptcp-next v2 3/6] mptcp: move snd_una update earlier for fallback socket Paolo Abeni
2023-05-22 13:56 ` [PATCH mptcp-next v2 4/6] mptcp: track some aggregate data counters Paolo Abeni
2023-05-22 13:56 ` [PATCH mptcp-next v2 5/6] selftests: mptcp: explicitly tests aggregate counters Paolo Abeni
2023-05-23 15:29   ` Matthieu Baerts
2023-05-23 16:59     ` Paolo Abeni
2023-05-22 13:56 ` [PATCH mptcp-next v2 6/6] selftests: mptcp: add MPTCP_FULL_INFO testcase 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=7e490b1f2ada9d3caaf29118f5bc2fb1484aa0ec.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=matthieu.baerts@tessares.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