[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <0939B589FC103041945B9F13274963E303BA96BB@CORPUSMX90A.corp.emc.com>
Date: Thu, 27 Aug 2009 21:55:35 -0400
From: <Li_Xin2@....com>
To: <eric.dumazet@...il.com>, <andi@...stfloor.org>
Cc: <linux-kernel@...r.kernel.org>, <netdev@...r.kernel.org>
Subject: RE: TCP keepalive timer problem
> Yep, so to recap we have two changes :
> 1) The one I sent (taking into account the time of last ACK we
received) to compute the
> timer delays.
> 2) The one you suggest, avoiding to send a probe if we have packets in
flight, relying
> on normal retransmits timers.
I agree with these two changes, but I think the patch for point 2 given
by Eric is not correct:
elapsed = keepalive_time_when(tp);
if (tp->packets_out || tcp_send_head(sk))
if (tcp_retries2_time < keepalive_time_when(tp))
goto resched;
elapsed = tcp_time_stamp - tp->rcv_tstamp;
The problem is: you should not always compare tcp_retries2_time with
keepalive_time_when. If the first keepalive probe is already sent, you
should compare with keepalive_intvl_when
( or keepalive_intvl_when * (
tp->keepalive_probes?:sysctl_tcp_keepalive_probes -
icsk->icsk_probes_out ) if keepalive probe is already sent, and the
elapsed time also needs to take that into account.
elapsed =
icsk->icsk_probes_out?keepalive_intvl_when(tp):keepalive_time_when(tp);
if (tp->packets_out || tcp_send_head(sk))
if (tcp_retries2_time < (icsk->icsk_probes_out?
keepalive_intvl_when(tp) : keepalive_time_when(tp))
goto resched;
elapsed = tcp_time_stamp - tp->rcv_tstamp;
How do you think?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists