diff options
author | Andreas Petlund <apetlund@simula.no> | 2010-02-17 21:45:45 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-02-18 18:43:07 -0500 |
commit | 5aa4b32fc86408705337e941ed716880c63d1590 (patch) | |
tree | 7385d30e16f2c7203a74a3723728b7e8c6ecfa7b /include/net/tcp.h | |
parent | 16cad981863344ef779ab703545bb6f261a0f0ce (diff) |
net: TCP thin-stream detection
Inline function to dynamically detect thin streams based on
the number of packets in flight. Used to dynamically trigger
thin-stream mechanisms if enabled by ioctl or sysctl.
Signed-off-by: Andreas Petlund <apetlund@simula.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/tcp.h')
-rw-r--r-- | include/net/tcp.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/net/tcp.h b/include/net/tcp.h index 75a00c80bdda..0bdc3f640247 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h | |||
@@ -1386,6 +1386,14 @@ static inline void tcp_highest_sack_combine(struct sock *sk, | |||
1386 | tcp_sk(sk)->highest_sack = new; | 1386 | tcp_sk(sk)->highest_sack = new; |
1387 | } | 1387 | } |
1388 | 1388 | ||
1389 | /* Determines whether this is a thin stream (which may suffer from | ||
1390 | * increased latency). Used to trigger latency-reducing mechanisms. | ||
1391 | */ | ||
1392 | static inline unsigned int tcp_stream_is_thin(struct tcp_sock *tp) | ||
1393 | { | ||
1394 | return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp); | ||
1395 | } | ||
1396 | |||
1389 | /* /proc */ | 1397 | /* /proc */ |
1390 | enum tcp_seq_states { | 1398 | enum tcp_seq_states { |
1391 | TCP_SEQ_STATE_LISTENING, | 1399 | TCP_SEQ_STATE_LISTENING, |