Lines Matching defs:conf
68 struct ng_car_hookconf conf; /* hook configuration */
205 priv->upper.tc = priv->upper.conf.cbs = NG_CAR_CBS_MIN;
206 priv->upper.te = priv->upper.conf.ebs = NG_CAR_EBS_MIN;
207 priv->upper.conf.cir = NG_CAR_CIR_DFLT;
208 priv->upper.conf.green_action = NG_CAR_ACTION_FORWARD;
209 priv->upper.conf.yellow_action = NG_CAR_ACTION_FORWARD;
210 priv->upper.conf.red_action = NG_CAR_ACTION_DROP;
211 priv->upper.conf.mode = 0;
220 priv->lower.tc = priv->lower.conf.cbs = NG_CAR_CBS_MIN;
221 priv->lower.te = priv->lower.conf.ebs = NG_CAR_EBS_MIN;
222 priv->lower.conf.cir = NG_CAR_CIR_DFLT;
223 priv->lower.conf.green_action = NG_CAR_ACTION_FORWARD;
224 priv->lower.conf.yellow_action = NG_CAR_ACTION_FORWARD;
225 priv->lower.conf.red_action = NG_CAR_ACTION_DROP;
226 priv->lower.conf.mode = 0;
307 if (hinfo->conf.opt & NG_CAR_COUNT_PACKETS) {
315 if ((hinfo->conf.opt & NG_CAR_COLOR_AWARE) && (colp != NULL))
326 hinfo->conf.green_action,
338 hinfo->conf.green_action,
342 } else if (hinfo->conf.mode == NG_CAR_SHAPE) {
347 } else if (hinfo->conf.mode == NG_CAR_RED) {
349 if (len - (hinfo->tc - len) > hinfo->conf.ebs ||
355 hinfo->conf.red_action,
360 } else if (hinfo->te + (len - hinfo->tc) < hinfo->conf.ebs &&
368 hinfo->conf.yellow_action,
375 hinfo->conf.red_action,
386 hinfo->conf.yellow_action,
392 hinfo->conf.red_action,
461 bcopy(&priv->upper.conf, &bconf->downstream,
463 bcopy(&priv->lower.conf, &bconf->upstream,
527 bcopy(&bconf->downstream, &priv->upper.conf,
528 sizeof(priv->upper.conf));
529 priv->upper.tc = priv->upper.conf.cbs;
530 if (priv->upper.conf.mode == NG_CAR_RED ||
531 priv->upper.conf.mode == NG_CAR_SHAPE) {
534 priv->upper.te = priv->upper.conf.ebs;
538 bcopy(&bconf->upstream, &priv->lower.conf,
539 sizeof(priv->lower.conf));
540 priv->lower.tc = priv->lower.conf.cbs;
541 if (priv->lower.conf.mode == NG_CAR_RED ||
542 priv->lower.conf.mode == NG_CAR_SHAPE) {
545 priv->lower.te = priv->lower.conf.ebs;
644 if (h->conf.mode == NG_CAR_SINGLE_RATE) {
647 h->tc += (h->conf.cir * deltat_us) >> 23;
648 delta = h->tc - h->conf.cbs;
650 h->tc = h->conf.cbs;
654 if (h->te > ((int64_t)h->conf.ebs))
655 h->te = h->conf.ebs;
658 } else if (h->conf.mode == NG_CAR_DOUBLE_RATE) {
660 h->tc += (h->conf.cir * deltat_us) >> 23;
661 if (h->tc > ((int64_t)h->conf.cbs))
662 h->tc = h->conf.cbs;
665 h->te += (h->conf.pir * deltat_us) >> 23;
666 if (h->te > ((int64_t)h->conf.ebs))
667 h->te = h->conf.ebs;
671 h->tc += (h->conf.cir * deltat_us) >> 23;
672 if (h->tc > ((int64_t)h->conf.cbs))
673 h->tc = h->conf.cbs;
688 delay = (-(hinfo->tc)) * hz * 8 / hinfo->conf.cir + 1;
727 if (hinfo->conf.opt & NG_CAR_COUNT_PACKETS) {
756 if ((hinfo->conf.opt & NG_CAR_COLOR_AWARE) && (colp != NULL))
795 if (hinfo->conf.opt & NG_CAR_COUNT_PACKETS) {