[PATCH v2 net 2/3] virtio_net: fix adding vids on big-endian

2018-04-18 Thread Michael S. Tsirkin
Programming vids (adding or removing them) still passes guest-endian values in the DMA buffer. That's wrong if guest is big-endian and when virtio 1 is enabled. Note: this is on top of a previous patch: virtio_net: split out ctrl buffer Fixes: 9465a7a6f ("virtio_net: enable v1.0

[PATCH v2 net 3/3] virtio_net: sparse annotation fix

2018-04-18 Thread Michael S. Tsirkin
offloads is a buffer in virtio format, should use the __virtio64 tag. Signed-off-by: Michael S. Tsirkin --- drivers/net/virtio_net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index f84fe04..c5b11f2

[PATCH v2 net 1/3] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
When sending control commands, virtio net sets up several buffers for DMA. The buffers are all part of the net device which means it's actually allocated by kvmalloc so it's in theory (on extreme memory pressure) possible to get a vmalloc'ed buffer which on some platforms means we can't DMA there.

Re: [PATCH net] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
On Thu, Apr 19, 2018 at 08:01:49AM +0300, Michael S. Tsirkin wrote: > When sending control commands, virtio net sets up several buffers for > DMA. The buffers are all part of the net device which means it's > actually allocated by kvmalloc so in theory (on extreme memory pressure) > it's possible

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 10:00:51PM -0700, Samudrala, Sridhar wrote: > On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: > > On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: > > > On 4/17/2018 5:26 PM, Siwei Liu wrote: > > > > I ran this with a few folks offline and gathered some

[PATCH net] virtio_net: split out ctrl buffer

2018-04-18 Thread Michael S. Tsirkin
When sending control commands, virtio net sets up several buffers for DMA. The buffers are all part of the net device which means it's actually allocated by kvmalloc so in theory (on extreme memory pressure) it's possible to get a vmalloc'ed buffer which on some platforms means we can't DMA there.

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 9:41 PM, Michael S. Tsirkin wrote: On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a few folks offline and gathered some good feedbacks that I'd like to share thus revive the discussion. First of all, as

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 04:33:34PM -0700, Samudrala, Sridhar wrote: > On 4/17/2018 5:26 PM, Siwei Liu wrote: > > I ran this with a few folks offline and gathered some good feedbacks > > that I'd like to share thus revive the discussion. > > > > First of all, as illustrated in the reply below,

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 10:32:06PM +0200, Jiri Pirko wrote: > >> >> > With regards to alternate names for 'active', you suggested 'stolen', > >> >> > but i > >> >> > am not too happy with it. > >> >> > netvsc uses vf_netdev, are you OK with this? Or another option is > >> >> > 'passthru' > >> >>

Re: [virtio-dev] Re: [RFC PATCH 2/3] netdev: kernel-only IFF_HIDDEN netdevice

