FreeBSD/sys/netinet/cc/cc_hd.c
/*
 * 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.
 */
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.
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 .
static void
hd_ack_received(struct cc_var *ccv, uint16_t ack_type)
{
	struct ertt *e_t;
	int qdly;
	if (ack_type == CC_ACK) {
		e_t = khelp_get_osd(CCV(ccv, osd), ertt_id);
		if (e_t->rtt && e_t->minrtt && V_hd_qthresh > 0) {
			qdly = e_t->rtt - e_t->minrtt;
			if (qdly > V_hd_qmin &&
			    !IN_RECOVERY(CCV(ccv, t_flags))) {
				if (should_backoff(qdly,
				    e_t->maxrtt - e_t->minrtt)) {
					newreno_cc_algo.cong_signal(ccv,
					    CC_ECN);
					return;
				}
			}
		}
	}
	newreno_cc_algo.ack_received(ccv, ack_type); 
}
static void hd_ack_received ( struct cc_var * ccv , uint16_t ack_type ) { struct ertt * e_t ; int qdly ; if ( ack_type == CC_ACK ) { e_t = khelp_get_osd ( CCV ( ccv , osd ) , ertt_id ) ; if ( e_t -> rtt && e_t -> minrtt && V_hd_qthresh > 0 ) { qdly = e_t -> rtt - e_t -> minrtt ; if ( qdly > V_hd_qmin && ! IN_RECOVERY ( CCV ( ccv , t_flags ) ) ) { if ( should_backoff ( qdly , e_t -> maxrtt - e_t -> minrtt ) ) { newreno_cc_algo . cong_signal ( ccv , CC_ECN ) ; return ; } } } } newreno_cc_algo . ack_received ( ccv , ack_type ) ; }
If the ack type is CC_ACK, and the inferred queueing delay is greater than
 the Qmin threshold, cwnd is reduced probabilistically.
If the ack type is CC_ACK and the inferred queueing delay is greater than the Qmin threshold cwnd is reduced probabilistically .
/* Probabilistic backoff of cwnd. */ /*
					 * Update cwnd and ssthresh update to
					 * half cwnd and behave like an ECN (ie
					 * not a packet loss).
					 */ /* As for NewReno. */