Lines Matching defs:gcd
33 #include <linux/gcd.h>
46 int turns; /* weight / gcd() and rshift */
66 int gcd;
130 /* If gcd is smaller then 1, number of dests or
134 if (s->gcd < 1)
152 ds->turns = ((lw / s->gcd) >> s->rshift) ? : (lw != 0);
168 /* If gcd is smaller then 1, number of dests or
172 if (s->gcd < 1) {
332 g = gcd(weight, g);
341 * calculate shift value with gcd.
343 static int ip_vs_mh_shift_weight(struct ip_vs_service *svc, int gcd)
349 /* If gcd is smaller then 1, number of dests or
353 if (gcd < 1)
362 /* Because gcd is greater than zero,
363 * the maximum weight and gcd are always greater than zero
365 mw = weight / gcd;
367 /* shift = occupied bits of weight/gcd - MH highest bits */
399 s->gcd = ip_vs_mh_gcd_weight(svc);
400 s->rshift = ip_vs_mh_shift_weight(svc, s->gcd);
436 s->gcd = ip_vs_mh_gcd_weight(svc);
437 s->rshift = ip_vs_mh_shift_weight(svc, s->gcd);