Re: virtio_net: suspicious RCU usage with xdp

2019-04-27 Thread Jason Wang
On 2019/4/26 下午7:05, Jesper Dangaard Brouer wrote: On Fri, 26 Apr 2019 16:00:28 +0800 Jason Wang wrote: On 2019/4/26 上午1:41, Jesper Dangaard Brouer wrote: It does sound like my commit 5d053f9da431 ("bpf: devmap prepare xdp frames for bulking") introduced this issue. I guess we can add the

Re: virtio_net: suspicious RCU usage with xdp

2019-04-26 Thread Jesper Dangaard Brouer
On Fri, 26 Apr 2019 16:00:28 +0800 Jason Wang wrote: > On 2019/4/26 上午1:41, Jesper Dangaard Brouer wrote: > > It does sound like my commit 5d053f9da431 ("bpf: devmap prepare xdp > > frames for bulking") introduced this issue. I guess we can add the RCU > > section to xdp_do_flush_map(), and then

Re: virtio_net: suspicious RCU usage with xdp

2019-04-26 Thread Jason Wang
On 2019/4/26 上午1:41, Jesper Dangaard Brouer wrote: It does sound like my commit 5d053f9da431 ("bpf: devmap prepare xdp frames for bulking") introduced this issue. I guess we can add the RCU section to xdp_do_flush_map(), and then also verify that the devmap (and cpumap) take-down code also hav

Re: virtio_net: suspicious RCU usage with xdp

2019-04-26 Thread Toshiaki Makita
On 2019/04/26 2:41, Jesper Dangaard Brouer wrote: > On Thu, 25 Apr 2019 13:03:39 -0400 > "Michael S. Tsirkin" wrote: > >> On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: >>> On 2019/04/25 2:37, Michael S. Tsirkin wrote: On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Jesper Dangaard Brouer
On Thu, 25 Apr 2019 20:54:11 +0200 Maciej Fijalkowski wrote: > On Thu, 25 Apr 2019 11:44:27 -0600 > David Ahern wrote: > > > On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > > > On Thu, 25 Apr 2019 13:03:39 -0400 > > > "Michael S. Tsirkin" wrote: > > > > > >> On Thu, Apr 25, 2019 at

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread David Ahern
On 4/25/19 12:54 PM, Maciej Fijalkowski wrote: >> >> virtio_net hits this because of: >>xdp_prog = rcu_dereference(rq->xdp_prog); >> >> in its ndo_xdp_xmit. Scanning ndo_xdp_xmit for other nics does not show >> this same check. Is it really required? If so, why don't other drivers >> do it? >

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Maciej Fijalkowski
On Thu, 25 Apr 2019 11:44:27 -0600 David Ahern wrote: > On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > > On Thu, 25 Apr 2019 13:03:39 -0400 > > "Michael S. Tsirkin" wrote: > > > >> On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > >>> On 2019/04/25 2:37, Michael S. Ts

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread David Ahern
On 4/25/19 11:41 AM, Jesper Dangaard Brouer wrote: > On Thu, 25 Apr 2019 13:03:39 -0400 > "Michael S. Tsirkin" wrote: > >> On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: >>> On 2019/04/25 2:37, Michael S. Tsirkin wrote: On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Aher

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Jesper Dangaard Brouer
On Thu, 25 Apr 2019 13:03:39 -0400 "Michael S. Tsirkin" wrote: > On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > > On 2019/04/25 2:37, Michael S. Tsirkin wrote: > > > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > > >> seeing an RCU warning testing xdp with

Re: virtio_net: suspicious RCU usage with xdp

2019-04-25 Thread Michael S. Tsirkin
On Thu, Apr 25, 2019 at 01:58:48PM +0900, Toshiaki Makita wrote: > On 2019/04/25 2:37, Michael S. Tsirkin wrote: > > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > >> seeing an RCU warning testing xdp with virtio net. net-next as of commit > >> b2f97f7de2f6a4df8e431330cf467576486651

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Toshiaki Makita
On 2019/04/25 2:37, Michael S. Tsirkin wrote: > On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: >> seeing an RCU warning testing xdp with virtio net. net-next as of commit >> b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping >> this rings a bell with someone else.

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Jason Wang
On 2019/4/25 上午1:40, David Ahern wrote: On 4/24/19 11:37 AM, Michael S. Tsirkin wrote: diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 9010938e2d71..ccc1bdd1bb1f 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -495,8 +495,8 @@ static struct send_q

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Jason Wang
On 2019/4/25 上午1:37, Michael S. Tsirkin wrote: On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: seeing an RCU warning testing xdp with virtio net. net-next as of commit b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping this rings a bell with someone else. [

virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread David Ahern
seeing an RCU warning testing xdp with virtio net. net-next as of commit b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping this rings a bell with someone else. [ 121.990304] = [ 121.991488] WARNING: suspicious RCU usage [ 121.992392] 5.1.0-rc5+

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread David Ahern
On 4/24/19 11:37 AM, Michael S. Tsirkin wrote: > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 9010938e2d71..ccc1bdd1bb1f 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -495,8 +495,8 @@ static struct send_queue *virtnet_xdp_sq(struct > virt

Re: virtio_net: suspicious RCU usage with xdp

2019-04-24 Thread Michael S. Tsirkin
On Wed, Apr 24, 2019 at 11:13:42AM -0600, David Ahern wrote: > seeing an RCU warning testing xdp with virtio net. net-next as of commit > b2f97f7de2f6a4df8e431330cf467576486651c5. No obvious changes so hoping > this rings a bell with someone else. > > > [ 121.990304]