All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <edumazet@google.com>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Eric Dumazet <eric.dumazet@gmail.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Jamal Hadi Salim <jhs@mojatatu.com>,
	Jiri Pirko <jiri@resnulli.us>, netdev <netdev@vger.kernel.org>
Subject: Re: [PATCH net-next] net_sched: make qdisc_reset() smaller
Date: Sun, 17 Apr 2022 15:41:40 -0700	[thread overview]
Message-ID: <CANn89iLrk_iQ8MJTLcueijnmowkuJEVSO_kBmm7y8Z--AGpz4g@mail.gmail.com> (raw)
In-Reply-To: <CAM_iQpXb=-hdGbdbpTbDBGJKyYPhn3SxXUUowHg5gTy20W=iiQ@mail.gmail.com>

On Sun, Apr 17, 2022 at 3:30 PM Cong Wang <xiyou.wangcong@gmail.com> wrote:
>
> On Wed, Apr 13, 2022 at 6:11 PM Eric Dumazet <eric.dumazet@gmail.com> wrote:
> >
> > From: Eric Dumazet <edumazet@google.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.

      reply	other threads:[~2022-04-17 22:41 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-14  1:10 [PATCH net-next] net_sched: make qdisc_reset() smaller Eric Dumazet
2022-04-14 16:08 ` Jamal Hadi Salim
2022-04-15 21:30 ` patchwork-bot+netdevbpf
2022-04-17 22:30 ` Cong Wang
2022-04-17 22:41   ` Eric Dumazet [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CANn89iLrk_iQ8MJTLcueijnmowkuJEVSO_kBmm7y8Z--AGpz4g@mail.gmail.com \
    --to=edumazet@google.com \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=xiyou.wangcong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.