Home
last modified time | relevance | path

Searched refs:grad (Results 1 – 1 of 1) sorted by relevance

/Linux-v5.10/net/ipv4/
Dtcp_cdg.c194 s32 grad; in tcp_cdg_grad() local
212 grad = gmin > 0 ? gmin : gmax; in tcp_cdg_grad()
217 grad *= window; /* Memory allocation failed. */ in tcp_cdg_grad()
221 grad = (grad * window) / (int)ca->tail; in tcp_cdg_grad()
238 return grad; in tcp_cdg_grad()
241 static bool tcp_cdg_backoff(struct sock *sk, u32 grad) in tcp_cdg_backoff() argument
246 if (prandom_u32() <= nexp_u32(grad * backoff_factor)) in tcp_cdg_backoff()
273 s32 grad = 0; in tcp_cdg_cong_avoid() local
276 grad = tcp_cdg_grad(ca); in tcp_cdg_cong_avoid()
283 if (grad > 0 && tcp_cdg_backoff(sk, grad)) in tcp_cdg_cong_avoid()