MPTCP Linux Development
 help / color / mirror / Atom feed
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 v6 07/13] mptcp: don't delegate sending repeatedly
Date: Tue, 11 Oct 2022 15:18:44 -0700 (PDT)	[thread overview]
Message-ID: <f9a2c67a-89f5-6d09-1749-bf7839b91789@linux.intel.com> (raw)
In-Reply-To: <20221011120137.5475-8-geliang.tang@suse.com>

On Tue, 11 Oct 2022, Geliang Tang wrote:

> Do not delegate sending to a subflow repeatedly. Only do it to the subflow
> without delegated action.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/protocol.c | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 86ac38d10bc4..6f55b51e10eb 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1600,6 +1600,7 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk,
> 					 bool first)
> {
> 	struct mptcp_sock *msk = mptcp_sk(sk);
> +	struct mptcp_subflow_context *subflow;
> 	struct mptcp_sendmsg_info info = {
> 		.data_lock_held = true,
> 	};
> @@ -1622,7 +1623,10 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk,
> 			if (!xmit_ssk)
> 				goto out;
> 			if (xmit_ssk != ssk) {
> -				mptcp_subflow_delegate(mptcp_subflow_ctx(xmit_ssk),
> +				subflow = mptcp_subflow_ctx(xmit_ssk);
> +				if (mptcp_subflow_has_delegated_action(subflow))
> +					goto out;
> +				mptcp_subflow_delegate(subflow,
> 						       MPTCP_DELEGATE_SEND);

Hi Geliang -

Did this patch fix a problem you were seeing? It seems like it isn't 
needed, and might introduce a bug.

mptcp_subflow_delegate() does a test_and_set_bit() to see if the specific 
action is already scheduled. This new code will skip the delegated send if 
*any* delegated action is set on the subflow.

> 				goto out;
> 			}
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel

  reply	other threads:[~2022-10-11 22:18 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
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 [this message]
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=f9a2c67a-89f5-6d09-1749-bf7839b91789@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