From: Mat Martineau <mathew.j.martineau@linux.intel.com>
To: Geliang Tang <geliang.tang@suse.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 2/2] Squash to "mptcp: multi subflows subflow_push_pending" v5
Date: Mon, 10 Oct 2022 17:55:05 -0700 (PDT) [thread overview]
Message-ID: <3d897fe0-15e5-2d94-15c0-d9cc3b0f22c8@linux.intel.com> (raw)
In-Reply-To: <20221009083604.14151-2-geliang.tang@suse.com>
On Sun, 9 Oct 2022, Geliang Tang wrote:
> Update the first chunk of data pushing.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/protocol.c | 18 +++++++-----------
> 1 file changed, 7 insertions(+), 11 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index ff2c1bbf4484..acc220bfb34e 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1614,17 +1614,8 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk,
> /* check for a different subflow usage only after
> * spooling the first chunk of data
> */
> - if (first) {
> - ret = __subflow_push_pending(sk, ssk, &info);
> - if (ret <= 0) {
> - if (ret == -EAGAIN)
> - goto again;
> - break;
> - }
> - first = false;
> - msk->last_snd = ssk;
> - continue;
> - }
> + if (first)
> + goto push;
Is the only goal here to reduce duplicate code? It looks like the
functionality is equivalent, but I'd rather not use 'goto' to jump into
the middle of a loop.
The 'Squash to "mptcp: simplify push_pending"' looks fine to include in
v6.
- Mat
>
> if (mptcp_sched_get_send(msk))
> goto out;
> @@ -1643,6 +1634,7 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk,
> continue;
> }
>
> +push:
> ret = __subflow_push_pending(sk, ssk, &info);
> if (ret <= 0) {
> if (ret == -EAGAIN)
> @@ -1650,6 +1642,10 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk,
> goto out;
> }
> msk->last_snd = ssk;
> + if (first) {
> + first = false;
> + goto again;
> + }
> mptcp_subflow_set_scheduled(subflow, false);
> }
> }
> --
> 2.35.3
>
>
>
--
Mat Martineau
Intel
prev parent reply other threads:[~2022-10-11 0:55 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 8:36 [PATCH mptcp-next 1/2] Squash to "mptcp: simplify push_pending" v5 Geliang Tang
2022-10-09 8:36 ` [PATCH mptcp-next 2/2] Squash to "mptcp: multi subflows subflow_push_pending" v5 Geliang Tang
2022-10-11 0:55 ` Mat Martineau [this message]
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=3d897fe0-15e5-2d94-15c0-d9cc3b0f22c8@linux.intel.com \
--to=mathew.j.martineau@linux.intel.com \
--cc=geliang.tang@suse.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