[PATCH mptcp-next 1/2] Squash to "mptcp: use get_send wrapper, v22"

Geliang Tang posted 2 patches 3 years, 2 months ago
There is a newer version of this series
[PATCH mptcp-next 1/2] Squash to "mptcp: use get_send wrapper, v22"
Posted by Geliang Tang 3 years, 2 months ago
Cleanup.

Signed-off-by: Geliang Tang <geliang.tang@suse.com>
---
 net/mptcp/protocol.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 712b183fd80e..ea2e48a74772 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1565,7 +1565,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
 		int ret = 0;
 
 		if (mptcp_sched_get_send(msk))
-			break;
+			goto out;
 
 		push_count = 0;
 
@@ -1605,6 +1605,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
 		}
 	}
 
+out:
 	/* at this point we held the socket lock for the last subflow we used */
 	if (ssk)
 		mptcp_push_release(ssk, &info);
-- 
2.35.3
Re: [PATCH mptcp-next 1/2] Squash to "mptcp: use get_send wrapper, v22"
Posted by Mat Martineau 3 years, 2 months ago
On Mon, 5 Dec 2022, Geliang Tang wrote:

> Cleanup.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>
> ---
> net/mptcp/protocol.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 712b183fd80e..ea2e48a74772 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1565,7 +1565,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
> 		int ret = 0;
>
> 		if (mptcp_sched_get_send(msk))
> -			break;
> +			goto out;

I prefer the original code here. It looks like you were making this code 
look more similar to __mptcp_subflow_push_pending(), but I'm not sure that 
the changes to __mptcp_push_pending() in patch 2 are needed. (See my reply 
to patch 2 for more details)

>
> 		push_count = 0;
>
> @@ -1605,6 +1605,7 @@ void __mptcp_push_pending(struct sock *sk, unsigned int flags)
> 		}
> 	}
>
> +out:
> 	/* at this point we held the socket lock for the last subflow we used */
> 	if (ssk)
> 		mptcp_push_release(ssk, &info);
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel