Lines Matching refs:sched

113 					    struct sched_gate_list *sched)  in taprio_calculate_gate_durations()  argument
120 list_for_each_entry(entry, &sched->entries, list) { in taprio_calculate_gate_durations()
143 cur = list_next_entry_circular(cur, &sched->entries, list); in taprio_calculate_gate_durations()
152 sched->max_open_gate_duration[tc] < entry->gate_duration[tc]) in taprio_calculate_gate_durations()
153 sched->max_open_gate_duration[tc] = entry->gate_duration[tc]; in taprio_calculate_gate_durations()
163 static ktime_t sched_base_time(const struct sched_gate_list *sched) in sched_base_time() argument
165 if (!sched) in sched_base_time()
168 return ns_to_ktime(sched->base_time); in sched_base_time()
191 struct sched_gate_list *sched = container_of(head, struct sched_gate_list, rcu); in taprio_free_sched_cb() local
194 list_for_each_entry_safe(entry, n, &sched->entries, list) { in taprio_free_sched_cb()
199 kfree(sched); in taprio_free_sched_cb()
217 static s32 get_cycle_time_elapsed(struct sched_gate_list *sched, ktime_t time) in get_cycle_time_elapsed() argument
222 time_since_sched_start = ktime_sub(time, sched->base_time); in get_cycle_time_elapsed()
223 div_s64_rem(time_since_sched_start, sched->cycle_time, &time_elapsed); in get_cycle_time_elapsed()
228 static ktime_t get_interval_end_time(struct sched_gate_list *sched, in get_interval_end_time() argument
233 s32 cycle_elapsed = get_cycle_time_elapsed(sched, intv_start); in get_interval_end_time()
236 cycle_end = ktime_add_ns(intv_start, sched->cycle_time - cycle_elapsed); in get_interval_end_time()
238 cycle_ext_end = ktime_add(cycle_end, sched->cycle_time_extension); in get_interval_end_time()
242 else if (admin && admin != sched && in get_interval_end_time()
265 struct sched_gate_list *sched, in taprio_update_queue_max_sdu() argument
281 if (sched->max_open_gate_duration[tc] == sched->cycle_time) { in taprio_update_queue_max_sdu()
286 max_frm_len = duration_to_length(q, sched->max_open_gate_duration[tc]); in taprio_update_queue_max_sdu()
303 sched->max_frm_len[tc] = max_sdu + dev->hard_header_len; in taprio_update_queue_max_sdu()
304 sched->max_sdu[tc] = max_sdu; in taprio_update_queue_max_sdu()
306 sched->max_frm_len[tc] = U32_MAX; /* never oversized */ in taprio_update_queue_max_sdu()
307 sched->max_sdu[tc] = 0; in taprio_update_queue_max_sdu()
318 struct sched_gate_list *sched, in find_entry_to_transmit() argument
340 if (!sched) in find_entry_to_transmit()
343 cycle = sched->cycle_time; in find_entry_to_transmit()
344 cycle_elapsed = get_cycle_time_elapsed(sched, time); in find_entry_to_transmit()
348 list_for_each_entry(entry, &sched->entries, list) { in find_entry_to_transmit()
350 curr_intv_end = get_interval_end_time(sched, admin, entry, in find_entry_to_transmit()
396 struct sched_gate_list *sched, *admin; in is_valid_interval() local
401 sched = rcu_dereference(q->oper_sched); in is_valid_interval()
404 entry = find_entry_to_transmit(skb, sch, sched, admin, skb->tstamp, in is_valid_interval()
478 struct sched_gate_list *sched, *admin; in get_packet_txtime() local
492 sched = rcu_dereference(q->oper_sched); in get_packet_txtime()
494 switch_schedules(q, &admin, &sched); in get_packet_txtime()
497 if (!sched || ktime_before(minimum_time, sched->base_time)) { in get_packet_txtime()
508 entry = find_entry_to_transmit(skb, sch, sched, admin, in get_packet_txtime()
521 if (admin && admin != sched && in get_packet_txtime()
523 sched = admin; in get_packet_txtime()
535 entry->next_txtime = ktime_add(interval_start, sched->cycle_time); in get_packet_txtime()
551 struct sched_gate_list *sched; in taprio_skb_exceeds_queue_max_sdu() local
559 sched = rcu_dereference(q->oper_sched); in taprio_skb_exceeds_queue_max_sdu()
560 if (sched && skb->len > sched->max_frm_len[tc]) in taprio_skb_exceeds_queue_max_sdu()
668 struct sched_gate_list *sched, in taprio_set_budgets() argument
677 if (entry->gate_duration[tc] == sched->cycle_time) in taprio_set_budgets()
1091 struct sched_gate_list *sched, in parse_sched_list() argument
1121 list_add_tail(&entry->list, &sched->entries); in parse_sched_list()
1125 sched->num_entries = i; in parse_sched_list()
1213 struct sched_gate_list *sched, in taprio_get_start_time() argument
1220 base = sched_base_time(sched); in taprio_get_start_time()
1228 cycle = sched->cycle_time; in taprio_get_start_time()
1247 struct sched_gate_list *sched, ktime_t base) in setup_first_end_time() argument
1255 first = list_first_entry(&sched->entries, in setup_first_end_time()
1258 cycle = sched->cycle_time; in setup_first_end_time()
1261 sched->cycle_end_time = ktime_add_ns(base, cycle); in setup_first_end_time()
1264 taprio_set_budgets(q, sched, first); in setup_first_end_time()
1267 if (first->gate_duration[tc] == sched->cycle_time) in setup_first_end_time()
1358 struct sched_gate_list *sched, ktime_t base) in setup_txtime() argument
1363 list_for_each_entry(entry, &sched->entries, list) { in setup_txtime()
1453 struct sched_gate_list *sched, in taprio_sched_to_offload() argument
1460 offload->base_time = sched->base_time; in taprio_sched_to_offload()
1461 offload->cycle_time = sched->cycle_time; in taprio_sched_to_offload()
1462 offload->cycle_time_extension = sched->cycle_time_extension; in taprio_sched_to_offload()
1464 list_for_each_entry(entry, &sched->entries, list) { in taprio_sched_to_offload()
1511 struct sched_gate_list *sched, in taprio_enable_offload() argument
1538 offload = taprio_offload_alloc(sched->num_entries); in taprio_enable_offload()
1548 taprio_sched_to_offload(dev, sched, offload, &caps); in taprio_enable_offload()
2293 struct sched_gate_list *sched) in taprio_dump_tc_entries() argument
2307 sched->max_sdu[tc])) in taprio_dump_tc_entries()