Lines Matching defs:weight
149 #define W_WEIGHT 512 /* inverse of weight of EWMA (511/512) */
153 #define W_WEIGHT_1 128 /* inverse of weight of EWMA (127/128) */
157 #define W_WEIGHT_2 64 /* inverse of weight of EWMA (63/64) */
231 red_alloc(int weight, int inv_pmax, int th_min, int th_max, int flags,
245 if (weight == 0)
248 rp->red_weight = weight;
270 if (weight == 0) {
282 /* calculate wshift. weight must be power of 2 */
289 printf("invalid weight value %d for red! use %d\n",
308 /* allocate weight table */
641 * here Wq = 1/weight and the code assumes Wq is close to zero.
648 wtab_alloc(int weight)
654 if (w->w_weight == weight) {
662 w->w_weight = weight;
667 /* initialize the weight table */
668 w->w_tab[0] = ((weight - 1) << FP_SHIFT) / weight;
882 q_stats->weight = rp->red_weight;
1071 #define FV_PSHIFT 7 /* weight of average drop rate -- 1/128 */
1074 #define FV_FSHIFT 5 /* weight of average fraction -- 1/32 */