Lines Matching +full:tcs +full:- +full:offset
1 // SPDX-License-Identifier: GPL-2.0-only
26 for (i = 0; i < qopt->num_tc; i++) { in mqprio_validate_queue_counts()
27 unsigned int last = qopt->offset[i] + qopt->count[i]; in mqprio_validate_queue_counts()
29 if (!qopt->count[i]) { in mqprio_validate_queue_counts()
32 return -EINVAL; in mqprio_validate_queue_counts()
38 if (qopt->offset[i] >= dev->real_num_tx_queues || in mqprio_validate_queue_counts()
39 last > dev->real_num_tx_queues) { in mqprio_validate_queue_counts()
42 qopt->count[i], qopt->offset[i], in mqprio_validate_queue_counts()
43 i, dev->real_num_tx_queues); in mqprio_validate_queue_counts()
44 return -EINVAL; in mqprio_validate_queue_counts()
50 /* Verify that the offset and counts do not overlap */ in mqprio_validate_queue_counts()
51 for (j = i + 1; j < qopt->num_tc; j++) { in mqprio_validate_queue_counts()
52 if (intervals_overlap(qopt->offset[i], last, in mqprio_validate_queue_counts()
53 qopt->offset[j], in mqprio_validate_queue_counts()
54 qopt->offset[j] + in mqprio_validate_queue_counts()
55 qopt->count[j])) { in mqprio_validate_queue_counts()
58 i, qopt->count[i], qopt->offset[i], in mqprio_validate_queue_counts()
59 j, qopt->count[j], qopt->offset[j]); in mqprio_validate_queue_counts()
60 return -EINVAL; in mqprio_validate_queue_counts()
76 if (qopt->num_tc > TC_MAX_QUEUE) { in mqprio_validate_qopt()
79 return -EINVAL; in mqprio_validate_qopt()
82 /* Verify priority mapping uses valid tcs */ in mqprio_validate_qopt()
84 if (qopt->prio_tc_map[i] >= qopt->num_tc) { in mqprio_validate_qopt()
87 return -EINVAL; in mqprio_validate_qopt()
107 qopt->num_tc = num_tc; in mqprio_qopt_reconstruct()
108 memcpy(qopt->prio_tc_map, dev->prio_tc_map, sizeof(qopt->prio_tc_map)); in mqprio_qopt_reconstruct()
111 qopt->count[tc] = dev->tc_to_txq[tc].count; in mqprio_qopt_reconstruct()
112 qopt->offset[tc] = dev->tc_to_txq[tc].offset; in mqprio_qopt_reconstruct()
127 mqprio->preemptible_tcs = preemptible_tcs; in mqprio_fp_to_offload()