[PATCH mptcp-next] Squash to "mptcp: refactor push_pending logic" v19

Geliang Tang posted 1 patch 3 weeks, 5 days ago
Failed in applying to current master (apply log)
net/mptcp/protocol.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
[PATCH mptcp-next] Squash to "mptcp: refactor push_pending logic" v19
Posted by Geliang Tang 3 weeks, 5 days ago
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 <geliang.tang@suse.com>
---
 net/mptcp/protocol.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index a60961d0676d..2e60165c0eb2 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -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;
 	}
 
-- 
2.35.3
Re: [PATCH mptcp-next] Squash to "mptcp: refactor push_pending logic" v19
Posted by Mat Martineau 3 weeks, 1 day ago
On Sat, 12 Nov 2022, Geliang Tang wrote:

> 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 <geliang.tang@suse.com>

Looks good to squash, thanks.

- Mat

> ---
> net/mptcp/protocol.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index a60961d0676d..2e60165c0eb2 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -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;
> 	}
>
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel