Skip to content

Commit 5ba8b83

Browse files
congwangPaolo Abeni
authored andcommitted
sch_htb: make htb_qlen_notify() idempotent
htb_qlen_notify() always deactivates the HTB class and in fact could trigger a warning if it is already deactivated. Therefore, it is not idempotent and not friendly to its callers, like fq_codel_dequeue(). Let's make it idempotent to ease qdisc_tree_reduce_backlog() callers' life. Reported-by: Gerrard Tai <[email protected]> Signed-off-by: Cong Wang <[email protected]> Reviewed-by: Simon Horman <[email protected]> Link: https://patch.msgid.link/[email protected] Acked-by: Jamal Hadi Salim <[email protected]> Signed-off-by: Paolo Abeni <[email protected]>
1 parent 69ae947 commit 5ba8b83

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

net/sched/sch_htb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1485,6 +1485,8 @@ static void htb_qlen_notify(struct Qdisc *sch, unsigned long arg)
14851485
{
14861486
struct htb_class *cl = (struct htb_class *)arg;
14871487

1488+
if (!cl->prio_activity)
1489+
return;
14881490
htb_deactivate(qdisc_priv(sch), cl);
14891491
}
14901492

0 commit comments

Comments
 (0)