mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
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>
This commit is contained in:
committed by
David S. Miller
parent
16cad98186
commit
5aa4b32fc8
@@ -1386,6 +1386,14 @@ static inline void tcp_highest_sack_combine(struct sock *sk,
|
||||
tcp_sk(sk)->highest_sack = new;
|
||||
}
|
||||
|
||||
/* Determines whether this is a thin stream (which may suffer from
|
||||
* increased latency). Used to trigger latency-reducing mechanisms.
|
||||
*/
|
||||
static inline unsigned int tcp_stream_is_thin(struct tcp_sock *tp)
|
||||
{
|
||||
return tp->packets_out < 4 && !tcp_in_initial_slowstart(tp);
|
||||
}
|
||||
|
||||
/* /proc */
|
||||
enum tcp_seq_states {
|
||||
TCP_SEQ_STATE_LISTENING,
|
||||
|
||||
Reference in New Issue
Block a user