Lines Matching refs:opt

517 			  struct tc_gred_qopt_offload *opt)  in nfp_abm_gred_check_params()  argument
523 if (opt->set.grio_on || opt->set.wred_on) { in nfp_abm_gred_check_params()
525 opt->parent, opt->handle); in nfp_abm_gred_check_params()
528 if (opt->set.dp_def != alink->def_band) { in nfp_abm_gred_check_params()
530 alink->def_band, opt->parent, opt->handle); in nfp_abm_gred_check_params()
533 if (opt->set.dp_cnt != abm->num_bands) { in nfp_abm_gred_check_params()
535 abm->num_bands, opt->parent, opt->handle); in nfp_abm_gred_check_params()
540 struct tc_gred_vq_qopt_offload_params *band = &opt->set.tab[i]; in nfp_abm_gred_check_params()
546 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
551 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
556 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
561 opt->parent, opt->handle, i); in nfp_abm_gred_check_params()
566 band->min, S32_MAX, opt->parent, opt->handle, in nfp_abm_gred_check_params()
577 struct tc_gred_qopt_offload *opt) in nfp_abm_gred_replace() argument
583 ret = nfp_abm_qdisc_replace(netdev, alink, NFP_QDISC_GRED, opt->parent, in nfp_abm_gred_replace()
584 opt->handle, 0, &qdisc); in nfp_abm_gred_replace()
588 qdisc->params_ok = nfp_abm_gred_check_params(alink, opt); in nfp_abm_gred_replace()
590 qdisc->red.num_bands = opt->set.dp_cnt; in nfp_abm_gred_replace()
592 qdisc->red.band[i].ecn = opt->set.tab[i].is_ecn; in nfp_abm_gred_replace()
593 qdisc->red.band[i].threshold = opt->set.tab[i].min; in nfp_abm_gred_replace()
604 struct tc_gred_qopt_offload *opt) in nfp_abm_setup_tc_gred() argument
606 switch (opt->command) { in nfp_abm_setup_tc_gred()
608 return nfp_abm_gred_replace(netdev, alink, opt); in nfp_abm_setup_tc_gred()
610 nfp_abm_qdisc_destroy(netdev, alink, opt->handle); in nfp_abm_setup_tc_gred()
613 return nfp_abm_gred_stats(alink, opt->handle, &opt->stats); in nfp_abm_setup_tc_gred()
620 nfp_abm_red_xstats(struct nfp_abm_link *alink, struct tc_red_qopt_offload *opt) in nfp_abm_red_xstats() argument
626 qdisc = nfp_abm_qdisc_find(alink, opt->handle); in nfp_abm_red_xstats()
632 opt->xstats); in nfp_abm_red_xstats()
662 struct tc_red_qopt_offload *opt) in nfp_abm_red_check_params() argument
667 if (!opt->set.is_ecn && !nfp_abm_has_drop(abm)) { in nfp_abm_red_check_params()
669 opt->parent, opt->handle); in nfp_abm_red_check_params()
672 if (opt->set.is_ecn && !nfp_abm_has_mark(abm)) { in nfp_abm_red_check_params()
674 opt->parent, opt->handle); in nfp_abm_red_check_params()
677 if (opt->set.is_harddrop) { in nfp_abm_red_check_params()
679 opt->parent, opt->handle); in nfp_abm_red_check_params()
682 if (opt->set.min != opt->set.max) { in nfp_abm_red_check_params()
684 opt->parent, opt->handle); in nfp_abm_red_check_params()
687 if (opt->set.min > NFP_ABM_LVL_INFINITY) { in nfp_abm_red_check_params()
689 opt->set.min, NFP_ABM_LVL_INFINITY, opt->parent, in nfp_abm_red_check_params()
690 opt->handle); in nfp_abm_red_check_params()
699 struct tc_red_qopt_offload *opt) in nfp_abm_red_replace() argument
704 ret = nfp_abm_qdisc_replace(netdev, alink, NFP_QDISC_RED, opt->parent, in nfp_abm_red_replace()
705 opt->handle, 1, &qdisc); in nfp_abm_red_replace()
710 if (opt->set.limit) { in nfp_abm_red_replace()
722 qdisc->params_ok = nfp_abm_red_check_params(alink, opt); in nfp_abm_red_replace()
725 qdisc->red.band[0].ecn = opt->set.is_ecn; in nfp_abm_red_replace()
726 qdisc->red.band[0].threshold = opt->set.min; in nfp_abm_red_replace()
736 struct tc_red_qopt_offload *opt) in nfp_abm_setup_tc_red() argument
738 switch (opt->command) { in nfp_abm_setup_tc_red()
740 return nfp_abm_red_replace(netdev, alink, opt); in nfp_abm_setup_tc_red()
742 nfp_abm_qdisc_destroy(netdev, alink, opt->handle); in nfp_abm_setup_tc_red()
745 return nfp_abm_red_stats(alink, opt->handle, &opt->stats); in nfp_abm_setup_tc_red()
747 return nfp_abm_red_xstats(alink, opt); in nfp_abm_setup_tc_red()
749 return nfp_abm_qdisc_graft(alink, opt->handle, in nfp_abm_setup_tc_red()
750 opt->child_handle, 0); in nfp_abm_setup_tc_red()
758 struct tc_mq_qopt_offload *opt) in nfp_abm_mq_create() argument
764 TC_H_ROOT, opt->handle, alink->total_queues, in nfp_abm_mq_create()
817 struct tc_mq_qopt_offload *opt) in nfp_abm_setup_tc_mq() argument
819 switch (opt->command) { in nfp_abm_setup_tc_mq()
821 return nfp_abm_mq_create(netdev, alink, opt); in nfp_abm_setup_tc_mq()
823 nfp_abm_qdisc_destroy(netdev, alink, opt->handle); in nfp_abm_setup_tc_mq()
826 return nfp_abm_mq_stats(alink, opt->handle, &opt->stats); in nfp_abm_setup_tc_mq()
828 return nfp_abm_qdisc_graft(alink, opt->handle, in nfp_abm_setup_tc_mq()
829 opt->graft_params.child_handle, in nfp_abm_setup_tc_mq()
830 opt->graft_params.queue); in nfp_abm_setup_tc_mq()
837 struct tc_root_qopt_offload *opt) in nfp_abm_setup_root() argument
839 if (opt->ingress) in nfp_abm_setup_root()
843 alink->root_qdisc = nfp_abm_qdisc_find(alink, opt->handle); in nfp_abm_setup_root()