netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v1 1/4] etf: Cancel timer if there are no pending skbs
@ 2018-11-15  1:26 Vinicius Costa Gomes
  2018-11-15  1:26 ` [PATCH net-next v1 2/4] etf: Use cached rb_root Vinicius Costa Gomes
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Vinicius Costa Gomes @ 2018-11-15  1:26 UTC (permalink / raw)
  To: netdev
  Cc: Jesus Sanchez-Palencia, jhs, xiyou.wangcong, jiri,
	jesus.s.palencia, ilias.apalodimas

From: Jesus Sanchez-Palencia <jesus.sanchez-palencia@intel.com>

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>
---
 net/sched/sch_etf.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

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));
-- 
2.19.1

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-12-03 19:19 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-11-15  1:26 [PATCH net-next v1 1/4] etf: Cancel timer if there are no pending skbs Vinicius Costa Gomes
2018-11-15  1:26 ` [PATCH net-next v1 2/4] etf: Use cached rb_root Vinicius Costa Gomes
2018-11-17  4:40   ` David Miller
2018-11-15  1:26 ` [PATCH net-next v1 3/4] etf: Split timersortedlist_erase() Vinicius Costa Gomes
2018-11-17  4:40   ` David Miller
2018-11-15  1:26 ` [PATCH net-next v1 4/4] etf: Drop all expired packets Vinicius Costa Gomes
2018-11-17  4:40   ` David Miller
2018-11-17  4:39 ` [PATCH net-next v1 1/4] etf: Cancel timer if there are no pending skbs David Miller
2018-12-03 19:19 ` Vinicius Costa Gomes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).