MCPcopy Create free account
hub / github.com/F-Stack/f-stack / hd_ack_received

Function hd_ack_received

freebsd/netinet/cc/cc_hd.c:131–161  ·  view source on GitHub ↗

* If the ack type is CC_ACK, and the inferred queueing delay is greater than * the Qmin threshold, cwnd is reduced probabilistically. When backing off due * to delay, HD behaves like NewReno when an ECN signal is received. HD behaves * as NewReno in all other circumstances. */

Source from the content-addressed store, hash-verified

129 * as NewReno in all other circumstances.
130 */
131static void
132hd_ack_received(struct cc_var *ccv, uint16_t ack_type)
133{
134 struct ertt *e_t;
135 int qdly;
136
137 if (ack_type == CC_ACK) {
138 e_t = khelp_get_osd(CCV(ccv, osd), ertt_id);
139
140 if (e_t->rtt && e_t->minrtt && V_hd_qthresh > 0) {
141 qdly = e_t->rtt - e_t->minrtt;
142
143 if (qdly > V_hd_qmin &&
144 !IN_RECOVERY(CCV(ccv, t_flags))) {
145 /* Probabilistic backoff of cwnd. */
146 if (should_backoff(qdly,
147 e_t->maxrtt - e_t->minrtt)) {
148 /*
149 * Update cwnd and ssthresh update to
150 * half cwnd and behave like an ECN (ie
151 * not a packet loss).
152 */
153 newreno_cc_algo.cong_signal(ccv,
154 CC_ECN);
155 return;
156 }
157 }
158 }
159 }
160 newreno_cc_algo.ack_received(ccv, ack_type); /* As for NewReno. */
161}
162
163static int
164hd_mod_init(void)

Callers

nothing calls this directly

Calls 2

khelp_get_osdFunction · 0.85
should_backoffFunction · 0.70

Tested by

no test coverage detected