Lines Matching refs:weight
152 #define W_WEIGHT 512 /* inverse of weight of EWMA (511/512) */
156 #define W_WEIGHT_1 128 /* inverse of weight of EWMA (127/128) */
160 #define W_WEIGHT_2 64 /* inverse of weight of EWMA (63/64) */
215 red_alloc(struct ifnet *ifp, int weight, int inv_pmax, int th_min,
232 if (weight == 0)
235 rp->red_weight = weight;
258 if (weight == 0) {
270 /* calculate wshift. weight must be power of 2 */
277 printf("invalid weight value %d for red! use %d\n",
296 /* allocate weight table */
532 * here Wq = 1/weight and the code assumes Wq is close to zero.
539 wtab_alloc(int weight)
545 if (w->w_weight == weight) {
554 w->w_weight = weight;
559 /* initialize the weight table */
560 w->w_tab[0] = ((weight - 1) << FP_SHIFT) / weight;