Lines Matching defs:qopt
35 const struct tc_mqprio_qopt *qopt,
41 .qopt = *qopt,
58 for (i = 0; i < mqprio.qopt.num_tc; i++)
61 for (i = 0; i < mqprio.qopt.num_tc; i++)
75 priv->hw_offload = mqprio.qopt.hw;
115 static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt,
121 /* Limit qopt->hw to maximum supported offload value. Drivers have
125 if (qopt->hw > TC_MQPRIO_HW_OFFLOAD_MAX)
126 qopt->hw = TC_MQPRIO_HW_OFFLOAD_MAX;
134 err = mqprio_validate_qopt(dev, qopt,
135 !qopt->hw || caps->validate_queue_counts,
143 if (qopt->hw && !dev->netdev_ops->ndo_setup_tc) {
242 static int mqprio_parse_nlattr(struct Qdisc *sch, struct tc_mqprio_qopt *qopt,
246 struct nlattr *nlattr_opt = nla_data(opt) + NLA_ALIGN(sizeof(*qopt));
247 int nlattr_opt_len = nla_len(opt) - NLA_ALIGN(sizeof(*qopt));
261 if (!qopt->hw) {
298 if (i >= qopt->num_tc)
327 if (i >= qopt->num_tc)
353 struct tc_mqprio_qopt *qopt = NULL;
370 if (!opt || nla_len(opt) < sizeof(*qopt))
379 qopt = nla_data(opt);
380 if (mqprio_parse_opt(dev, qopt, &caps, extack))
383 len = nla_len(opt) - NLA_ALIGN(sizeof(*qopt));
385 err = mqprio_parse_nlattr(sch, qopt, opt, extack);
413 if (qopt->hw) {
414 err = mqprio_enable_offload(sch, qopt, extack);
418 netdev_set_num_tc(dev, qopt->num_tc);
419 for (i = 0; i < qopt->num_tc; i++)
421 qopt->count[i], qopt->offset[i]);
426 netdev_set_prio_tc_map(dev, i, qopt->prio_tc_map[i]);