MPTCP Linux Development
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: Florian Westphal <fw@strlen.de>
Cc: mptcp@lists.01.org
Subject: [MPTCP] Re: [PATCH mptcp-next 1/9] mptcp: add skeleton to sync msk socket options to subflows
Date: Fri, 19 Mar 2021 15:36:47 +0100	[thread overview]
Message-ID: <288657858ef194d8ee469bf64fd38d4f5952a989.camel@redhat.com> (raw)
In-Reply-To: <20210319123433.GE22603@breakpoint.cc>

On Fri, 2021-03-19 at 13:34 +0100, Florian Westphal wrote:
> Paolo Abeni <pabeni@redhat.com> wrote:
> > There are a few __mptcp_flush_join_list() call-sites which are already
> > in process context, e.g.:
> > 
> > mptcp_stream_accept()
> > __mptcp_push_pending()
> > __mptcp_move_skbs()
> > mptcp_disconnect()
> > 
> > what renaming mptcp_work_flush_join_list() in mptcp_flush_join_list() -
> > or mptcp_work_flush_join_list_lock() or some better name - and use it
> > in the above places?
> 
> What would be the advanage?

Uhmm... the need for synchronization should be quite a rare event,
right? I guess we can affort calling the workqueue on such occasion,
but it's a bit strange to me schedule the workqueue to get process
context when alredy in process context.

BTW there a few scenarios which are not 110% clear to me:

1)
listen(s0)
s1 = accept() // main msk

setsockopt(s1, a)

[2nd subflow is accepted]
// s1->setsockopt_seq == 1, s1->setsockopt_seq _old == 0

mptcp_sockopt_sync_all()
// s1->setsockopt_seq _old == 1

[3rd subflow is accepted]
// s1->setsockopt_seq == 1, s1->setsockopt_seq _old == 1, no
synchronzation ?!?
// but the 3rd subflow will inherit it's sockopt from s0, so
// it should need that?

2)
listen(s0)
s1 = accept() // main msk

setsockopt(s0, a)

[2nd subflow is accepted, after the above sockopt]
// s1->setsockopt_seq == 0, s1->setsockopt_seq _old == 0, no
// synchronzation ?!?
// but the 2nd subflow have different options inherited by s0?!?

3)
subflow generated by port-based endpoint

I think we need some additional handling for the above ?!? e.g.
fetching setsockopt_seq_old from the listener sockets into the subflow
at syn_recv time and in _flush_join_list do/schedule the
synchronization if at least a subflow has setsockopt_seq != msk-
>setsockopt_seq.

please let me know if the above makes any sense ;)

/P
_______________________________________________
mptcp mailing list -- mptcp@lists.01.org
To unsubscribe send an email to mptcp-leave@lists.01.org

  reply	other threads:[~2021-03-19 14:36 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-17 16:38 [MPTCP] [RFC PATCH mptcp-next 0/9] initial SOL_SOCKET support Florian Westphal
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 1/9] mptcp: add skeleton to sync msk socket options to subflows Florian Westphal
2021-03-19 11:33   ` [MPTCP] " Paolo Abeni
2021-03-19 12:34     ` Florian Westphal
2021-03-19 14:36       ` Paolo Abeni [this message]
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 2/9] mptcp: setsockopt: handle SO_KEEPALIVE and SO_PRIORITY Florian Westphal
2021-03-19 11:43   ` [MPTCP] " Paolo Abeni
2021-03-19 12:35     ` Florian Westphal
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 3/9] mptcp: setsockopt: handle receive/send buffer and device bind Florian Westphal
2021-03-19 11:44   ` [MPTCP] " Paolo Abeni
2021-03-19 12:37     ` Florian Westphal
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 8/9] mptcp: sockopt: add TCP_CONGESTION Florian Westphal
2021-03-19 11:54   ` [MPTCP] " Paolo Abeni
2021-03-19 12:19   ` Paolo Abeni
2021-03-17 16:38 ` [MPTCP] [PATCH mptcp-next 9/9] mptcp: sockopt: handle TCP_INFO Florian Westphal
2021-03-19 12:00   ` [MPTCP] " 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=288657858ef194d8ee469bf64fd38d4f5952a989.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=fw@strlen.de \
    --cc=mptcp@lists.01.org \
    /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