projects
/
platform
/
kernel
/
linux-rpi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tcp: add accessors to read/set tp->snd_cwnd
[platform/kernel/linux-rpi.git]
/
net
/
ipv4
/
tcp_htcp.c
diff --git
a/net/ipv4/tcp_htcp.c
b/net/ipv4/tcp_htcp.c
index
55adcfc
..
52b1f26
100644
(file)
--- a/
net/ipv4/tcp_htcp.c
+++ b/
net/ipv4/tcp_htcp.c
@@
-124,7
+124,7
@@
static void measure_achieved_throughput(struct sock *sk,
ca->packetcount += sample->pkts_acked;
ca->packetcount += sample->pkts_acked;
- if (ca->packetcount >= t
p->snd_cwnd
- (ca->alpha >> 7 ? : 1) &&
+ if (ca->packetcount >= t
cp_snd_cwnd(tp)
- (ca->alpha >> 7 ? : 1) &&
now - ca->lasttime >= ca->minRTT &&
ca->minRTT > 0) {
__u32 cur_Bi = ca->packetcount * HZ / (now - ca->lasttime);
now - ca->lasttime >= ca->minRTT &&
ca->minRTT > 0) {
__u32 cur_Bi = ca->packetcount * HZ / (now - ca->lasttime);
@@
-225,7
+225,7
@@
static u32 htcp_recalc_ssthresh(struct sock *sk)
const struct htcp *ca = inet_csk_ca(sk);
htcp_param_update(sk);
const struct htcp *ca = inet_csk_ca(sk);
htcp_param_update(sk);
- return max((t
p->snd_cwnd
* ca->beta) >> 7, 2U);
+ return max((t
cp_snd_cwnd(tp)
* ca->beta) >> 7, 2U);
}
static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
}
static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
@@
-242,9
+242,9
@@
static void htcp_cong_avoid(struct sock *sk, u32 ack, u32 acked)
/* In dangerous area, increase slowly.
* In theory this is tp->snd_cwnd += alpha / tp->snd_cwnd
*/
/* In dangerous area, increase slowly.
* In theory this is tp->snd_cwnd += alpha / tp->snd_cwnd
*/
- if ((tp->snd_cwnd_cnt * ca->alpha)>>7 >= t
p->snd_cwnd
) {
- if (t
p->snd_cwnd
< tp->snd_cwnd_clamp)
- t
p->snd_cwnd++
;
+ if ((tp->snd_cwnd_cnt * ca->alpha)>>7 >= t
cp_snd_cwnd(tp)
) {
+ if (t
cp_snd_cwnd(tp)
< tp->snd_cwnd_clamp)
+ t
cp_snd_cwnd_set(tp, tcp_snd_cwnd(tp) + 1)
;
tp->snd_cwnd_cnt = 0;
htcp_alpha_update(ca);
} else
tp->snd_cwnd_cnt = 0;
htcp_alpha_update(ca);
} else