On 02/27/2019 06:46 PM, Cong Wang wrote:
> Hmm, looking into this, do we really need to check cl->leaf.q->q.qlen
> in htb_activate() for pfifo_fast? htb_activate() is only called when
> qdisc_enqueue() returns NET_XMIT_SUCCESS, so for pfifo_fast
> that is always qlen!=0, right?
>
> So something like below? It is ugly but should be sufficient to shut
> up the warning.
>
> diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
> index 30f9da7e1076..6d0182750f8b 100644
> --- a/net/sched/sch_htb.c
> +++ b/net/sched/sch_htb.c
> @@ -555,7 +555,8 @@ htb_change_class_mode(struct htb_sched *q, struct
> htb_class *cl, s64 *diff)
> */
> static inline void htb_activate(struct htb_sched *q, struct htb_class *cl)
> {
> - WARN_ON(cl->level || !cl->leaf.q || !cl->leaf.q->q.qlen);
> + WARN_ON(cl->level || !cl->leaf.q ||
> + (!(cl->leaf.q->flags & TCQ_F_NOLOCK) && !cl->leaf.q->q.qlen));
>
> if (!cl->prio_activity) {
> cl->prio_activity = 1 << cl->prio;
>
Well, this is the tip of the iceberg.
Look at lines 845 & 883
How are we going to fix them ?
(Then there are all the other qdisc I mentioned)