All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] mptcp: ensure there is unacked data at all subflow
@ 2021-04-01  7:53 Yonglong Li
  2021-04-01 10:08 ` Paolo Abeni
  0 siblings, 1 reply; 3+ messages in thread
From: Yonglong Li @ 2021-04-01  7:53 UTC (permalink / raw)
  To: mptcp, mptcp; +Cc: mathew.j.martineau, matthieu.baerts, fw, pabeni, Yonglong Li

MPTCP-level retransmit may take place if first subflow without data in
its write queue and second subflow is likely to have unacked data left
in its write queue. In this condition datamaybe double retransmitted.

Signed-off-by: Yonglong Li <liyonglong@chinatelecom.cn>
---
 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 9d7e7e1..66707ab 100644
--- a/net/mptcp/protocol.c
+++ b/net/mptcp/protocol.c
@@ -2072,6 +2072,7 @@ static struct sock *mptcp_subflow_get_retrans(const struct mptcp_sock *msk)
 {
 	struct mptcp_subflow_context *subflow;
 	struct sock *backup = NULL;
+	struct sock *idle = NULL;
 
 	sock_owned_by_me((const struct sock *)msk);
 
@@ -2097,10 +2098,11 @@ static struct sock *mptcp_subflow_get_retrans(const struct mptcp_sock *msk)
 			continue;
 		}
 
-		return ssk;
+		if (!idle)
+			idle = ssk;
 	}
 
-	return backup;
+	return idle ? : backup;
 }
 
 static void mptcp_dispose_initial_subflow(struct mptcp_sock *msk)
-- 
1.8.3.1


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

* Re: [PATCH v3] mptcp: ensure there is unacked data at all subflow
  2021-04-01  7:53 [PATCH v3] mptcp: ensure there is unacked data at all subflow Yonglong Li
@ 2021-04-01 10:08 ` Paolo Abeni
  2021-04-02  2:55   ` Yonglong Li
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Abeni @ 2021-04-01 10:08 UTC (permalink / raw)
  To: Yonglong Li, mptcp, mptcp; +Cc: mathew.j.martineau, matthieu.baerts, fw

Hello,

I'm sorry for the late feeback.

On Thu, 2021-04-01 at 15:53 +0800, Yonglong Li wrote:
> MPTCP-level retransmit may take place if first subflow without data in
> its write queue and second subflow is likely to have unacked data left
> in its write queue. In this condition datamaybe double retransmitted.

Note that the above does not cause problems at the byte stream level,
and can improve the aggregate tput in some cases, as it could allow
faster forward progress when e.g. the substream which originally
handled the relevant data has experienced some congestion.

Do you have any specific scenario which is badly affected by the
current code? How does the self-tests behave on top of this patch?
(specifically: simult_flows.sh)

Side note: we could improve re-injection keeping explicit track at the
 mptcp_data_frag level of the already used subflows, and avoding them
at mptcp_subflow_get_retrans() time.

Thanks!

Paolo


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

* Re: [PATCH v3] mptcp: ensure there is unacked data at all subflow
  2021-04-01 10:08 ` Paolo Abeni
@ 2021-04-02  2:55   ` Yonglong Li
  0 siblings, 0 replies; 3+ messages in thread
From: Yonglong Li @ 2021-04-02  2:55 UTC (permalink / raw)
  To: Paolo Abeni, mptcp, mptcp; +Cc: mathew.j.martineau, matthieu.baerts, fw

Hi Paolo,

Thanks for your feeback.

On 2021/4/1 18:08, Paolo Abeni wrote:
> Hello,
> 
> I'm sorry for the late feeback.
> 
> On Thu, 2021-04-01 at 15:53 +0800, Yonglong Li wrote:
>> MPTCP-level retransmit may take place if first subflow without data in
>> its write queue and second subflow is likely to have unacked data left
>> in its write queue. In this condition datamaybe double retransmitted.
> 
> Note that the above does not cause problems at the byte stream level,
> and can improve the aggregate tput in some cases, as it could allow
> faster forward progress when e.g. the substream which originally
> handled the relevant data has experienced some congestion.
> 
> Do you have any specific scenario which is badly affected by the
> current code? How does the self-tests behave on top of this patch?
> (specifically: simult_flows.sh)

In my test, current code doesn't cause any badly affected. And in some
cases it can improve the tput in theory (re-injection likely). But the
behave of current code is not stable. In some cases it 're-injection'
data, and some cases it does not. And as you said at "Side note" the
're-injection' should not do at mptcp_subflow_get_retrans()

> 
> Side note: we could improve re-injection keeping explicit track at the
>  mptcp_data_frag level of the already used subflows, and avoding them
> at mptcp_subflow_get_retrans() time.
> 
> Thanks!
> 
> Paolo
> 
> 
> 

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

end of thread, other threads:[~2021-04-02  2:55 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-01  7:53 [PATCH v3] mptcp: ensure there is unacked data at all subflow Yonglong Li
2021-04-01 10:08 ` Paolo Abeni
2021-04-02  2:55   ` Yonglong Li

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.