From: Geliang Tang <geliang.tang@suse.com>
To: mptcp@lists.linux.dev
Cc: Geliang Tang <geliang.tang@suse.com>
Subject: [PATCH mptcp-next 1/2] Squash to "mptcp: simplify push_pending" v5
Date: Sun, 9 Oct 2022 16:36:03 +0800 [thread overview]
Message-ID: <20221009083604.14151-1-geliang.tang@suse.com> (raw)
Update return values of __subflow_push_pending.
Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
net/mptcp/protocol.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index f08c0eb0be11..ff2c1bbf4484 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1527,7 +1527,7 @@ static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
ret = mptcp_sendmsg_frag(sk, ssk, dfrag, info);
if (ret <= 0) {
- err = ret;
+ err = copied ? : ret;
goto out;
}
@@ -1542,17 +1542,18 @@ static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
if (msk->snd_burst <= 0 ||
!sk_stream_memory_free(ssk) ||
!mptcp_subflow_active(mptcp_subflow_ctx(ssk))) {
- err = -EAGAIN;
+ err = copied ? : -EAGAIN;
goto out;
}
+
mptcp_set_timeout(sk);
}
+ err = copied;
out:
if (copied) {
tcp_push(ssk, 0, info->mss_now, tcp_sk(ssk)->nonagle,
info->size_goal);
- err = copied;
}
return err;
--
2.35.3
next reply other threads:[~2022-10-09 8:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-09 8:36 Geliang Tang [this message]
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
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=20221009083604.14151-1-geliang.tang@suse.com \
--to=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