diff options
author | Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com> | 2018-11-14 17:26:32 -0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-11-16 20:39:34 -0800 |
commit | 3fcbdaee3b5c4a7f8ea4c7c11fecc009d2a1e7e4 (patch) | |
tree | 9126f6e6ea865112b8529e5848f424ac3ee59a8f /net/sched/sch_etf.c | |
parent | 213d7767af02a079e6d485daab30167d5d675a57 (diff) | |
download | linux-3fcbdaee3b5c4a7f8ea4c7c11fecc009d2a1e7e4.tar.bz2 |
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>
Diffstat (limited to 'net/sched/sch_etf.c')
-rw-r--r-- | net/sched/sch_etf.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/net/sched/sch_etf.c b/net/sched/sch_etf.c index 1538d6fa8165..fa85b24ac794 100644 --- a/net/sched/sch_etf.c +++ b/net/sched/sch_etf.c @@ -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)); |