From: Geliang Tang <geliang.tang@suse.com>
To: Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next v6 06/13] mptcp: multi subflows push_pending
Date: Wed, 12 Oct 2022 18:36:51 +0800 [thread overview]
Message-ID: <20221012103651.GA15335@bogon> (raw)
In-Reply-To: <d2926dc5-f72d-f104-d982-78215924d96e@linux.intel.com>
On Tue, Oct 11, 2022 at 03:30:43PM -0700, Mat Martineau wrote:
> On Tue, 11 Oct 2022, Geliang Tang wrote:
>
> > This patch adds the multiple subflows support for __mptcp_push_pending().
> > Use mptcp_sched_get_send() wrapper instead of mptcp_subflow_get_send() in
> > it.
> >
> > Check the subflow scheduled flags to test which subflow or subflows are
> > picked by the scheduler, use them to send data.
> >
> > Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> > ---
> > net/mptcp/protocol.c | 32 ++++++++++++++++++++------------
> > 1 file changed, 20 insertions(+), 12 deletions(-)
> >
> > diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> > index 817e539d1d12..86ac38d10bc4 100644
> > --- a/net/mptcp/protocol.c
> > +++ b/net/mptcp/protocol.c
> > @@ -1561,22 +1561,30 @@ static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
> > void __mptcp_push_pending(struct sock *sk, unsigned int flags)
> > {
> > struct mptcp_sock *msk = mptcp_sk(sk);
> > - struct mptcp_sendmsg_info info = {
> > - .flags = flags,
> > - };
> > - struct sock *ssk;
> > int ret = 0;
> >
> > again:
> > - while (mptcp_send_head(sk) && (ssk = mptcp_subflow_get_send(msk))) {
> > - lock_sock(ssk);
> > - ret = __subflow_push_pending(sk, ssk, &info);
> > - release_sock(ssk);
> > + while (mptcp_send_head(sk) && !mptcp_sched_get_send(msk)) {
> > + struct mptcp_subflow_context *subflow;
> > + struct mptcp_sendmsg_info info = {
> > + .flags = flags,
> > + };
> >
> > - if (ret <= 0) {
> > - if (ret == -EAGAIN)
> > - goto again;
> > - goto out;
> > + mptcp_for_each_subflow(msk, subflow) {
> > + if (READ_ONCE(subflow->scheduled)) {
> > + struct sock *ssk = mptcp_subflow_tcp_sock(subflow);
> > +
> > + lock_sock(ssk);
> > + ret = __subflow_push_pending(sk, ssk, &info);
> > + release_sock(ssk);
>
> Geliang -
>
> It seems like this doesn't allow for redundant transmits, since
> __subflow_push_pending() updates msk->first_pending. Did you find that
> redundant sends were working correctly (maybe I've misunderstood)?
Hi Mat,
Redundant sends are not support in this series yet. It will be added in
this __subflow_push_pending() function in the next series with the
selftests patches.
There are still some issues that haven't been solved in the redundant
support patches. I'm still working on them.
Thanks,
-Geliang
>
> - Mat
>
> > +
> > + if (ret <= 0) {
> > + if (ret == -EAGAIN)
> > + goto again;
> > + goto out;
> > + }
> > + mptcp_subflow_set_scheduled(subflow, false);
> > + }
> > }
> > }
> >
> > --
> > 2.35.3
> >
> >
> >
>
> --
> Mat Martineau
> Intel
next prev parent reply other threads:[~2022-10-12 10:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-11 12:01 [PATCH mptcp-next v6 00/13] refactor push pending Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 01/13] Squash to "mptcp: add get_subflow wrappers" Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 02/13] mptcp: change 'first' as a parameter Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 03/13] mptcp: refactor push_pending logic Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 04/13] mptcp: drop last_snd of struct mptcp_sock Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 05/13] mptcp: simplify push_pending Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 06/13] mptcp: multi subflows push_pending Geliang Tang
2022-10-11 22:30 ` Mat Martineau
2022-10-12 10:36 ` Geliang Tang [this message]
2022-10-18 12:02 ` Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 07/13] mptcp: don't delegate sending repeatedly Geliang Tang
2022-10-11 22:18 ` Mat Martineau
2022-10-11 12:01 ` [PATCH mptcp-next v6 08/13] mptcp: use msk instead of mptcp_sk Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 09/13] mptcp: refactor subflow_push_pending logic Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 10/13] mptcp: simplify subflow_push_pending Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 11/13] mptcp: multi subflows subflow_push_pending Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 12/13] mptcp: multi subflows retrans support Geliang Tang
2022-10-11 12:01 ` [PATCH mptcp-next v6 13/13] Squash to "selftests/bpf: Add bpf_rr scheduler" Geliang Tang
2022-10-11 13:36 ` Squash to "selftests/bpf: Add bpf_rr scheduler": Tests Results MPTCP CI
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=20221012103651.GA15335@bogon \
--to=geliang.tang@suse.com \
--cc=mathew.j.martineau@linux.intel.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