* 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. */
| 129 | * as NewReno in all other circumstances. |
| 130 | */ |
| 131 | static void |
| 132 | hd_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 | |
| 163 | static int |
| 164 | hd_mod_init(void) |
nothing calls this directly
no test coverage detected