sch_taprio.c (b7f8f259896f669f131713b0c74ba4d008daa71d) sch_taprio.c (ed8157f1ebf1ae81a8fa2653e3f20d2076fad1c9)
1// SPDX-License-Identifier: GPL-2.0
2
3/* net/sched/sch_taprio.c Time Aware Priority Scheduler
4 *
5 * Authors: Vinicius Costa Gomes <vinicius.gomes@intel.com>
6 *
7 */
8

--- 887 unchanged lines hidden (view full) ---

896 return err;
897
898 if (!new->cycle_time) {
899 struct sched_entry *entry;
900 ktime_t cycle = 0;
901
902 list_for_each_entry(entry, &new->entries, list)
903 cycle = ktime_add_ns(cycle, entry->interval);
1// SPDX-License-Identifier: GPL-2.0
2
3/* net/sched/sch_taprio.c Time Aware Priority Scheduler
4 *
5 * Authors: Vinicius Costa Gomes <vinicius.gomes@intel.com>
6 *
7 */
8

--- 887 unchanged lines hidden (view full) ---

896 return err;
897
898 if (!new->cycle_time) {
899 struct sched_entry *entry;
900 ktime_t cycle = 0;
901
902 list_for_each_entry(entry, &new->entries, list)
903 cycle = ktime_add_ns(cycle, entry->interval);
904
905 if (!cycle) {
906 NL_SET_ERR_MSG(extack, "'cycle_time' can never be 0");
907 return -EINVAL;
908 }
909
904 new->cycle_time = cycle;
905 }
906
907 return 0;
908}
909
910static int taprio_parse_mqprio_opt(struct net_device *dev,
911 struct tc_mqprio_qopt *qopt,

--- 1091 unchanged lines hidden ---
910 new->cycle_time = cycle;
911 }
912
913 return 0;
914}
915
916static int taprio_parse_mqprio_opt(struct net_device *dev,
917 struct tc_mqprio_qopt *qopt,

--- 1091 unchanged lines hidden ---