From: Florian Westphal <fw at strlen.de>
To: mptcp at lists.01.org
Subject: [MPTCP] Re: [PATCH RFC 10/11] mptcp: enable JOIN requests even if cookies are in use
Date: Mon, 27 Jul 2020 11:50:25 +0200 [thread overview]
Message-ID: <20200727095025.GK23458@breakpoint.cc> (raw)
In-Reply-To: 79ee0796e2bcf48e4d84c119c1118c436b05c6e9.camel@redhat.com
[-- Attachment #1: Type: text/plain, Size: 1498 bytes --]
Paolo Abeni <pabeni(a)redhat.com> wrote:
> On Mon, 2020-07-27 at 11:02 +0200, Florian Westphal wrote:
> > Paolo Abeni <pabeni(a)redhat.com> wrote:
> > > > +static bool mptcp_join_store(struct mptcp_subflow_request_sock *req, struct sock *sk_listener)
> > > > +{
> > > > + struct mptcp_sock *msk = req->msk;
> > > > + struct inet_connection_sock *icsk;
> > > > + struct sock *sk;
> > > > +
> > > > + icsk = &msk->sk;
> > > > + sk = &icsk->icsk_inet.sk;
> > > > +
> > > > + if (inet_csk_reqsk_queue_len(sk) >= MPTCP_SUBFLOWS_MAX)
> > > > + return false;
> > >
> > > Isn't this test a little too relaxed? e.g. shouldn't we check something
> > > alike:
> > >
> > > if (inet_csk_reqsk_queue_len(sk) + READ_ONCE(pm->subflows) >
> > > READ_ONCE(pm->subflows_max))
> > >
> > > Possibly we can account the pending MP_JOIN subflows in a new PM field,
> > > so we could do the above check and the follow-up increment in a
> > > consistent way with a single atomic opetation (the pm spinlock)
> >
> > Not following here -- inet_csk_reqsk_queue_len() is supposed to return
> > the number of all subflows, both established and half-open.
> >
> > Why would I need to add pm->subflows?
>
> Currently the PM netlink does not accept any additional subflows
> when pm->subflows >= pm->subflows_max.
You mean:
if (inet_csk_reqsk_queue_len(sk) >= MPTCP_SUBFLOWS_MAX ||
pm->subflows >= pm->subflows_max)
return false;
?
(I ommitted R_ONCE for brevity only).
next reply other threads:[~2020-07-27 9:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-27 9:50 Florian Westphal [this message]
-- strict thread matches above, loose matches on Subject: below --
2020-07-27 22:59 [MPTCP] Re: [PATCH RFC 10/11] mptcp: enable JOIN requests even if cookies are in use Florian Westphal
2020-07-27 9:32 Paolo Abeni
2020-07-27 9:02 Florian Westphal
2020-07-15 15:14 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=20200727095025.GK23458@breakpoint.cc \
--to=unknown@example.com \
/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.