Lines Matching defs:di
29 * - di: weight step, greatest common divisor from all weights
31 * As result, all weights are in the [di..mw] range with a step=di.
34 * Then cw is reduced with di and all dests are checked again.
35 * Last pass should be with cw = di. We have mw/di passes in total:
38 * pass 2: cw = max weight - di
39 * pass 3: cw = max weight - 2 * di
41 * last pass: cw = di
43 * Weights are supposed to be >= di but we run in parallel with
45 * below di, bad if it is the only available dest.
47 * So, we modify how mw is calculated, now it is reduced with (di - 1),
48 * so that last cw is 1 to catch such dests with weight below di:
49 * pass 1: cw = max weight - (di - 1)
50 * pass 2: cw = max weight - di - (di - 1)
51 * pass 3: cw = max weight - 2 * di - (di - 1)
64 int di; /* decreasing interval */
118 mark->di = ip_vs_wrr_gcd_weight(svc);
119 mark->mw = ip_vs_wrr_max_weight(svc) - (mark->di - 1);
145 mark->di = ip_vs_wrr_gcd_weight(svc);
146 mark->mw = ip_vs_wrr_max_weight(svc) - (mark->di - 1);
149 else if (mark->di > 1)
150 mark->cw = (mark->cw / mark->di) * mark->di + 1;
186 mark->cw -= mark->di;
190 * 1. last_pass: we started checks when cw > di but
200 last_pass = mark->cw <= mark->di;