diff mbox series

[net-next,v1,1/4] etf: Cancel timer if there are no pending skbs

Message ID 20181115012635.7272-1-vinicius.gomes@intel.com
State Accepted, archived
Delegated to: David Miller
Headers show
Series [net-next,v1,1/4] etf: Cancel timer if there are no pending skbs | expand

Commit Message

Vinicius Costa Gomes Nov. 15, 2018, 1:26 a.m. UTC
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(-)

Comments

David Miller Nov. 17, 2018, 4:39 a.m. UTC | #1
From: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Date: Wed, 14 Nov 2018 17:26:32 -0800

> 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>

Applied.
Vinicius Costa Gomes Dec. 3, 2018, 7:19 p.m. UTC | #2
Hi,

Vinicius Costa Gomes <vinicius.gomes@intel.com> writes:

> 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>

It seems that I made a mistake when submitting this series.

It should have been proposed to the net tree (instead of net-next) and
should have included a "Fixes" tag.

Is there a way to have this series considered for the net tree at this
point (given that it already landed on net-next)?


Cheers,
--
Vinicius
diff mbox series

Patch

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