projects
/
deliverable
/
linux.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tcp: add tcp_in_slow_start helper
[deliverable/linux.git]
/
include
/
net
/
tcp.h
diff --git
a/include/net/tcp.h
b/include/net/tcp.h
index 950cfecaad3c0d01c646c4fd111eca8d0cf8aef3..dba22fc1b065a70b9604872b1460c7b2ea24db1d 100644
(file)
--- a/
include/net/tcp.h
+++ b/
include/net/tcp.h
@@
-989,6
+989,11
@@
static inline unsigned int tcp_packets_in_flight(const struct tcp_sock *tp)
#define TCP_INFINITE_SSTHRESH 0x7fffffff
#define TCP_INFINITE_SSTHRESH 0x7fffffff
+static inline bool tcp_in_slow_start(const struct tcp_sock *tp)
+{
+ return tp->snd_cwnd <= tp->snd_ssthresh;
+}
+
static inline bool tcp_in_initial_slowstart(const struct tcp_sock *tp)
{
return tp->snd_ssthresh >= TCP_INFINITE_SSTHRESH;
static inline bool tcp_in_initial_slowstart(const struct tcp_sock *tp)
{
return tp->snd_ssthresh >= TCP_INFINITE_SSTHRESH;
@@
-1065,7
+1070,7
@@
static inline bool tcp_is_cwnd_limited(const struct sock *sk)
const struct tcp_sock *tp = tcp_sk(sk);
/* If in slow start, ensure cwnd grows to twice what was ACKed. */
const struct tcp_sock *tp = tcp_sk(sk);
/* If in slow start, ensure cwnd grows to twice what was ACKed. */
- if (t
p->snd_cwnd <= tp->snd_ssthresh
)
+ if (t
cp_in_slow_start(tp)
)
return tp->snd_cwnd < 2 * tp->max_packets_out;
return tp->is_cwnd_limited;
return tp->snd_cwnd < 2 * tp->max_packets_out;
return tp->is_cwnd_limited;
This page took
0.026629 seconds
and
5
git commands to generate.