[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250422174406.38cc5155@kernel.org>
Date: Tue, 22 Apr 2025 17:44:06 -0700
From: Jakub Kicinski <kuba@...nel.org>
To: Victor Nogueira <victor@...atatu.com>
Cc: netdev@...r.kernel.org, jhs@...atatu.com, xiyou.wangcong@...il.com,
jiri@...nulli.us, davem@...emloft.net, edumazet@...gle.com,
pabeni@...hat.com, toke@...hat.com, gerrard.tai@...rlabs.sg,
pctammela@...atatu.com
Subject: Re: [PATCH net v2 1/5] net_sched: drr: Fix double list add in class
with netem as child qdisc
On Wed, 16 Apr 2025 07:24:23 -0300 Victor Nogueira wrote:
> +static bool cl_is_initialised(struct drr_class *cl)
cl_is_active() ?
Had to look at the code to figure out what it does, but doesn't seem to
have much to do with being "initialised". The point is that the list
node of this class is not on the list of active classes.
> + return !list_empty(&cl->alist);
> +}
> +
> static struct drr_class *drr_find_class(struct Qdisc *sch, u32 classid)
> {
> struct drr_sched *q = qdisc_priv(sch);
> @@ -357,7 +362,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
> return err;
> }
>
> - if (first) {
> + if (first && !cl_is_initialised(cl)) {
I think we can delete the "first" check and temp variable.
The code under the if() does not touch the packet so it doesn't matter
whether we execute it for the initial or the nested call, right?
Powered by blists - more mailing lists