Home
last modified time | relevance | path

Searched refs:qopt (Results 1 – 25 of 41) sorted by relevance

12

/Linux-v6.1/drivers/net/ethernet/engleder/
Dtsnep_selftests.c156 struct tc_taprio_qopt_offload *qopt, s64 ms) in delay_base_time() argument
159 u64 base_time = ktime_to_ns(qopt->base_time); in delay_base_time()
164 n = div64_u64(system_time - base_time, qopt->cycle_time); in delay_base_time()
166 qopt->base_time = ktime_add_ns(qopt->base_time, in delay_base_time()
167 (n + 1) * qopt->cycle_time); in delay_base_time()
312 struct tc_taprio_qopt_offload *qopt, s64 ms) in enable_check_taprio() argument
316 retval = tsnep_tc_setup(adapter->netdev, TC_SETUP_QDISC_TAPRIO, qopt); in enable_check_taprio()
328 struct tc_taprio_qopt_offload qopt; in disable_taprio() local
331 memset(&qopt, 0, sizeof(qopt)); in disable_taprio()
332 qopt.enable = 0; in disable_taprio()
[all …]
Dtsnep_tc.c11 static int tsnep_validate_gcl(struct tc_taprio_qopt_offload *qopt) in tsnep_validate_gcl() argument
16 if (!qopt->cycle_time) in tsnep_validate_gcl()
18 if (qopt->num_entries > TSNEP_MAX_GCL_NUM) in tsnep_validate_gcl()
21 for (i = 0; i < qopt->num_entries; i++) { in tsnep_validate_gcl()
22 if (qopt->entries[i].command != TC_TAPRIO_CMD_SET_GATES) in tsnep_validate_gcl()
24 if (qopt->entries[i].gate_mask & ~TSNEP_GCL_MASK) in tsnep_validate_gcl()
26 if (qopt->entries[i].interval < TSNEP_GCL_MIN_INTERVAL) in tsnep_validate_gcl()
28 cycle_time += qopt->entries[i].interval; in tsnep_validate_gcl()
30 if (qopt->cycle_time != cycle_time) in tsnep_validate_gcl()
32 if (qopt->cycle_time_extension >= qopt->cycle_time) in tsnep_validate_gcl()
[all …]
/Linux-v6.1/drivers/net/ethernet/microchip/lan966x/
Dlan966x_cbs.c6 struct tc_cbs_qopt_offload *qopt) in lan966x_cbs_add() argument
13 if (qopt->idleslope <= 0 || in lan966x_cbs_add()
14 qopt->sendslope >= 0 || in lan966x_cbs_add()
15 qopt->locredit >= qopt->hicredit) in lan966x_cbs_add()
18 se_idx = SE_IDX_QUEUE + port->chip_port * NUM_PRIO_QUEUES + qopt->queue; in lan966x_cbs_add()
19 cir = qopt->idleslope; in lan966x_cbs_add()
20 cbs = (qopt->idleslope - qopt->sendslope) * in lan966x_cbs_add()
21 (qopt->hicredit - qopt->locredit) / in lan966x_cbs_add()
22 -qopt->sendslope; in lan966x_cbs_add()
52 struct tc_cbs_qopt_offload *qopt) in lan966x_cbs_del() argument
[all …]
Dlan966x_tc.c12 u8 num_tc = mqprio->qopt.num_tc; in lan966x_tc_setup_qdisc_mqprio()
14 mqprio->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS; in lan966x_tc_setup_qdisc_mqprio()
28 struct tc_tbf_qopt_offload *qopt) in lan966x_tc_setup_qdisc_tbf() argument
30 switch (qopt->command) { in lan966x_tc_setup_qdisc_tbf()
32 return lan966x_tbf_add(port, qopt); in lan966x_tc_setup_qdisc_tbf()
34 return lan966x_tbf_del(port, qopt); in lan966x_tc_setup_qdisc_tbf()
43 struct tc_cbs_qopt_offload *qopt) in lan966x_tc_setup_qdisc_cbs() argument
45 return qopt->enable ? lan966x_cbs_add(port, qopt) : in lan966x_tc_setup_qdisc_cbs()
46 lan966x_cbs_del(port, qopt); in lan966x_tc_setup_qdisc_cbs()
50 struct tc_ets_qopt_offload *qopt) in lan966x_tc_setup_qdisc_ets() argument
[all …]
Dlan966x_taprio.c173 struct tc_taprio_qopt_offload *qopt, in lan966x_taprio_find_list() argument
219 static int lan966x_taprio_check(struct tc_taprio_qopt_offload *qopt) in lan966x_taprio_check() argument
225 if (qopt->cycle_time_extension) in lan966x_taprio_check()
231 if (qopt->num_entries > LAN966X_TAPRIO_NUM_GCL) in lan966x_taprio_check()
235 if (qopt->cycle_time < LAN966X_TAPRIO_MIN_CYCLE_TIME_NS || in lan966x_taprio_check()
236 qopt->cycle_time > LAN966X_TAPRIO_MAX_CYCLE_TIME_NS) in lan966x_taprio_check()
239 for (i = 0; i < qopt->num_entries; ++i) { in lan966x_taprio_check()
240 struct tc_taprio_sched_entry *entry = &qopt->entries[i]; in lan966x_taprio_check()
249 if (qopt->entries[i].command != TC_TAPRIO_CMD_SET_GATES) in lan966x_taprio_check()
252 total_time += qopt->entries[i].interval; in lan966x_taprio_check()
[all …]
Dlan966x_tbf.c6 struct tc_tbf_qopt_offload *qopt) in lan966x_tbf_add() argument
9 bool root = qopt->parent == TC_H_ROOT; in lan966x_tbf_add()
15 queue = TC_H_MIN(qopt->parent) - 1; in lan966x_tbf_add()
25 cir = div_u64(qopt->replace_params.rate.rate_bytes_ps, 1000) * 8; in lan966x_tbf_add()
26 cbs = qopt->replace_params.max_size; in lan966x_tbf_add()
56 struct tc_tbf_qopt_offload *qopt) in lan966x_tbf_del() argument
59 bool root = qopt->parent == TC_H_ROOT; in lan966x_tbf_del()
64 queue = TC_H_MIN(qopt->parent) - 1; in lan966x_tbf_del()
Dlan966x_ets.c19 struct tc_ets_qopt_offload *qopt) in lan966x_ets_add() argument
29 if (qopt->parent != TC_H_ROOT) in lan966x_ets_add()
32 params = &qopt->replace_params; in lan966x_ets_add()
78 struct tc_ets_qopt_offload *qopt) in lan966x_ets_del() argument
Dlan966x_main.h483 struct tc_taprio_qopt_offload *qopt);
488 struct tc_tbf_qopt_offload *qopt);
490 struct tc_tbf_qopt_offload *qopt);
493 struct tc_cbs_qopt_offload *qopt);
495 struct tc_cbs_qopt_offload *qopt);
498 struct tc_ets_qopt_offload *qopt);
500 struct tc_ets_qopt_offload *qopt);
/Linux-v6.1/net/sched/
Dsch_tbf.c145 struct tc_tbf_qopt_offload qopt; in tbf_offload_change() local
150 qopt.command = TC_TBF_REPLACE; in tbf_offload_change()
151 qopt.handle = sch->handle; in tbf_offload_change()
152 qopt.parent = sch->parent; in tbf_offload_change()
153 qopt.replace_params.rate = q->rate; in tbf_offload_change()
154 qopt.replace_params.max_size = q->max_size; in tbf_offload_change()
155 qopt.replace_params.qstats = &sch->qstats; in tbf_offload_change()
157 dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_TBF, &qopt); in tbf_offload_change()
163 struct tc_tbf_qopt_offload qopt; in tbf_offload_destroy() local
168 qopt.command = TC_TBF_DESTROY; in tbf_offload_destroy()
[all …]
Dsch_mqprio.c62 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()
[all …]
Dsch_fifo.c58 struct tc_fifo_qopt_offload qopt; in fifo_offload_init() local
63 qopt.command = TC_FIFO_REPLACE; in fifo_offload_init()
64 qopt.handle = sch->handle; in fifo_offload_init()
65 qopt.parent = sch->parent; in fifo_offload_init()
66 dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_FIFO, &qopt); in fifo_offload_init()
72 struct tc_fifo_qopt_offload qopt; in fifo_offload_destroy() local
77 qopt.command = TC_FIFO_DESTROY; in fifo_offload_destroy()
78 qopt.handle = sch->handle; in fifo_offload_destroy()
79 qopt.parent = sch->parent; in fifo_offload_destroy()
80 dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_FIFO, &qopt); in fifo_offload_destroy()
[all …]
Dsch_ets.c109 struct tc_ets_qopt_offload qopt; in ets_offload_change() local
121 qopt.command = TC_ETS_REPLACE; in ets_offload_change()
122 qopt.handle = sch->handle; in ets_offload_change()
123 qopt.parent = sch->parent; in ets_offload_change()
124 qopt.replace_params.bands = q->nbands; in ets_offload_change()
125 qopt.replace_params.qstats = &sch->qstats; in ets_offload_change()
126 memcpy(&qopt.replace_params.priomap, in ets_offload_change()
139 qopt.replace_params.quanta[i] = quantum; in ets_offload_change()
140 qopt.replace_params.weights[i] = weight; in ets_offload_change()
143 dev->netdev_ops->ndo_setup_tc(dev, TC_SETUP_QDISC_ETS, &qopt); in ets_offload_change()
[all …]
Dsch_etf.c44 static inline int validate_input_params(struct tc_etf_qopt *qopt, in validate_input_params() argument
57 if (qopt->clockid < 0) { in validate_input_params()
62 if (qopt->clockid != CLOCK_TAI) { in validate_input_params()
67 if (qopt->delta < 0) { in validate_input_params()
349 struct tc_etf_qopt *qopt; in etf_init() local
368 qopt = nla_data(tb[TCA_ETF_PARMS]); in etf_init()
371 qopt->delta, qopt->clockid, in etf_init()
372 OFFLOAD_IS_ON(qopt) ? "on" : "off", in etf_init()
373 DEADLINE_MODE_IS_ON(qopt) ? "on" : "off"); in etf_init()
375 err = validate_input_params(qopt, extack); in etf_init()
[all …]
Dsch_prio.c140 static int prio_offload(struct Qdisc *sch, struct tc_prio_qopt *qopt) in prio_offload() argument
151 if (qopt) { in prio_offload()
153 opt.replace_params.bands = qopt->bands; in prio_offload()
154 memcpy(&opt.replace_params.priomap, qopt->priomap, in prio_offload()
182 struct tc_prio_qopt *qopt; in prio_tune() local
184 if (nla_len(opt) < sizeof(*qopt)) in prio_tune()
186 qopt = nla_data(opt); in prio_tune()
188 if (qopt->bands > TCQ_PRIO_BANDS || qopt->bands < TCQ_MIN_PRIO_BANDS) in prio_tune()
192 if (qopt->priomap[i] >= qopt->bands) in prio_tune()
197 for (i = oldbands; i < qopt->bands; i++) { in prio_tune()
[all …]
Dsch_cbs.c367 struct tc_cbs_qopt *qopt; in cbs_change() local
380 qopt = nla_data(tb[TCA_CBS_PARMS]); in cbs_change()
382 if (!qopt->offload) { in cbs_change()
386 err = cbs_enable_offload(dev, q, qopt, extack); in cbs_change()
392 q->hicredit = qopt->hicredit; in cbs_change()
393 q->locredit = qopt->locredit; in cbs_change()
394 q->idleslope = qopt->idleslope * BYTES_PER_KBIT; in cbs_change()
395 q->sendslope = qopt->sendslope * BYTES_PER_KBIT; in cbs_change()
396 q->offload = qopt->offload; in cbs_change()
Dsch_netem.c959 struct tc_netem_qopt *qopt; in netem_change() local
964 qopt = nla_data(opt); in netem_change()
965 ret = parse_attr(tb, TCA_NETEM_MAX, opt, netem_policy, sizeof(*qopt)); in netem_change()
997 sch->limit = qopt->limit; in netem_change()
999 q->latency = PSCHED_TICKS2NS(qopt->latency); in netem_change()
1000 q->jitter = PSCHED_TICKS2NS(qopt->jitter); in netem_change()
1001 q->limit = qopt->limit; in netem_change()
1002 q->gap = qopt->gap; in netem_change()
1004 q->loss = qopt->loss; in netem_change()
1005 q->duplicate = qopt->duplicate; in netem_change()
[all …]
Dsch_multiq.c175 struct tc_multiq_qopt *qopt; in multiq_tune() local
181 if (nla_len(opt) < sizeof(*qopt)) in multiq_tune()
184 qopt = nla_data(opt); in multiq_tune()
186 qopt->bands = qdisc_dev(sch)->real_num_tx_queues; in multiq_tune()
194 q->bands = qopt->bands; in multiq_tune()
Dsch_hfsc.c1381 struct tc_hfsc_qopt *qopt; in hfsc_init_qdisc() local
1386 if (!opt || nla_len(opt) < sizeof(*qopt)) in hfsc_init_qdisc()
1388 qopt = nla_data(opt); in hfsc_init_qdisc()
1390 q->defcls = qopt->defcls; in hfsc_init_qdisc()
1424 struct tc_hfsc_qopt *qopt; in hfsc_change_qdisc() local
1426 if (nla_len(opt) < sizeof(*qopt)) in hfsc_change_qdisc()
1428 qopt = nla_data(opt); in hfsc_change_qdisc()
1431 q->defcls = qopt->defcls; in hfsc_change_qdisc()
1510 struct tc_hfsc_qopt qopt; in hfsc_dump_qdisc() local
1512 qopt.defcls = q->defcls; in hfsc_dump_qdisc()
[all …]
Dsch_taprio.c923 struct tc_mqprio_qopt *qopt, in taprio_parse_mqprio_opt() argument
929 if (!qopt && !dev->num_tc) { in taprio_parse_mqprio_opt()
941 if (qopt->num_tc > TC_MAX_QUEUE) { in taprio_parse_mqprio_opt()
947 if (qopt->num_tc > dev->num_tx_queues) { in taprio_parse_mqprio_opt()
954 if (qopt->prio_tc_map[i] >= qopt->num_tc) { in taprio_parse_mqprio_opt()
960 for (i = 0; i < qopt->num_tc; i++) { in taprio_parse_mqprio_opt()
961 unsigned int last = qopt->offset[i] + qopt->count[i]; in taprio_parse_mqprio_opt()
966 if (qopt->offset[i] >= dev->num_tx_queues || in taprio_parse_mqprio_opt()
967 !qopt->count[i] || in taprio_parse_mqprio_opt()
977 for (j = i + 1; j < qopt->num_tc; j++) { in taprio_parse_mqprio_opt()
[all …]
/Linux-v6.1/drivers/net/ethernet/microchip/sparx5/
Dsparx5_tc.c29 m->qopt.hw = TC_MQPRIO_HW_OFFLOAD_TCS; in sparx5_tc_setup_qdisc_mqprio()
31 if (m->qopt.num_tc == 0) in sparx5_tc_setup_qdisc_mqprio()
34 return sparx5_tc_mqprio_add(ndev, m->qopt.num_tc); in sparx5_tc_setup_qdisc_mqprio()
38 struct tc_tbf_qopt_offload *qopt) in sparx5_tc_setup_qdisc_tbf() argument
43 sparx5_tc_get_layer_and_idx(qopt->parent, port->portno, &layer, in sparx5_tc_setup_qdisc_tbf()
46 switch (qopt->command) { in sparx5_tc_setup_qdisc_tbf()
48 return sparx5_tc_tbf_add(port, &qopt->replace_params, layer, in sparx5_tc_setup_qdisc_tbf()
62 struct tc_ets_qopt_offload *qopt) in sparx5_tc_setup_qdisc_ets() argument
65 &qopt->replace_params; in sparx5_tc_setup_qdisc_ets()
70 if (qopt->parent != TC_H_ROOT) in sparx5_tc_setup_qdisc_ets()
[all …]
/Linux-v6.1/drivers/net/ethernet/chelsio/cxgb4/
Dcxgb4_tc_mqprio.c19 if (!mqprio->qopt.num_tc) in cxgb4_mqprio_validate()
22 if (mqprio->qopt.hw != TC_MQPRIO_HW_OFFLOAD_TCS) { in cxgb4_mqprio_validate()
31 } else if (mqprio->qopt.num_tc > adap->params.nsched_cls) { in cxgb4_mqprio_validate()
47 for (i = 0; i < mqprio->qopt.num_tc; i++) { in cxgb4_mqprio_validate()
48 qoffset = max_t(u16, mqprio->qopt.offset[i], qoffset); in cxgb4_mqprio_validate()
49 qcount += mqprio->qopt.count[i]; in cxgb4_mqprio_validate()
51 start_a = mqprio->qopt.offset[i]; in cxgb4_mqprio_validate()
52 end_a = start_a + mqprio->qopt.count[i] - 1; in cxgb4_mqprio_validate()
53 for (j = i + 1; j < mqprio->qopt.num_tc; j++) { in cxgb4_mqprio_validate()
54 start_b = mqprio->qopt.offset[j]; in cxgb4_mqprio_validate()
[all …]
/Linux-v6.1/drivers/net/ethernet/stmicro/stmmac/
Dstmmac_tc.c343 struct tc_cbs_qopt_offload *qopt) in tc_setup_cbs() argument
346 u32 queue = qopt->queue; in tc_setup_cbs()
385 if (mode_to_use == MTL_QUEUE_DCB && qopt->enable) { in tc_setup_cbs()
391 } else if (!qopt->enable) { in tc_setup_cbs()
401 value = div_s64(qopt->idleslope * 1024ll * ptr, speed_div); in tc_setup_cbs()
404 value = div_s64(-qopt->sendslope * 1024ll * ptr, speed_div); in tc_setup_cbs()
407 value = qopt->hicredit * 1024ll * 8; in tc_setup_cbs()
410 value = qopt->locredit * 1024ll * 8; in tc_setup_cbs()
423 queue, qopt->sendslope, qopt->idleslope, in tc_setup_cbs()
424 qopt->hicredit, qopt->locredit); in tc_setup_cbs()
[all …]
/Linux-v6.1/drivers/net/ethernet/hisilicon/hns3/hns3pf/
Dhclge_dcb.c487 if (!mqprio_qopt->qopt.num_tc) { in hclge_mqprio_qopt_check()
488 mqprio_qopt->qopt.num_tc = 1; in hclge_mqprio_qopt_check()
492 ret = hclge_dcb_common_validate(hdev, mqprio_qopt->qopt.num_tc, in hclge_mqprio_qopt_check()
493 mqprio_qopt->qopt.prio_tc_map); in hclge_mqprio_qopt_check()
497 for (i = 0; i < mqprio_qopt->qopt.num_tc; i++) { in hclge_mqprio_qopt_check()
498 if (!is_power_of_2(mqprio_qopt->qopt.count[i])) { in hclge_mqprio_qopt_check()
504 if (mqprio_qopt->qopt.count[i] > hdev->pf_rss_size_max) { in hclge_mqprio_qopt_check()
511 if (mqprio_qopt->qopt.offset[i] != queue_sum) { in hclge_mqprio_qopt_check()
523 queue_sum = mqprio_qopt->qopt.offset[i]; in hclge_mqprio_qopt_check()
524 queue_sum += mqprio_qopt->qopt.count[i]; in hclge_mqprio_qopt_check()
[all …]
/Linux-v6.1/drivers/net/ethernet/aquantia/atlantic/
Daq_main.c420 err = aq_validate_mqprio_opt(aq_nic, mqprio, mqprio->qopt.num_tc); in aq_ndo_setup_tc()
424 for (i = 0; i < mqprio->qopt.num_tc; i++) { in aq_ndo_setup_tc()
440 return aq_nic_setup_tc_mqprio(aq_nic, mqprio->qopt.num_tc, in aq_ndo_setup_tc()
441 mqprio->qopt.prio_tc_map); in aq_ndo_setup_tc()
/Linux-v6.1/drivers/net/ethernet/ti/
Dcpsw_priv.c932 struct tc_cbs_qopt_offload *qopt) in cpsw_set_cbs() argument
941 tc = netdev_txq_to_tc(priv->ndev, qopt->queue); in cpsw_set_cbs()
954 if (!qopt->enable && !priv->fifo_bw[fifo]) in cpsw_set_cbs()
976 bw = qopt->enable ? qopt->idleslope : 0; in cpsw_set_cbs()
1001 num_tc = mqprio->qopt.num_tc; in cpsw_set_mqprio()
1014 tc = mqprio->qopt.prio_tc_map[i]; in cpsw_set_mqprio()
1021 count = mqprio->qopt.count[i]; in cpsw_set_mqprio()
1022 offset = mqprio->qopt.offset[i]; in cpsw_set_mqprio()
1027 if (!mqprio->qopt.hw) { in cpsw_set_mqprio()
1033 priv->mqprio_hw = mqprio->qopt.hw; in cpsw_set_mqprio()

12