netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] net/ipv4: fix the conditions of entering TCP_CA_Disorder state
  2013-08-06  0:45 [PATCH] net/ipv4: fix the conditions of entering TCP_CA_Disorder state Dong Fang
@ 2013-08-05 18:16 ` Eric Dumazet
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Dumazet @ 2013-08-05 18:16 UTC (permalink / raw)
  To: Dong Fang; +Cc: davem, kuznet, jmorris, yoshfuji, kaber, netdev, linux-kernel

On Mon, 2013-08-05 at 20:45 -0400, Dong Fang wrote:
> if have some packets loss by network, the kernel can't reach here, we can see
> the tcp_time_to_recover() function:
> 
> static bool tcp_time_to_recover(struct sock *sk, int flag)
> {
> 	struct tcp_sock *tp = tcp_sk(sk);
> 	__u32 packets_out;
> 
> 	/* Trick#1: The loss is proven. */
> 	if (tp->lost_out)
> 		return true;
> 	//...
> }
> 
> when it return true, the following condition will be failed:
> 
> //...
> if (!tcp_time_to_recover(sk, flag)) {
> 	tcp_try_to_open(sk, flag, prior_unsacked);
> 	return;
> }
> //...
> 

I honestly do not understand this changelog, and how it is related to
the patch.

Also its not 'net/ipv4:' issue but 'tcp:' one


Could you please explain the issue again ?

Thanks !

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

* [PATCH] net/ipv4: fix the conditions of entering TCP_CA_Disorder state
@ 2013-08-06  0:45 Dong Fang
  2013-08-05 18:16 ` Eric Dumazet
  0 siblings, 1 reply; 2+ messages in thread
From: Dong Fang @ 2013-08-06  0:45 UTC (permalink / raw)
  To: davem, kuznet, jmorris, yoshfuji, kaber; +Cc: netdev, linux-kernel, Dong Fang

if have some packets loss by network, the kernel can't reach here, we can see
the tcp_time_to_recover() function:

static bool tcp_time_to_recover(struct sock *sk, int flag)
{
	struct tcp_sock *tp = tcp_sk(sk);
	__u32 packets_out;

	/* Trick#1: The loss is proven. */
	if (tp->lost_out)
		return true;
	//...
}

when it return true, the following condition will be failed:

//...
if (!tcp_time_to_recover(sk, flag)) {
	tcp_try_to_open(sk, flag, prior_unsacked);
	return;
}
//...


Signed-off-by: Dong Fang <yp.fangdong@gmail.com>
---
 net/ipv4/tcp_input.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 28af45a..8ab31c1 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -2449,7 +2449,7 @@ static void tcp_try_keep_open(struct sock *sk)
 	struct tcp_sock *tp = tcp_sk(sk);
 	int state = TCP_CA_Open;
 
-	if (tcp_left_out(tp) || tcp_any_retrans_done(sk))
+	if (tp->sacked_out || tcp_any_retrans_done(sk))
 		state = TCP_CA_Disorder;
 
 	if (inet_csk(sk)->icsk_ca_state != state) {
-- 
1.7.1

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

end of thread, other threads:[~2013-08-06  0:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-06  0:45 [PATCH] net/ipv4: fix the conditions of entering TCP_CA_Disorder state Dong Fang
2013-08-05 18:16 ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).