[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANn89iLrk_iQ8MJTLcueijnmowkuJEVSO_kBmm7y8Z--AGpz4g@mail.gmail.com>
Date: Sun, 17 Apr 2022 15:41:40 -0700
From: Eric Dumazet <edumazet@...gle.com>
To: Cong Wang <xiyou.wangcong@...il.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>,
Jamal Hadi Salim <jhs@...atatu.com>,
Jiri Pirko <jiri@...nulli.us>, netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next] net_sched: make qdisc_reset() smaller
On Sun, Apr 17, 2022 at 3:30 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
>
> On Wed, Apr 13, 2022 at 6:11 PM Eric Dumazet <eric.dumazet@...il.com> wrote:
> >
> > From: Eric Dumazet <edumazet@...gle.com>
> >
> > For some unknown reason qdisc_reset() is using
> > a convoluted way of freeing two lists of skbs.
> >
> > Use __skb_queue_purge() instead.
> [...]
> >
> > - skb_queue_walk_safe(&qdisc->gso_skb, skb, tmp) {
> > - __skb_unlink(skb, &qdisc->gso_skb);
> > - kfree_skb_list(skb);
>
> Isn't it precisely because of this kfree_skb_list()?
Note the __skb_unlink(skb, &qdisc->gso_skb) which happens at the line above.
__skb_unlink(...)
{
...
skb->next = skb->prev = NULL;
...
}
This means skb->next is NULL, thus there is no list of skb attached to @skb ?
kfree_skb_list(skb) is thus a convoluted way to call kfree_skb(skb)
It seems to me that this construct had been copy/pasted from elsewhere.
Powered by blists - more mailing lists