Lines Matching refs:di
34 * - di: weight step, greatest common divisor from all weights
36 * As result, all weights are in the [di..mw] range with a step=di.
39 * Then cw is reduced with di and all dests are checked again.
40 * Last pass should be with cw = di. We have mw/di passes in total:
43 * pass 2: cw = max weight - di
44 * pass 3: cw = max weight - 2 * di
46 * last pass: cw = di
48 * Weights are supposed to be >= di but we run in parallel with
50 * below di, bad if it is the only available dest.
52 * So, we modify how mw is calculated, now it is reduced with (di - 1),
53 * so that last cw is 1 to catch such dests with weight below di:
54 * pass 1: cw = max weight - (di - 1)
55 * pass 2: cw = max weight - di - (di - 1)
56 * pass 3: cw = max weight - 2 * di - (di - 1)
69 int di; /* decreasing interval */
123 mark->di = ip_vs_wrr_gcd_weight(svc);
124 mark->mw = ip_vs_wrr_max_weight(svc) - (mark->di - 1);
150 mark->di = ip_vs_wrr_gcd_weight(svc);
151 mark->mw = ip_vs_wrr_max_weight(svc) - (mark->di - 1);
154 else if (mark->di > 1)
155 mark->cw = (mark->cw / mark->di) * mark->di + 1;
191 mark->cw -= mark->di;
195 * 1. last_pass: we started checks when cw > di but
205 last_pass = mark->cw <= mark->di;