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 v4 1/2] mptcp: update mptcp_push_release
Date: Wed, 14 Dec 2022 16:53:09 -0800 (PST) [thread overview]
Message-ID: <87d7b85c-7f47-2df6-6cb6-aad1ded009c3@linux.intel.com> (raw)
In-Reply-To: <514fef04b316a78141427871827a65046256e93c.1670724098.git.geliang.tang@suse.com>
On Sun, 11 Dec 2022, Geliang Tang wrote:
> This patch moves the NULL pointer check into mptcp_push_release(). Also
> add a new parameter 'push' for it to set whether to invoke tcp_push in
> it.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/protocol.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index b3e5d30adbe1..2342b9469181 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1470,9 +1470,17 @@ struct sock *mptcp_subflow_get_send(struct mptcp_sock *msk)
> return ssk;
> }
>
> -static void mptcp_push_release(struct sock *ssk, struct mptcp_sendmsg_info *info)
> +static void mptcp_push_release(struct sock *ssk,
> + struct mptcp_sendmsg_info *info,
> + bool push)
> {
> - tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle, info->size_goal);
> + if (!ssk)
> + return;
> +
> + if (push) {
> + tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle,
> + info->size_goal);
> + }
> release_sock(ssk);
> }
>
> @@ -1578,8 +1586,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
> /* First check. If the ssk has changed since
> * the last round, release prev_ssk
> */
> - if (prev_ssk)
> - mptcp_push_release(prev_ssk, &info);
> + mptcp_push_release(prev_ssk, &info, do_check_data_fin);
>
> /* Need to lock the new subflow only if different
> * from the previous one, otherwise we are still
> @@ -1605,8 +1612,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
> }
>
> /* at this point we held the socket lock for the last subflow we used */
> - if (ssk)
> - mptcp_push_release(ssk, &info);
> + mptcp_push_release(ssk, &info, do_check_data_fin);
If do_check_data_fin is 'true', that means __subflow_push_pending()
succeeded on some subflow (not necessarily ssk).
Seems like the intent is to only call tcp_push() within
mptcp_push_release() if data was sent using _that_ ssk. So I think that
needs to be tracked differently.
>
> /* ensure the rtx timer is running */
> if (!mptcp_timer_pending(sk))
> --
> 2.35.3
>
>
>
--
Mat Martineau
Intel
next prev parent reply other threads:[~2022-12-15 0:53 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-11 2:03 [PATCH mptcp-next v4 0/2] BPF redundant scheduler, part 3 Geliang Tang
2022-12-11 2:03 ` [PATCH mptcp-next v4 1/2] mptcp: update mptcp_push_release Geliang Tang
2022-12-15 0:53 ` Mat Martineau [this message]
2022-12-11 2:03 ` [PATCH mptcp-next v4 2/2] mptcp: retrans for redundant sends Geliang Tang
2022-12-15 1:47 ` Mat Martineau
2022-12-19 13:17 ` Geliang Tang
2022-12-20 2:31 ` Mat Martineau
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=87d7b85c-7f47-2df6-6cb6-aad1ded009c3@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