mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-04 18:09:57 +00:00
etf: Cancel timer if there are no pending skbs
There is no point in firing the qdisc watchdog if there are no future skbs pending in the queue and the watchdog had been set previously. Signed-off-by: Jesus Sanchez-Palencia <jesus.s.palencia@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
213d7767af
commit
3fcbdaee3b
1 changed files with 3 additions and 1 deletions
|
@ -117,8 +117,10 @@ static void reset_watchdog(struct Qdisc *sch)
|
|||
struct sk_buff *skb = etf_peek_timesortedlist(sch);
|
||||
ktime_t next;
|
||||
|
||||
if (!skb)
|
||||
if (!skb) {
|
||||
qdisc_watchdog_cancel(&q->watchdog);
|
||||
return;
|
||||
}
|
||||
|
||||
next = ktime_sub_ns(skb->tstamp, q->delta);
|
||||
qdisc_watchdog_schedule_ns(&q->watchdog, ktime_to_ns(next));
|
||||
|
|
Loading…
Reference in a new issue