[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <e3bcab30-a7a4-878b-9d00-d1fa39b1f4e9@gmail.com>
Date: Wed, 27 Feb 2019 21:15:52 -0800
From: Eric Dumazet <eric.dumazet@...il.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: John Fastabend <john.fastabend@...il.com>,
Networking <netdev@...r.kernel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>
Subject: Re: [BUG] net/sched : qlen can not really be per cpu ?
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)
Powered by blists - more mailing lists