Hi Leandro, Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master] url: https://github.com/0day-ci/linux/commits/Leandro-Dorileo/net-sched-taprio-fix-picos_per_byte-miscalculation/20190410-083853 config: i386-randconfig-m3-201914 (attached as .config) compiler: gcc-7 (Debian 7.3.0-1) 7.3.0 reproduce: # save the attached .config to linux build tree make ARCH=i386 All errors (new ones prefixed by >>): net/sched/sch_taprio.o: In function `advance_sched': >> net/sched/sch_taprio.c:245: undefined reference to `__divdi3' net/sched/sch_taprio.o: In function `length_to_duration': net/sched/sch_taprio.c:124: undefined reference to `__divdi3' net/sched/sch_taprio.o: In function `taprio_start_sched': net/sched/sch_taprio.c:579: undefined reference to `__divdi3' vim +245 net/sched/sch_taprio.c 211 212 static enum hrtimer_restart advance_sched(struct hrtimer *timer) 213 { 214 struct taprio_sched *q = container_of(timer, struct taprio_sched, 215 advance_timer); 216 struct sched_entry *entry, *next; 217 struct Qdisc *sch = q->root; 218 ktime_t close_time; 219 220 spin_lock(&q->current_entry_lock); 221 entry = rcu_dereference_protected(q->current_entry, 222 lockdep_is_held(&q->current_entry_lock)); 223 224 /* This is the case that it's the first time that the schedule 225 * runs, so it only happens once per schedule. The first entry 226 * is pre-calculated during the schedule initialization. 227 */ 228 if (unlikely(!entry)) { 229 next = list_first_entry(&q->entries, struct sched_entry, 230 list); 231 close_time = next->close_time; 232 goto first_run; 233 } 234 235 if (should_restart_cycle(q, entry)) 236 next = list_first_entry(&q->entries, struct sched_entry, 237 list); 238 else 239 next = list_next_entry(entry, list); 240 241 close_time = ktime_add_ns(entry->close_time, next->interval); 242 243 next->close_time = close_time; 244 atomic_set(&next->budget, > 245 (next->interval * 1000) / > atomic64_read(&q->picos_per_byte)); 246 247 first_run: 248 rcu_assign_pointer(q->current_entry, next); 249 spin_unlock(&q->current_entry_lock); 250 251 hrtimer_set_expires(&q->advance_timer, close_time); 252 253 rcu_read_lock(); 254 __netif_schedule(sch); 255 rcu_read_unlock(); 256 257 return HRTIMER_RESTART; 258 } 259 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation
.config.gz
Description: application/gzip