[PATCH mptcp-next] Squash to "mptcp: delay updating already_sent"

Geliang Tang posted 1 patch 1 year, 5 months ago
Failed in applying to current master (apply log)
net/mptcp/protocol.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
[PATCH mptcp-next] Squash to "mptcp: delay updating already_sent"
Posted by Geliang Tang 1 year, 5 months ago
No need to update info->limit, drop it.

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

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 958c7fd6da2b..a21bf43472f6 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -1244,8 +1244,8 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
 	pr_debug("msk=%p ssk=%p sending dfrag at seq=%llu len=%u already sent=%u",
 		 msk, ssk, dfrag->data_seq, dfrag->data_len, info->sent);
 
-	if (info->sent > info->limit ||
-	    info->limit > dfrag->data_len)
+	if (WARN_ON_ONCE(info->sent > info->limit ||
+			 info->limit > dfrag->data_len))
 		return 0;
 
 	if (unlikely(!__tcp_can_send(ssk)))
@@ -1573,7 +1573,6 @@ static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
 			}
 
 			info->sent += ret;
-			info->limit -= ret;
 			copied += ret;
 			len -= ret;
 
-- 
2.35.3
Re: [PATCH mptcp-next] Squash to "mptcp: delay updating already_sent"
Posted by Mat Martineau 1 year, 5 months ago
On Sat, 22 Oct 2022, Geliang Tang wrote:

> No need to update info->limit, drop it.
>
> Signed-off-by: Geliang Tang <geliang.tang@suse.com>

Hi Geliang -

Please include this in the next revision of the "BPF redundant scheduler" 
series.

Thanks,
Mat

> ---
> net/mptcp/protocol.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
> index 958c7fd6da2b..a21bf43472f6 100644
> --- a/net/mptcp/protocol.c
> +++ b/net/mptcp/protocol.c
> @@ -1244,8 +1244,8 @@ static int mptcp_sendmsg_frag(struct sock *sk, struct sock *ssk,
> 	pr_debug("msk=%p ssk=%p sending dfrag at seq=%llu len=%u already sent=%u",
> 		 msk, ssk, dfrag->data_seq, dfrag->data_len, info->sent);
>
> -	if (info->sent > info->limit ||
> -	    info->limit > dfrag->data_len)
> +	if (WARN_ON_ONCE(info->sent > info->limit ||
> +			 info->limit > dfrag->data_len))
> 		return 0;
>
> 	if (unlikely(!__tcp_can_send(ssk)))
> @@ -1573,7 +1573,6 @@ static int __subflow_push_pending(struct sock *sk, struct sock *ssk,
> 			}
>
> 			info->sent += ret;
> -			info->limit -= ret;
> 			copied += ret;
> 			len -= ret;
>
> -- 
> 2.35.3
>
>
>

--
Mat Martineau
Intel