Lines Matching refs:qopt

62 static int mqprio_parse_opt(struct net_device *dev, struct tc_mqprio_qopt *qopt)  in mqprio_parse_opt()  argument
67 if (qopt->num_tc > TC_MAX_QUEUE) in mqprio_parse_opt()
72 if (qopt->prio_tc_map[i] >= qopt->num_tc) in mqprio_parse_opt()
80 if (qopt->hw > TC_MQPRIO_HW_OFFLOAD_MAX) in mqprio_parse_opt()
81 qopt->hw = TC_MQPRIO_HW_OFFLOAD_MAX; in mqprio_parse_opt()
88 if (qopt->hw) in mqprio_parse_opt()
91 for (i = 0; i < qopt->num_tc; i++) { in mqprio_parse_opt()
92 unsigned int last = qopt->offset[i] + qopt->count[i]; in mqprio_parse_opt()
97 if (qopt->offset[i] >= dev->real_num_tx_queues || in mqprio_parse_opt()
98 !qopt->count[i] || in mqprio_parse_opt()
103 for (j = i + 1; j < qopt->num_tc; j++) { in mqprio_parse_opt()
104 if (last > qopt->offset[j]) in mqprio_parse_opt()
141 struct tc_mqprio_qopt *qopt = NULL; in mqprio_init() local
160 if (!opt || nla_len(opt) < sizeof(*qopt)) in mqprio_init()
163 qopt = nla_data(opt); in mqprio_init()
164 if (mqprio_parse_opt(dev, qopt)) in mqprio_init()
167 len = nla_len(opt) - NLA_ALIGN(sizeof(*qopt)); in mqprio_init()
170 sizeof(*qopt)); in mqprio_init()
174 if (!qopt->hw) in mqprio_init()
195 if (i >= qopt->num_tc) in mqprio_init()
211 if (i >= qopt->num_tc) in mqprio_init()
243 if (qopt->hw) { in mqprio_init()
244 struct tc_mqprio_qopt_offload mqprio = {.qopt = *qopt}; in mqprio_init()
258 for (i = 0; i < mqprio.qopt.num_tc; i++) in mqprio_init()
261 for (i = 0; i < mqprio.qopt.num_tc; i++) in mqprio_init()
273 priv->hw_offload = mqprio.qopt.hw; in mqprio_init()
275 netdev_set_num_tc(dev, qopt->num_tc); in mqprio_init()
276 for (i = 0; i < qopt->num_tc; i++) in mqprio_init()
278 qopt->count[i], qopt->offset[i]); in mqprio_init()
283 netdev_set_prio_tc_map(dev, i, qopt->prio_tc_map[i]); in mqprio_init()