Lines Matching refs:cl
199 struct rm_class *cl;
298 cl = cbqp->ifnp.root_;
300 cl = rmc_newclass(priority, &cbqp->ifnp, ns_per_byte,
304 if (cl == NULL)
308 cl->stats_.handle = qid;
309 cl->stats_.depth = cl->depth_;
312 cbqp->cbq_class_tbl[i] = cl;
315 cbqp->ifnp.default_ = cl;
318 *clp = cl;
332 struct rm_class *cl;
337 if ((cl = cbq_clh_to_clp(cbqp, qid)) == NULL)
341 if (RMC_IS_A_PARENT_CLASS(cl))
345 rmc_delete_class(&cbqp->ifnp, cl);
351 if (cbqp->cbq_class_tbl[i] == cl) {
353 if (cl == cbqp->ifnp.root_)
355 if (cl == cbqp->ifnp.default_)
370 cbq_class_destroy(cbq_state_t *cbqp, struct rm_class *cl)
379 cl->stats_.handle, cl->pri_);
383 rmc_delete_class(&cbqp->ifnp, cl);
389 if (cbqp->cbq_class_tbl[i] == cl)
392 if (cl == cbqp->ifnp.root_)
394 if (cl == cbqp->ifnp.default_)
405 struct rm_class *cl;
414 if ((cl = cbqp->cbq_class_tbl[i]) != NULL &&
415 cl->stats_.handle == chandle)
416 return (cl);
418 if ((cl = cbqp->cbq_class_tbl[i]) != NULL &&
419 cl->stats_.handle == chandle)
420 return (cl);
434 struct rm_class *cl;
442 if ((cl = cbqp->cbq_class_tbl[i]) != NULL) {
443 if (RMC_IS_A_PARENT_CLASS(cl))
446 cbq_class_destroy(cbqp, cl);
448 if (cl == cbqp->ifnp.root_)
450 if (cl == cbqp->ifnp.default_)
464 struct rm_class *cl;
468 if ((cl = cbq_clh_to_clp(cbqp, qid)) == NULL)
471 statsp->xmit_cnt = cl->stats_.xmit_cnt;
472 statsp->drop_cnt = cl->stats_.drop_cnt;
473 statsp->over = cl->stats_.over;
474 statsp->borrows = cl->stats_.borrows;
475 statsp->overactions = cl->stats_.overactions;
476 statsp->delays = cl->stats_.delays;
478 statsp->depth = cl->depth_;
479 statsp->priority = cl->pri_;
480 statsp->maxidle = cl->maxidle_;
481 statsp->minidle = cl->minidle_;
482 statsp->offtime = cl->offtime_;
483 statsp->qmax = qlimit(&cl->q_);
484 statsp->ns_per_byte = cl->ns_per_byte_;
485 statsp->wrr_allot = cl->w_allotment_;
486 statsp->qcnt = qlen(&cl->q_);
487 statsp->avgidle = cl->avgidle_;
489 statsp->qtype = qtype(&cl->q_);
490 statsp->qstate = qstate(&cl->q_);
492 if (q_is_red(&cl->q_))
493 red_getstats(cl->red_, &statsp->red[0]);
496 if (q_is_rio(&cl->q_))
497 rio_getstats(cl->rio_, &statsp->red[0]);
500 if (q_is_blue(&cl->q_))
501 blue_getstats(cl->blue_, &statsp->blue);
503 if (q_is_sfb(&cl->q_) && cl->sfb_ != NULL)
504 sfb_getstats(cl->sfb_, &statsp->sfb);
510 cbq_enqueue(cbq_state_t *cbqp, struct rm_class *cl, struct mbuf *m,
528 if (cl == NULL) {
529 cl = cbq_clh_to_clp(cbqp, t->pftag_qid);
530 if (cl == NULL) {
531 cl = cbqp->ifnp.default_;
532 if (cl == NULL) {
542 ret = rmc_queue_packet(cl, m, t);
552 PKTCNTR_ADD(&cl->stats_.drop_cnt, 1, len);
618 struct rm_class *cl;
624 if ((cl = cbqp->cbq_class_tbl[i]) != NULL) {
625 if (!qempty(&cl->q_) && pktsched_verbose) {
628 cbq_style(cbqp), cl->stats_.handle,
629 cl->pri_, qlen(&cl->q_));
631 rmc_dropall(cl);
639 struct rm_class *cl;
645 if ((cl = cbqp->cbq_class_tbl[i]) != NULL) {
649 cbq_style(cbqp), cl->stats_.handle,
650 cl->pri_, ifclassq_ev2str(ev));
652 rmc_updateq(cl, ev);
678 ifq->ifcq_disc_slots[i].cl = NULL;