projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
TCP: avoid to send keepalive probes if receiving data
[deliverable/linux.git]
/
net
/
ipv4
/
tcp_timer.c
diff --git
a/net/ipv4/tcp_timer.c
b/net/ipv4/tcp_timer.c
index c732be00606b5178e33d998d1f906e64f2476ea6..440a5c6004f6ac8d1b2d8404d641d0a174b241b4 100644
(file)
--- a/
net/ipv4/tcp_timer.c
+++ b/
net/ipv4/tcp_timer.c
@@
-517,7
+517,7
@@
static void tcp_keepalive_timer (unsigned long data)
struct sock *sk = (struct sock *) data;
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
struct sock *sk = (struct sock *) data;
struct inet_connection_sock *icsk = inet_csk(sk);
struct tcp_sock *tp = tcp_sk(sk);
-
__
u32 elapsed;
+ u32 elapsed;
/* Only process if socket is not in use. */
bh_lock_sock(sk);
/* Only process if socket is not in use. */
bh_lock_sock(sk);
@@
-554,7
+554,7
@@
static void tcp_keepalive_timer (unsigned long data)
if (tp->packets_out || tcp_send_head(sk))
goto resched;
if (tp->packets_out || tcp_send_head(sk))
goto resched;
- elapsed =
tcp_time_stamp - tp->rcv_tstamp
;
+ elapsed =
keepalive_time_elapsed(tp)
;
if (elapsed >= keepalive_time_when(tp)) {
if (icsk->icsk_probes_out >= keepalive_probes(tp)) {
if (elapsed >= keepalive_time_when(tp)) {
if (icsk->icsk_probes_out >= keepalive_probes(tp)) {
This page took
0.026322 seconds
and
5
git commands to generate.