2018-04-18 Thread Samudrala, Sridhar
On 4/17/2018 5:26 PM, Siwei Liu wrote: I ran this with a few folks offline and gathered some good feedbacks that I'd like to share thus revive the discussion. First of all, as illustrated in the reply below, cloud service providers require transparent live migration. Specifically, the main

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 1:32 PM, Jiri Pirko wrote: You still use "active"/"backup" names which is highly misleading as it has completely different meaning that in bond for example. I noted that in my previous review already. Please change it. I guess the issue is with only the 'active'  name. 'backup'

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 18, 2018 at 09:46:04PM CEST, m...@redhat.com wrote: >On Wed, Apr 18, 2018 at 09:13:15PM +0200, Jiri Pirko wrote: >> Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: >> >On 4/18/2018 2:25 AM, Jiri Pirko wrote: >> >> Wed, Apr 11, 2018 at 09:13:52PM CEST,

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 09:13:15PM +0200, Jiri Pirko wrote: > Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: > >On 4/18/2018 2:25 AM, Jiri Pirko wrote: > >> Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: > >> > On 4/11/2018 8:51 AM, Jiri Pirko

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 18, 2018 at 08:43:15PM CEST, sridhar.samudr...@intel.com wrote: >On 4/18/2018 2:25 AM, Jiri Pirko wrote: >> Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: >> > On 4/11/2018 8:51 AM, Jiri Pirko wrote: >> > > Tue, Apr 10, 2018 at 08:59:48PM CEST,

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Samudrala, Sridhar
On 4/18/2018 2:25 AM, Jiri Pirko wrote: Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: On 4/11/2018 8:51 AM, Jiri Pirko wrote: Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: This provides a generic interface for paravirtual drivers to listen

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 01:47:21PM -0400, David Miller wrote: > From: Eric Dumazet > Date: Wed, 18 Apr 2018 09:51:25 -0700 > > > I suggest that virtio_net clearly identifies which part needs a specific > > allocation > > and does its itself, instead of abusing the

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, David Miller wrote: > From: Eric Dumazet > Date: Wed, 18 Apr 2018 09:51:25 -0700 > > > I suggest that virtio_net clearly identifies which part needs a specific > > allocation > > and does its itself, instead of abusing the netdev_priv storage. > >

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, David Miller wrote: > From: Mikulas Patocka > Date: Wed, 18 Apr 2018 12:44:25 -0400 (EDT) > > > The structure net_device is followed by arbitrary driver-specific data > > (accessible with the function netdev_priv). And for virtio-net, these > >

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, Eric Dumazet wrote: > > > On 04/18/2018 09:44 AM, Mikulas Patocka wrote: > > > > > > On Wed, 18 Apr 2018, Eric Dumazet wrote: > > > >> > >> > >> On 04/18/2018 07:34 AM, Mikulas Patocka wrote: > >>> The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread David Miller
From: Eric Dumazet Date: Wed, 18 Apr 2018 09:51:25 -0700 > I suggest that virtio_net clearly identifies which part needs a specific > allocation > and does its itself, instead of abusing the netdev_priv storage. > > Ie use a pointer to a block of memory, allocated by

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread David Miller
From: Mikulas Patocka Date: Wed, 18 Apr 2018 12:44:25 -0400 (EDT) > The structure net_device is followed by arbitrary driver-specific data > (accessible with the function netdev_priv). And for virtio-net, these > driver-specific data must be in DMA memory. And we are

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Eric Dumazet
On 04/18/2018 09:44 AM, Mikulas Patocka wrote: > > > On Wed, 18 Apr 2018, Eric Dumazet wrote: > >> >> >> On 04/18/2018 07:34 AM, Mikulas Patocka wrote: >>> The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if kzalloc >>> fails (later patches change it to kvzalloc). >>> >>> The

Re: [PATCH] net: don't use kvzalloc for DMA memory

2018-04-18 Thread Mikulas Patocka
On Wed, 18 Apr 2018, Eric Dumazet wrote: > > > On 04/18/2018 07:34 AM, Mikulas Patocka wrote: > > The patch 74d332c13b21 changes alloc_netdev_mqs to use vzalloc if kzalloc > > fails (later patches change it to kvzalloc). > > > > The problem with this is that if the vzalloc function is

Re: [RFC] virtio: Use DMA MAP API for devices without an IOMMU

2018-04-18 Thread Michael S. Tsirkin
On Wed, Apr 18, 2018 at 08:47:10AM +0530, Anshuman Khandual wrote: > On 04/15/2018 05:41 PM, Christoph Hellwig wrote: > > On Fri, Apr 06, 2018 at 06:37:18PM +1000, Benjamin Herrenschmidt wrote: > implemented as DMA API which the virtio core understands. There is no > need for an IOMMU to

Re: [PATCH] drm: Print unadorned pointers

2018-04-18 Thread Greg Kroah-Hartman
On Wed, Apr 18, 2018 at 12:24:50PM +0300, Alexey Brodkin wrote: > After commit ad67b74 ("printk: hash addresses printed with %p") > pointers are being hashed when printed. However, this makes > debug output completely useless. Switch to %px in order to see the > unadorned kernel pointers. > >

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-18 Thread Michael S. Tsirkin
On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: > On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: > > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: > >> Now that we have SCTP offload capabilities in the kernel, we can add > >> them to virtio as well.

Re: [RFC PATCH net-next v6 2/4] net: Introduce generic bypass module

2018-04-18 Thread Jiri Pirko
Wed, Apr 11, 2018 at 09:13:52PM CEST, sridhar.samudr...@intel.com wrote: >On 4/11/2018 8:51 AM, Jiri Pirko wrote: >> Tue, Apr 10, 2018 at 08:59:48PM CEST, sridhar.samudr...@intel.com wrote: >> > This provides a generic interface for paravirtual drivers to listen >> > for netdev

Re: [PATCH net-next 0/5] virtio-net: Add SCTP checksum offload support

2018-04-18 Thread Xin Long
On Wed, Apr 18, 2018 at 9:33 AM, Marcelo Ricardo Leitner wrote: > On Tue, Apr 17, 2018 at 04:35:18PM -0400, Vlad Yasevich wrote: >> On 04/02/2018 10:47 AM, Marcelo Ricardo Leitner wrote: >> > On Mon, Apr 02, 2018 at 09:40:01AM -0400, Vladislav Yasevich wrote: >> >> Now