netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kubakici@wp.pl>
To: John Fastabend <john.fastabend@gmail.com>
Cc: xiyou.wangcong@gmail.com, jiri@resnulli.us, davem@davemloft.net,
	netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH] net: Revert "net_sched: no need to free qdisc in RCU callback"
Date: Wed, 20 Dec 2017 13:59:59 -0800	[thread overview]
Message-ID: <20171220135959.3ff075ac@cakuba.netronome.com> (raw)
In-Reply-To: <20171220200919.6233.48192.stgit@john-Precision-Tower-5810>

On Wed, 20 Dec 2017 12:09:19 -0800, John Fastabend wrote:
> RCU grace period is needed for lockless qdiscs added in the commit
> c5ad119fb6c09 ("net: sched: pfifo_fast use skb_array").
> 
> It is needed now that qdiscs may be lockless otherwise we risk
> free'ing a qdisc that is still in use from datapath. Additionally,
> push list cleanup into RCU callback. Otherwise we risk the datapath
> adding skbs during removal.
> 
> Fixes: c5ad119fb6c09 ("net: sched: pfifo_fast use skb_array")
> Signed-off-by: John Fastabend <john.fastabend@gmail.com>

Seems like this revert may be too heavy handed:

# ./tools/testing/selftests/bpf/test_offload.py --log /tmp/log
Test destruction of generic XDP...
Test TC non-offloaded...
Test TC non-offloaded isn't getting bound...
Test TC offloads are off by default...
Test TC offload by default...
Test TC cBPF bytcode tries offload by default...
Test TC cBPF unbound bytecode doesn't offload...
Test TC offloads work...
FAIL: TC filter did not load with TC offloads enabled

And it's triggering:

WARNING: CPU: 15 PID: 1853 at ../drivers/net/netdevsim/bpf.c:372 nsim_bpf_uninit+0x2e/0x41 [netdevsim]

Which is:

   368	void nsim_bpf_uninit(struct netdevsim *ns)
   369	{
   370		WARN_ON(!list_empty(&ns->bpf_bound_progs));
   371		WARN_ON(ns->xdp_prog);
>> 372		WARN_ON(ns->bpf_offloaded);
   373	}

(Meaning the offload was not stopped by the stack before ndo_uninit.)

  reply	other threads:[~2017-12-20 22:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-20 20:09 [PATCH] net: Revert "net_sched: no need to free qdisc in RCU callback" John Fastabend
2017-12-20 21:59 ` Jakub Kicinski [this message]
2017-12-20 23:40   ` John Fastabend
2017-12-20 22:41 ` Cong Wang
2017-12-20 23:05   ` John Fastabend
2017-12-20 23:23     ` Cong Wang
2017-12-20 23:34       ` John Fastabend
2017-12-21  8:39         ` Jiri Pirko
2017-12-21 20:59           ` Cong Wang
2017-12-22  9:35             ` Jiri Pirko

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=20171220135959.3ff075ac@cakuba.netronome.com \
    --to=kubakici@wp.pl \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=jiri@resnulli.us \
    --cc=john.fastabend@gmail.com \
    --cc=netdev@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).