Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 11:28:28AM -0700, Eric Dumazet wrote: > On Tue, 2017-08-22 at 11:01 -0700, David Miller wrote: > > From: "Michael S. Tsirkin" > > Date: Tue, 22 Aug 2017 20:55:56 +0300 > > > > > Which reminds me that skb_linearize in net core seems to be > > >

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Eric Dumazet
On Tue, 2017-08-22 at 11:01 -0700, David Miller wrote: > From: "Michael S. Tsirkin" > Date: Tue, 22 Aug 2017 20:55:56 +0300 > > > Which reminds me that skb_linearize in net core seems to be > > fundamentally racy - I suspect that if skb is cloned, and someone is > > trying to

Re: [PATCH] net/virtio-net: reverse unregistering on exit

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 04:59:51PM +0200, Pierre Morel wrote: > Hi, > > I got a problem with virtio-net in a QEMU guest. > > When virtio-net is used as a module in a guest and the network is > activated, removing the virtio-net modules produces a kernel error: > > [ 2375.624949] Last

Re: [PATCH] net/virtio-net: reverse unregistering on exit

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 04:59:52PM +0200, Pierre Morel wrote: > unregister_virtio_driver should be done before the unregistering of > the hotplug state machine callbacks, otherwise the state machine still > holds some instance states at that time. > > Let's first unregister the virtio_net_driver

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread David Miller
From: "Michael S. Tsirkin" Date: Tue, 22 Aug 2017 20:55:56 +0300 > Which reminds me that skb_linearize in net core seems to be > fundamentally racy - I suspect that if skb is cloned, and someone is > trying to use the shared frags while another thread calls skb_linearize, > we

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Michael S. Tsirkin
On Tue, Aug 22, 2017 at 10:50:41AM +0800, Jason Wang wrote: > > Perhaps the descriptor pool should also be > > revised to allow out of order completions. Then there is no need to > > copy zerocopy packets whenever they may experience delay. > > Yes, but as replied in the referenced thread,

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Willem de Bruijn
>> > An issue of the referenced patch is that sndbuf could be smaller than low >> > watermark. > We cannot determine the low watermark properly because of not only sndbuf size > issue but also the fact that the upper vhost-net cannot directly see how much > descriptor is currently available at the

[PATCH] net/virtio-net: reverse unregistering on exit

2017-08-22 Thread Pierre Morel
Hi, I got a problem with virtio-net in a QEMU guest. When virtio-net is used as a module in a guest and the network is activated, removing the virtio-net modules produces a kernel error: [ 2375.624949] Last Breaking-Event-Address: [ 2375.624954] [<001453d4>]

[PATCH] net/virtio-net: reverse unregistering on exit

2017-08-22 Thread Pierre Morel
unregister_virtio_driver should be done before the unregistering of the hotplug state machine callbacks, otherwise the state machine still holds some instance states at that time. Let's first unregister the virtio_net_driver first and then the hotplug state machine callbacks. Signed-off-by:

Re: [PATCH] vhost: fix end of range for access_ok

2017-08-22 Thread Koichiro Den
On Mon, 2017-08-21 at 22:45 +0300, Michael S. Tsirkin wrote: > During access_ok checks, addr increases as we iterate over the data > structure, thus addr + len - 1 will point beyond the end of region we > are translating.  Harmless since we then verify that the region covers > addr, but let's not

Re: [RFC 2/3] virtio-iommu: device probing and operations

2017-08-22 Thread Jean-Philippe Brucker
On 22/08/17 07:24, Tian, Kevin wrote: >>> (sorry to pick up this old thread, as the .tex one is not good for review >>> and this thread provides necessary background for IOASID). >>> >>> Hi, Jean, >>> >>> I'd like to hear more clarification regarding the relationship between >>> IOASID and PASID.

Re: [PATCH 1/2] vhost: remove the possible fruitless search on iotlb prefetch

2017-08-22 Thread Koichiro Den
On Mon, 2017-08-21 at 22:45 +0300, Michael S. Tsirkin wrote: > On Sat, Aug 19, 2017 at 03:41:14PM +0900, Koichiro Den wrote: > > Signed-off-by: Koichiro Den > > --- > >  drivers/vhost/vhost.c | 2 +- > >  1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Koichiro Den
On Tue, 2017-08-22 at 08:11 -0400, Willem de Bruijn wrote: > On Sun, Aug 20, 2017 at 4:49 PM, Willem de Bruijn > wrote: > > On Sat, Aug 19, 2017 at 2:38 AM, Koichiro Den wrote: > > > Facing the possible unbounded delay relying on freeing on

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Koichiro Den
On Mon, 2017-08-21 at 23:10 -0400, Willem de Bruijn wrote: > > > > Interesting, deadlock could be treated as a a radical case of the > > > > discussion > > > > here https://patchwork.kernel.org/patch/3787671/. > > > > > > > > git grep tells more similar skb_orphan() cases. Do we need to change >

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Willem de Bruijn
On Sun, Aug 20, 2017 at 4:49 PM, Willem de Bruijn wrote: > On Sat, Aug 19, 2017 at 2:38 AM, Koichiro Den wrote: >> Facing the possible unbounded delay relying on freeing on xmit path, >> we also better to invoke and clear the upper layer

Re: [PATCH net-next] virtio-net: invoke zerocopy callback on xmit path if no tx napi

2017-08-22 Thread Jason Wang
On 2017年08月22日 11:10, Willem de Bruijn wrote: Interesting, deadlock could be treated as a a radical case of the discussion here https://patchwork.kernel.org/patch/3787671/. git grep tells more similar skb_orphan() cases. Do we need to change them all (or part)? Most skb_orphan calls are not

Re: [PATCH] drm: virtio: constify drm_fb_helper_funcs

2017-08-22 Thread Daniel Vetter
On Mon, Aug 21, 2017 at 04:37:32PM +0530, Arvind Yadav wrote: > drm_fb_helper_funcs are not supposed to change at runtime. > All functions working with drm_fb_helper_funcs provided > by work with const drm_fb_helper_funcs. > So mark the non-const structs as const. > > Signed-off-by: Arvind Yadav

RE: [RFC 2/3] virtio-iommu: device probing and operations

2017-08-22 Thread Tian, Kevin
> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > Sent: Monday, August 21, 2017 8:00 PM > > On 21/08/17 08:59, Tian, Kevin wrote: > >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] > >> Sent: Monday, April 24, 2017 11:06 PM > >> 1. Attach device >