Re: [PATCH net-next v3 0/5] virtio-net tx napi

2017-04-24 Thread Michael S. Tsirkin
On Mon, Apr 24, 2017 at 01:49:25PM -0400, Willem de Bruijn wrote: > From: Willem de Bruijn > > Add napi for virtio-net transmit completion processing. Acked-by: Michael S. Tsirkin > Changes: > v2 -> v3: > - convert __netif_tx_trylock to

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Mon, Apr 24, 2017 at 1:14 PM, Michael S. Tsirkin wrote: > On Mon, Apr 24, 2017 at 01:05:45PM -0400, Willem de Bruijn wrote: >> On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: >> > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote:

[PATCH net-next v3 4/5] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Amortize the cost of virtual interrupts by doing both rx and tx work on reception of a receive interrupt if tx napi is enabled. With VIRTIO_F_EVENT_IDX, this suppresses most explicit tx completion interrupts for bidirectional workloads. Signed-off-by:

[PATCH net-next v3 5/5] virtio-net: keep tx interrupts disabled unless kick

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Tx napi mode increases the rate of transmit interrupts. Suppress some by masking interrupts while more packets are expected. The interrupts will be reenabled before the last packet is sent. This optimization reduces the througput drop with tx napi for

[PATCH net-next v3 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in

[PATCH net-next v3 3/5] virtio-net: move free_old_xmit_skbs

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn An upcoming patch will call free_old_xmit_skbs indirectly from virtnet_poll. Move the function above this to avoid having to introduce a forward declaration. This is a pure move: no code changes. Signed-off-by: Willem de Bruijn

[PATCH net-next v3 1/5] virtio-net: napi helper functions

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Prepare virtio-net for tx napi by converting existing napi code to use helper functions. This also deduplicates some logic. Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang ---

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: >> >>> Maybe I was wrong, but according to Michael's comment it looks like he >> >>> want >> >>> check affinity_hint_set just for speculative tx polling

Re: [PATCH net-next v2 5/5] virtio-net: keep tx interrupts disabled unless kick

2017-04-24 Thread Willem de Bruijn
On Thu, Apr 20, 2017 at 10:03 AM, Willem de Bruijn wrote: >>> - if (!use_napi) >>> + if (use_napi) { >>> + if (kick) >>> + virtqueue_enable_cb_delayed(sq->vq); >>> + else >>> +

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Thu, Apr 20, 2017 at 12:02 PM, Willem de Bruijn wrote: >>> static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) >>> { >>> struct virtio_net_hdr_mrg_rxbuf *hdr; >>> @@ -1130,9 +1172,11 @@ static netdev_tx_t start_xmit(struct sk_buff *skb,

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
>>> Maybe I was wrong, but according to Michael's comment it looks like he >>> want >>> check affinity_hint_set just for speculative tx polling on rx napi >>> instead >>> of disabling it at all. >>> >>> And I'm not convinced this is really needed, driver only provide affinity >>> hint instead of

[PATCH 2] net: virtio_net: use new api ethtool_{get|set}_link_ksettings

2017-04-24 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. Signed-off-by: Philippe Reynes --- Changelog: v2: - remove comment about the missing hardware, I've tested this change with qemu drivers/net/virtio_net.c | 50

[PATCH] net: virtio_net: use new api ethtool_{get|set}_link_ksettings

2017-04-24 Thread Philippe Reynes
The ethtool api {get|set}_settings is deprecated. We move this driver to new api {get|set}_link_ksettings. As I don't have the hardware, I'd be very pleased if someone may test this patch. Signed-off-by: Philippe Reynes --- drivers/net/virtio_net.c | 50

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
>> static int xmit_skb(struct send_queue *sq, struct sk_buff *skb) >> { >> struct virtio_net_hdr_mrg_rxbuf *hdr; >> @@ -1130,9 +1172,11 @@ static netdev_tx_t start_xmit(struct sk_buff *skb, >> struct net_device *dev) >> int err; >> struct netdev_queue *txq =

Re: [PATCH net-next v2 5/5] virtio-net: keep tx interrupts disabled unless kick

2017-04-24 Thread Willem de Bruijn
>> - if (!use_napi) >> + if (use_napi) { >> + if (kick) >> + virtqueue_enable_cb_delayed(sq->vq); >> + else >> + virtqueue_disable_cb(sq->vq); > > > Since virtqueue_disable_cb() do nothing for event idx. I wonder

[PATCH net-next v2 5/5] virtio-net: keep tx interrupts disabled unless kick

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Tx napi mode increases the rate of transmit interrupts. Suppress some by masking interrupts while more packets are expected. The interrupts will be reenabled before the last packet is sent. This optimization reduces the througput drop with tx napi for

[PATCH net-next v2 4/5] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Amortize the cost of virtual interrupts by doing both rx and tx work on reception of a receive interrupt if tx napi is enabled. With VIRTIO_F_EVENT_IDX, this suppresses most explicit tx completion interrupts for bidirectional workloads. Signed-off-by:

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Thu, Apr 20, 2017 at 2:27 AM, Jason Wang wrote: > > > On 2017年04月19日 04:21, Willem de Bruijn wrote: >> >> +static void virtnet_napi_tx_enable(struct virtnet_info *vi, >> + struct virtqueue *vq, >> + struct

[PATCH net-next v2 3/5] virtio-net: move free_old_xmit_skbs

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn An upcoming patch will call free_old_xmit_skbs indirectly from virtnet_poll. Move the function above this to avoid having to introduce a forward declaration. This is a pure move: no code changes. Signed-off-by: Willem de Bruijn

[PATCH net-next v2 1/5] virtio-net: napi helper functions

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Prepare virtio-net for tx napi by converting existing napi code to use helper functions. This also deduplicates some logic. Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang ---

[PATCH net-next v2 0/5] virtio-net tx napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Add napi for virtio-net transmit completion processing. Changes: v1 -> v2: - disable by default - disable unless affinity_hint_set because cache misses add up to a third higher cycle cost, e.g., in TCP_RR tests. This is

[PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in

[PATCH] tools/virtio: fix build breakage

2017-04-24 Thread Sekhar Nori
Commit db932ced55cf ("virtio: add context flag to find vqs") added a new 'context' flag to vring_new_virtqueue(), but the corresponding API in tools/virtio/ is not updated causing build errors due to conflicting declarations. Bring code in tools/virtio in sync with that in kernel. I have used

Need information on type 2 IOMMU

2017-04-24 Thread valmiki
Hi All, We have drivers/vfio/vfio_iommu_type1.c. what is type1 iommu? Is it w.r.t vfio layer it is being referred? Is there type 2 IOMMU w.r.t vfio? If so what is it? Regards, Valmiki ___ Virtualization mailing list

Re: [PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
On Fri, Apr 7, 2017 at 5:10 PM, Michael S. Tsirkin wrote: > On Fri, Apr 07, 2017 at 04:59:58PM -0400, Willem de Bruijn wrote: >> On Fri, Apr 7, 2017 at 3:28 PM, Michael S. Tsirkin wrote: >> > On Mon, Apr 03, 2017 at 01:02:13AM -0400, Willem de Bruijn wrote: >>

Re: [PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
On Fri, Apr 7, 2017 at 3:28 PM, Michael S. Tsirkin wrote: > On Mon, Apr 03, 2017 at 01:02:13AM -0400, Willem de Bruijn wrote: >> On Sun, Apr 2, 2017 at 10:47 PM, Michael S. Tsirkin wrote: >> > On Sun, Apr 02, 2017 at 04:10:12PM -0400, Willem de Bruijn wrote: >>

Re: [PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
On Sun, Apr 2, 2017 at 10:47 PM, Michael S. Tsirkin wrote: > On Sun, Apr 02, 2017 at 04:10:12PM -0400, Willem de Bruijn wrote: >> From: Willem de Bruijn >> >> Amortize the cost of virtual interrupts by doing both rx and tx work >> on reception of a receive

[PATCH net-next 3/3] virtio-net: clean tx descriptors from rx napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Amortize the cost of virtual interrupts by doing both rx and tx work on reception of a receive interrupt if tx napi is enabled. With VIRTIO_F_EVENT_IDX, this suppresses most explicit tx completion interrupts for bidirectional workloads. Signed-off-by:

Re: [PATCH net-next 2/3] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
On Sun, Apr 2, 2017 at 10:30 PM, Michael S. Tsirkin wrote: > On Sun, Apr 02, 2017 at 04:10:11PM -0400, Willem de Bruijn wrote: >> From: Willem de Bruijn >> >> Convert virtio-net to a standard napi tx completion path. This enables >> better TCP pacing using

[PATCH net-next 0/3] virtio-net tx napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Add napi for virtio-net transmit completion processing. Based on previous patchsets by Jason Wang: [RFC V7 PATCH 0/7] enable tx interrupts for virtio-net http://lkml.iu.edu/hypermail/linux/kernel/1505.3/00245.html Changes: RFC -> v1: -

Re: [PATCH] virtio_console: fix uninitialized variable use

2017-04-24 Thread Mike Galbraith
On Wed, 2017-03-29 at 23:27 +0300, Michael S. Tsirkin wrote: > Hi Mike > if you like, pls send me your Signed-off-by and I'll > change the patch to make you an author. Nah, it's perfect as it is. While I was pretty darn sure it was generic, I intentionally posted it as diagnostic

[PATCH net-next 1/3] virtio-net: napi helper functions

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Prepare virtio-net for tx napi by converting existing napi code to use helper functions. This also deduplicates some logic. Signed-off-by: Willem de Bruijn Signed-off-by: Jason Wang ---

Re: [REGRESSION] 07ec51480b5e ("virtio_pci: use shared interrupts for virtqueues") causes crashes in guest

2017-04-24 Thread Thorsten Leemhuis
On 23.03.2017 17:41, Michael S. Tsirkin wrote: > On Thu, Mar 23, 2017 at 03:19:07PM +, Richard W.M. Jones wrote: >> On Thu, Mar 23, 2017 at 01:13:50PM +0800, Jason Wang wrote: >>> >From 312859b596e83a2164a8430343d31fce2a5ad808 Mon Sep 17 00:00:00 2001 >>> From: Jason Wang

[PATCH net-next 2/3] virtio-net: transmit napi

2017-04-24 Thread Willem de Bruijn
From: Willem de Bruijn Convert virtio-net to a standard napi tx completion path. This enables better TCP pacing using TCP small queues and increases single stream throughput. The virtio-net driver currently cleans tx descriptors on transmission of new packets in

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Michael S. Tsirkin
On Mon, Apr 24, 2017 at 01:05:45PM -0400, Willem de Bruijn wrote: > On Mon, Apr 24, 2017 at 12:40 PM, Michael S. Tsirkin wrote: > > On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: > >> >>> Maybe I was wrong, but according to Michael's comment it looks like he >

Re: [PATCH RFC (resend) net-next 0/6] virtio-net: Add support for virtio-net header extensions

2017-04-24 Thread Michael S. Tsirkin
On Thu, Apr 20, 2017 at 11:34:57AM -0400, Vlad Yasevich wrote: > > - For 1.1, do we really want something like vnet header? AFAIK, it was not > > used by modern > > NICs, is this better to pack all meta-data into descriptor itself? This may > > need a some > > changes in tun/macvtap, but looks

Re: [PATCH net-next v2 2/5] virtio-net: transmit napi

2017-04-24 Thread Michael S. Tsirkin
On Fri, Apr 21, 2017 at 10:50:12AM -0400, Willem de Bruijn wrote: > >>> Maybe I was wrong, but according to Michael's comment it looks like he > >>> want > >>> check affinity_hint_set just for speculative tx polling on rx napi > >>> instead > >>> of disabling it at all. > >>> > >>> And I'm not

Re: [RFC 1/3] virtio-iommu: firmware description of the virtual topology

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 09:43, Tian, Kevin wrote: >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] >> Sent: Wednesday, April 19, 2017 2:41 AM >> >> On 18/04/17 10:51, Tian, Kevin wrote: From: Jean-Philippe Brucker Sent: Saturday, April 8, 2017 3:18 AM Unlike other

Re: [RFC 3/3] virtio-iommu: future work

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 09:31, Tian, Kevin wrote: >> From: Jean-Philippe Brucker >> Sent: Saturday, April 8, 2017 3:18 AM >> >> Here I propose a few ideas for extensions and optimizations. This is all >> very exploratory, feel free to correct mistakes and suggest more things. > > [...] >> >> II. Page table

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

2017-04-24 Thread Jean-Philippe Brucker
On 21/04/17 10:02, Tian, Kevin wrote: >> From: Jean-Philippe Brucker [mailto:jean-philippe.bruc...@arm.com] >> Sent: Wednesday, April 19, 2017 2:46 AM >> >> On 18/04/17 11:26, Tian, Kevin wrote: From: Jean-Philippe Brucker Sent: Saturday, April 8, 2017 3:18 AM >>> [...] II.

[PATCH 6/6] drm: fourcc byteorder: virtio restrict to XRGB8888

2017-04-24 Thread Gerd Hoffmann
While wading through the code I've noticed we have a little issue in virtio: We attach a format to the bo when it is created (DRM_IOCTL_MODE_CREATE_DUMB), not when we map it as framebuffer (DRM_IOCTL_MODE_ADDFB). Easy way out: support a single format only. Signed-off-by: Gerd Hoffmann

[PATCH 5/6] drm: fourcc byteorder: adapt virtio to drm_mode_legacy_fb_format update

2017-04-24 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/virtio/virtgpu_gem.c | 2 +- drivers/gpu/drm/virtio/virtgpu_plane.c | 31 --- 2 files changed, 1 insertion(+), 32 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c

[PATCH 4/6] drm: fourcc byteorder: adapt bochs-drm to drm_mode_legacy_fb_format update

2017-04-24 Thread Gerd Hoffmann
Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/bochs/bochs_mm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_mm.c b/drivers/gpu/drm/bochs/bochs_mm.c index 857755ac2d..781d35bdff 100644 --- a/drivers/gpu/drm/bochs/bochs_mm.c