Lines Matching +full:1 +full:w

63 	struct westwood *w = inet_csk_ca(sk);  in tcp_westwood_init()  local
65 w->bk = 0; in tcp_westwood_init()
66 w->bw_ns_est = 0; in tcp_westwood_init()
67 w->bw_est = 0; in tcp_westwood_init()
68 w->accounted = 0; in tcp_westwood_init()
69 w->cumul_ack = 0; in tcp_westwood_init()
70 w->reset_rtt_min = 1; in tcp_westwood_init()
71 w->rtt_min = w->rtt = TCP_WESTWOOD_INIT_RTT; in tcp_westwood_init()
72 w->rtt_win_sx = tcp_jiffies32; in tcp_westwood_init()
73 w->snd_una = tcp_sk(sk)->snd_una; in tcp_westwood_init()
74 w->first_ack = 1; in tcp_westwood_init()
86 static void westwood_filter(struct westwood *w, u32 delta) in westwood_filter() argument
89 if (w->bw_ns_est == 0 && w->bw_est == 0) { in westwood_filter()
90 w->bw_ns_est = w->bk / delta; in westwood_filter()
91 w->bw_est = w->bw_ns_est; in westwood_filter()
93 w->bw_ns_est = westwood_do_filter(w->bw_ns_est, w->bk / delta); in westwood_filter()
94 w->bw_est = westwood_do_filter(w->bw_est, w->bw_ns_est); in westwood_filter()
106 struct westwood *w = inet_csk_ca(sk); in tcp_westwood_pkts_acked() local
109 w->rtt = usecs_to_jiffies(sample->rtt_us); in tcp_westwood_pkts_acked()
119 struct westwood *w = inet_csk_ca(sk); in westwood_update_window() local
120 s32 delta = tcp_jiffies32 - w->rtt_win_sx; in westwood_update_window()
122 /* Initialize w->snd_una with the first acked sequence number in order in westwood_update_window()
123 * to fix mismatch between tp->snd_una and w->snd_una for the first in westwood_update_window()
126 if (w->first_ack) { in westwood_update_window()
127 w->snd_una = tcp_sk(sk)->snd_una; in westwood_update_window()
128 w->first_ack = 0; in westwood_update_window()
140 if (w->rtt && delta > max_t(u32, w->rtt, TCP_WESTWOOD_RTT_MIN)) { in westwood_update_window()
141 westwood_filter(w, delta); in westwood_update_window()
143 w->bk = 0; in westwood_update_window()
144 w->rtt_win_sx = tcp_jiffies32; in westwood_update_window()
148 static inline void update_rtt_min(struct westwood *w) in update_rtt_min() argument
150 if (w->reset_rtt_min) { in update_rtt_min()
151 w->rtt_min = w->rtt; in update_rtt_min()
152 w->reset_rtt_min = 0; in update_rtt_min()
154 w->rtt_min = min(w->rtt, w->rtt_min); in update_rtt_min()
166 struct westwood *w = inet_csk_ca(sk); in westwood_fast_bw() local
170 w->bk += tp->snd_una - w->snd_una; in westwood_fast_bw()
171 w->snd_una = tp->snd_una; in westwood_fast_bw()
172 update_rtt_min(w); in westwood_fast_bw()
183 struct westwood *w = inet_csk_ca(sk); in westwood_acked_count() local
185 w->cumul_ack = tp->snd_una - w->snd_una; in westwood_acked_count()
190 if (!w->cumul_ack) { in westwood_acked_count()
191 w->accounted += tp->mss_cache; in westwood_acked_count()
192 w->cumul_ack = tp->mss_cache; in westwood_acked_count()
195 if (w->cumul_ack > tp->mss_cache) { in westwood_acked_count()
197 if (w->accounted >= w->cumul_ack) { in westwood_acked_count()
198 w->accounted -= w->cumul_ack; in westwood_acked_count()
199 w->cumul_ack = tp->mss_cache; in westwood_acked_count()
201 w->cumul_ack -= w->accounted; in westwood_acked_count()
202 w->accounted = 0; in westwood_acked_count()
206 w->snd_una = tp->snd_una; in westwood_acked_count()
208 return w->cumul_ack; in westwood_acked_count()
220 const struct westwood *w = inet_csk_ca(sk); in tcp_westwood_bw_rttmin() local
222 return max_t(u32, (w->bw_est * w->rtt_min) / tp->mss_cache, 2); in tcp_westwood_bw_rttmin()
228 struct westwood *w = inet_csk_ca(sk); in tcp_westwood_ack() local
231 w->bk += westwood_acked_count(sk); in tcp_westwood_ack()
233 update_rtt_min(w); in tcp_westwood_ack()
243 struct westwood *w = inet_csk_ca(sk); in tcp_westwood_event() local
253 w->reset_rtt_min = 1; in tcp_westwood_event()
267 if (ext & (1 << (INET_DIAG_VEGASINFO - 1))) { in tcp_westwood_info()
268 info->vegas.tcpv_enabled = 1; in tcp_westwood_info()