Squash to "mptcp: refactor push_pending logic" v19
Subsystems (2)
PATCH 1/1 Squash to "mptcp: refactor push_pending logic" v19
In the "msk->snd_burst <= 0" block, copied will never be 0, so err will never be EAGAIN, drop it.
The orignal code only checks EAGAIN in __mptcp_push_pending, so drop this check in __mptcp_subflow_push_pending.
Signed-off-by Geliang Tang <[email protected]>
--- net/mptcp/protocol.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
net/mptcp/protocol.c +2 -5
@@ -1548,7 +1548,7 @@ 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 = copied ? : -EAGAIN ; + err = copied; goto out; }mptcp_set_timeout (sk);
@@ -1638,11 +1638,8 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool ret =__subflow_push_pending (sk, ssk, &info); first = false; -if (ret <=0 ) { -if (ret == -EAGAIN ) -continue ; +if (ret <=0 )break ; - } copied += ret; }
Signature · 1 line
2.35.3
Quoted 7 lines · Geliang Tang
In the "
msk->snd_burst<= 0" block, copied will never be 0, so err will never be EAGAIN, drop it.The orignal code only checks EAGAIN in
__mptcp_push_pending, so drop this check in__mptcp_subflow_push_pending.Signed-off-by Geliang Tang <[email protected]>
Looks good to squash, thanks.
- Mat
Quoted 35 lines
---
net/mptcp/protocol.c| 7 ++-----1 file changed, 2 insertions(+), 5 deletions(-)net/mptcp/protocol.c +2
-5@@ -1548,7 +1548,7 @@ 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 = copied ? : -EAGAIN ; + err = copied; goto out; }mptcp_set_timeout (sk);@@ -1638,11 +1638,8 @@ static void __mptcp_subflow_push_pending(struct sock *sk, struct sock *ssk, bool ret =__subflow_push_pending (sk, ssk, &info); first = false; -if (ret <=0 ) { -if (ret == -EAGAIN ) -continue ; +if (ret <=0 )break ; - } copied += ret; }Signature · 1 line
2.35.3
--
Mat Martineau
Intel