All of lore.kernel.org
 help / color / mirror / Atom feed
* [MPTCP] [PATCH net-next] mptcp: don't skip needed ack
@ 2020-10-05 10:36 ` Paolo Abeni
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-10-05 10:36 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 1249 bytes --]

Currently we skip calling tcp_cleanup_rbuf() when packets
are moved into the OoO queue or simply dropped. In both
cases we still increment tp->copied_seq, and we should
ask the TCP stack to check for ack.

Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
---
 net/mptcp/protocol.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 34c037731f35..f483eab0081a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -454,10 +454,12 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
 	unsigned int moved = 0;
 	bool more_data_avail;
 	struct tcp_sock *tp;
+	u32 old_copied_seq;
 	bool done = false;
 
 	pr_debug("msk=%p ssk=%p", msk, ssk);
 	tp = tcp_sk(ssk);
+	old_copied_seq = tp->copied_seq;
 	do {
 		u32 map_remaining, offset;
 		u32 seq = tp->copied_seq;
@@ -516,8 +518,8 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
 	} while (more_data_avail);
 
 	*bytes += moved;
-	if (moved)
-		tcp_cleanup_rbuf(ssk, moved);
+	if (tp->copied_seq != old_copied_seq)
+		tcp_cleanup_rbuf(ssk, 1);
 
 	return done;
 }
-- 
2.26.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH net-next] mptcp: don't skip needed ack
@ 2020-10-05 10:36 ` Paolo Abeni
  0 siblings, 0 replies; 6+ messages in thread
From: Paolo Abeni @ 2020-10-05 10:36 UTC (permalink / raw)
  To: netdev; +Cc: David S. Miller, mptcp

Currently we skip calling tcp_cleanup_rbuf() when packets
are moved into the OoO queue or simply dropped. In both
cases we still increment tp->copied_seq, and we should
ask the TCP stack to check for ack.

Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
 net/mptcp/protocol.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/net/mptcp/protocol.c b/net/mptcp/protocol.c
index 34c037731f35..f483eab0081a 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -454,10 +454,12 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
 	unsigned int moved = 0;
 	bool more_data_avail;
 	struct tcp_sock *tp;
+	u32 old_copied_seq;
 	bool done = false;
 
 	pr_debug("msk=%p ssk=%p", msk, ssk);
 	tp = tcp_sk(ssk);
+	old_copied_seq = tp->copied_seq;
 	do {
 		u32 map_remaining, offset;
 		u32 seq = tp->copied_seq;
@@ -516,8 +518,8 @@ static bool __mptcp_move_skbs_from_subflow(struct mptcp_sock *msk,
 	} while (more_data_avail);
 
 	*bytes += moved;
-	if (moved)
-		tcp_cleanup_rbuf(ssk, moved);
+	if (tp->copied_seq != old_copied_seq)
+		tcp_cleanup_rbuf(ssk, 1);
 
 	return done;
 }
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [MPTCP] Re: [PATCH net-next] mptcp: don't skip needed ack
  2020-10-05 10:36 ` Paolo Abeni
@ 2020-10-05 21:59 ` Mat Martineau
  -1 siblings, 0 replies; 6+ messages in thread
From: Mat Martineau @ 2020-10-05 21:59 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 570 bytes --]

On Mon, 5 Oct 2020, Paolo Abeni wrote:

> Currently we skip calling tcp_cleanup_rbuf() when packets
> are moved into the OoO queue or simply dropped. In both
> cases we still increment tp->copied_seq, and we should
> ask the TCP stack to check for ack.
>
> Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>
> ---
> net/mptcp/protocol.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Mat Martineau <mathew.j.martineau(a)linux.intel.com>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [MPTCP] [PATCH net-next] mptcp: don't skip needed ack
@ 2020-10-05 21:59 ` Mat Martineau
  0 siblings, 0 replies; 6+ messages in thread
From: Mat Martineau @ 2020-10-05 21:59 UTC (permalink / raw)
  To: Paolo Abeni; +Cc: netdev, David S. Miller, mptcp

On Mon, 5 Oct 2020, Paolo Abeni wrote:

> Currently we skip calling tcp_cleanup_rbuf() when packets
> are moved into the OoO queue or simply dropped. In both
> cases we still increment tp->copied_seq, and we should
> ask the TCP stack to check for ack.
>
> Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
> ---
> net/mptcp/protocol.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

--
Mat Martineau
Intel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [MPTCP] Re: [PATCH net-next] mptcp: don't skip needed ack
  2020-10-05 10:36 ` Paolo Abeni
@ 2020-10-06 13:08 ` David Miller
  -1 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-10-06 13:08 UTC (permalink / raw)
  To: mptcp

[-- Attachment #1: Type: text/plain, Size: 433 bytes --]

From: Paolo Abeni <pabeni(a)redhat.com>
Date: Mon,  5 Oct 2020 12:36:44 +0200

> Currently we skip calling tcp_cleanup_rbuf() when packets
> are moved into the OoO queue or simply dropped. In both
> cases we still increment tp->copied_seq, and we should
> ask the TCP stack to check for ack.
> 
> Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
> Signed-off-by: Paolo Abeni <pabeni(a)redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH net-next] mptcp: don't skip needed ack
@ 2020-10-06 13:08 ` David Miller
  0 siblings, 0 replies; 6+ messages in thread
From: David Miller @ 2020-10-06 13:08 UTC (permalink / raw)
  To: pabeni; +Cc: netdev, mptcp

From: Paolo Abeni <pabeni@redhat.com>
Date: Mon,  5 Oct 2020 12:36:44 +0200

> Currently we skip calling tcp_cleanup_rbuf() when packets
> are moved into the OoO queue or simply dropped. In both
> cases we still increment tp->copied_seq, and we should
> ask the TCP stack to check for ack.
> 
> Fixes: c76c6956566f ("mptcp: call tcp_cleanup_rbuf on subflows")
> Signed-off-by: Paolo Abeni <pabeni@redhat.com>

Applied.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-10-06 13:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-05 10:36 [MPTCP] [PATCH net-next] mptcp: don't skip needed ack Paolo Abeni
2020-10-05 10:36 ` Paolo Abeni
2020-10-05 21:59 [MPTCP] " Mat Martineau
2020-10-05 21:59 ` [MPTCP] " Mat Martineau
2020-10-06 13:08 [MPTCP] " David Miller
2020-10-06 13:08 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.