[PATCH V3 10/20] tap: add Linux multiqueue support

2013-01-29 Thread Jason Wang
is only supported in Linux, return error on other platforms. Signed-off-by: Jason Wang --- net/tap-aix.c | 10 ++ net/tap-bsd.c | 11 +++ net/tap-haiku.c | 11 +++ net/tap-linux.c | 52 net/tap

[PATCH V3 05/20] net: introduce qemu_net_client_setup()

2013-01-29 Thread Jason Wang
This patch separates the setup of NetClientState from its allocation, this will allow allocating an arrays of NetClientState and does the initialization one by one which is what multiqueue needs. Signed-off-by: Jason Wang --- net/net.c | 29 +++-- 1 files changed, 19

[PATCH V3 01/20] net: introduce qemu_get_queue()

2013-01-29 Thread Jason Wang
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|9 +++-- hw/dp8393x.c|9

[PATCH V3 09/20] tap: factor out common tap initialization

2013-01-29 Thread Jason Wang
This patch factors out the common initialization of tap into a new helper net_init_tap_one(). This will be used by multiqueue tap patches. Signed-off-by: Jason Wang --- net/tap.c | 130 ++--- 1 files changed, 73 insertions(+), 57

[PATCH V3 06/20] net: introduce NetClientState destructor

2013-01-29 Thread Jason Wang
To allow allocating an array of NetClientState and free it once, this patch introduces destructor of NetClientState. Which could do type specific free, which could be used by multiqueue to free the array once. Signed-off-by: Jason Wang --- include/net/net.h |2 ++ net/net.c | 17

[PATCH V3 07/20] net: multiqueue support

2013-01-29 Thread Jason Wang
allowed. Signed-off-by: Jason Wang --- hw/dp8393x.c|2 +- hw/mcf_fec.c|2 +- hw/qdev-properties-system.c | 46 +++--- hw/qdev-properties.h|6 +- include/net/net.h | 18 +-- net/net.c | 113

[PATCH V3 04/20] net: introduce qemu_find_net_clients_except()

2013-01-29 Thread Jason Wang
In multiqueue, all NetClientState that belongs to the same netdev or nic has the same id. So this patches introduces an helper qemu_find_net_clients_except() which finds all NetClientState with the same id. This will be used by multiqueue networking. Signed-off-by: Jason Wang --- include/net

[PATCH V3 03/20] net: intorduce qemu_del_nic()

2013-01-29 Thread Jason Wang
-by: Jason Wang --- hw/e1000.c |2 +- hw/eepro100.c|2 +- hw/ne2000.c |2 +- hw/pcnet-pci.c |2 +- hw/rtl8139.c |2 +- hw/usb/dev-network.c |2 +- hw/virtio-net.c |2 +- hw/xen_nic.c |2 +- include/net/net.h

[PATCH V3 02/20] net: introduce qemu_get_nic()

2013-01-29 Thread Jason Wang
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|8 hw/dp8393x.c|6 +++--- hw

Re: [PATCH V2 14/20] vhost: multiqueue support

2013-01-29 Thread Jason Wang
On 01/25/2013 06:35 PM, Jason Wang wrote: > This patch lets vhost support multiqueue. The idea is simple, just launching > multiple threads of vhost and let each of vhost thread processing a subset of > the virtqueues of the device. After this change each emulated device can have > mu

Re: [Qemu-devel] [PATCH V2 11/20] tap: support enabling or disabling a queue

2013-01-29 Thread Jason Wang
On 01/26/2013 03:13 AM, Blue Swirl wrote: > On Fri, Jan 25, 2013 at 10:35 AM, Jason Wang wrote: >> This patch introduce a new bit - enabled in TAPState which tracks whether a >> specific queue/fd is enabled. The tap/fd is enabled during initialization and >> could b

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-28 Thread Jason Wang
On 01/29/2013 01:36 PM, Wanlong Gao wrote: > On 01/28/2013 12:24 PM, Jason Wang wrote: >> On 01/28/2013 11:27 AM, Wanlong Gao wrote: >>> On 01/25/2013 06:35 PM, Jason Wang wrote: >>>> Hello all: >>>> >>>> This seires is an update of last ve

Re: [Qemu-devel] [PATCH V2 00/20] Multiqueue virtio-net

2013-01-27 Thread Jason Wang
On 01/28/2013 11:27 AM, Wanlong Gao wrote: > On 01/25/2013 06:35 PM, Jason Wang wrote: >> Hello all: >> >> This seires is an update of last version of multiqueue virtio-net support. >> >> This series tries to brings multiqueue support to virtio-net through a >

[PATCH V2 07/20] net: multiqueue support

2013-01-25 Thread Jason Wang
allowed. Signed-off-by: Jason Wang --- hw/dp8393x.c|2 +- hw/mcf_fec.c|2 +- hw/qdev-properties-system.c | 46 +++--- hw/qdev-properties.h|6 +- include/net/net.h | 18 +-- net/net.c | 113

[PATCH V2 19/20] virtio-net: migration support for multiqueue

2013-01-25 Thread Jason Wang
This patch add migration support for multiqueue virtio-net. Instead of bumping the version, we conditionally send the info of multiqueue only when the device support more than one queue to maintain the backward compatibility. Signed-off-by: Jason Wang --- hw/virtio-net.c | 35

[PATCH V2 20/20] virtio-net: compat multiqueue support

2013-01-25 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang --- hw/pc_piix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 0a6923d..7bc3563 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -297,6 +297,10 @@ static QEMUMachine

[PATCH V2 17/20] virtio-net: separate virtqueue from VirtIONet

2013-01-25 Thread Jason Wang
To support multiqueue virtio-net, the first step is to separate the virtqueue related fields from VirtIONet to a new structure VirtIONetQueue. The following patches will add an array of VirtIONetQueue to VirtIONet based on this patch. Signed-off-by: Jason Wang --- hw/virtio-net.c | 195

[PATCH V2 18/20] virtio-net: multiqueue support

2013-01-25 Thread Jason Wang
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: Jason Wang --- hw/virtio-net.c | 317 +++ hw/virtio

[PATCH V2 16/20] virtio: add a queue_index to VirtQueue

2013-01-25 Thread Jason Wang
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: Jason Wang --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index d8c77b0

[PATCH V2 14/20] vhost: multiqueue support

2013-01-25 Thread Jason Wang
out of the starting/stopping of a specific vhost thread. The vhost_net_{start|stop}() were renamed to vhost_net_{start|stop}_one(), and a new vhost_net_{start|stop}() were introduced to configure the guest notifiers and start/stop all vhost/vhost_net devices. Signed-off-by: Jason Wang --- hw

[PATCH V2 15/20] virtio: introduce virtio_del_queue()

2013-01-25 Thread Jason Wang
Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw

[PATCH V2 12/20] tap: introduce a helper to get the name of an interface

2013-01-25 Thread Jason Wang
its name after creating the first queue. Only linux has this support since it's the only platform that supports multiqueue tap. Signed-off-by: Jason Wang --- include/net/tap.h |1 + net/tap-aix.c |6 ++ net/tap-bsd.c |4 net/tap-haiku.c |4 net/tap-li

[PATCH V2 13/20] tap: multiqueue support

2013-01-25 Thread Jason Wang
e multiqueue nic support, an N peers of NetClientState were built up. A new parameter, mq_required were introduce in tap_open() to create multiqueue tap fds. Signed-off-by: Jason Wang --- include/net/tap.h |1 - net/tap-aix.c |3 +- net/tap-bsd.c |3 +- net/tap-haiku.c |

[PATCH V2 08/20] tap: import linux multiqueue constants

2013-01-25 Thread Jason Wang
IFF_DETACH_QUEUE, the queue were disabled in the linux kernel. When doing this ioctl with IFF_ATTACH_QUEUE, the queue were enabled in the linux kernel. Signed-off-by: Jason Wang --- net/tap-linux.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/tap-linux.h b/net/tap-linux.h

[PATCH V2 10/20] tap: add Linux multiqueue support

2013-01-25 Thread Jason Wang
is only supported in Linux, return error on other platforms. Signed-off-by: Jason Wang --- net/tap-aix.c | 10 ++ net/tap-bsd.c | 11 +++ net/tap-haiku.c | 11 +++ net/tap-linux.c | 52 net/tap

[PATCH V2 11/20] tap: support enabling or disabling a queue

2013-01-25 Thread Jason Wang
only done when the tap was enabled. Signed-off-by: Jason Wang --- include/net/tap.h |2 ++ net/tap-win32.c | 10 ++ net/tap.c | 43 --- 3 files changed, 52 insertions(+), 3 deletions(-) diff --git a/include/net/tap.h b/include/net

[PATCH V2 09/20] tap: factor out common tap initialization

2013-01-25 Thread Jason Wang
This patch factors out the common initialization of tap into a new helper net_init_tap_one(). This will be used by multiqueue tap patches. Signed-off-by: Jason Wang --- net/tap.c | 130 ++--- 1 files changed, 73 insertions(+), 57

[PATCH V2 06/20] net: introduce NetClientState destructor

2013-01-25 Thread Jason Wang
To allow allocating an array of NetClientState and free it once, this patch introduces destructor of NetClientState. Which could do type specific free, which could be used by multiqueue to free the array once. Signed-off-by: Jason Wang --- include/net/net.h |2 ++ net/net.c | 17

[PATCH V2 04/20] net: introduce qemu_find_net_clients_except()

2013-01-25 Thread Jason Wang
In multiqueue, all NetClientState that belongs to the same netdev or nic has the same id. So this patches introduces an helper qemu_find_net_clients_except() which finds all NetClientState with the same id. This will be used by multiqueue networking. Signed-off-by: Jason Wang --- include/net

[PATCH V2 05/20] net: introduce qemu_net_client_setup()

2013-01-25 Thread Jason Wang
This patch separates the setup of NetClientState from its allocation, this will allow allocating an arrays of NetClientState and does the initialization one by one which is what multiqueue needs. Signed-off-by: Jason Wang --- net/net.c | 29 +++-- 1 files changed, 19

[PATCH V2 02/20] net: introduce qemu_get_nic()

2013-01-25 Thread Jason Wang
To support multiqueue, this patch introduces a helper qemu_get_nic() to get NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|8 hw/dp8393x.c|6 +++--- hw

[PATCH V2 03/20] net: intorduce qemu_del_nic()

2013-01-25 Thread Jason Wang
-by: Jason Wang --- hw/e1000.c |2 +- hw/eepro100.c|2 +- hw/ne2000.c |2 +- hw/pcnet-pci.c |2 +- hw/rtl8139.c |2 +- hw/usb/dev-network.c |2 +- hw/virtio-net.c |2 +- hw/xen_nic.c |2 +- include/net/net.h

[PATCH V2 01/20] net: introduce qemu_get_queue()

2013-01-25 Thread Jason Wang
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|9 +++-- hw/dp8393x.c|9

[PATCH V2 00/20] Multiqueue virtio-net

2013-01-25 Thread Jason Wang
48 9374.23 372.88 9348.76 298.49 4096 2 9410.53 378.69 9412.61 286.18 9409.75 278.31 4096 4 9487.35 374.1 9556.91 288.81 9441.94 221.64 16384 1 9380.43 403.8 9379.78 399.13 9382.42 393.55 16384 2 9367.69 406.93 9415.04 312.68 9409.29 300.9 16384 4 9391.96 405.17 9695.12 310.54 9423.76 223.47 J

Re: [PATCH] vhost-net: fall back to vmalloc if high-order allocation fails

2013-01-24 Thread Jason Wang
On Friday, January 25, 2013 03:03:13 AM Cong Wang wrote: > ["Followup-To:" header set to gmane.linux.network.] > > On Wed, 23 Jan 2013 at 20:46 GMT, Romain Francoise wrote: > > Creating a vhost-net device allocates an object large enough (34320 bytes > > on x86-64) to trigger an order-4 allocati

Re: [QEMU PATCH v2] virtio-net: introduce a new macaddr control

2013-01-15 Thread Jason Wang
On Wednesday, January 16, 2013 02:16:47 PM ak...@redhat.com wrote: > From: Amos Kong > > In virtio-net guest driver, currently we write MAC address to > pci config space byte by byte, this means that we have an > intermediate step where mac is wrong. This patch introduced > a new control command

Re: [PATCH v2 2/2] virtio-net: introduce a new control to set macaddr

2013-01-15 Thread Jason Wang
On Wednesday, January 16, 2013 01:57:01 PM ak...@redhat.com wrote: > From: Amos Kong > > Currently we write MAC address to pci config space byte by byte, > this means that we have an intermediate step where mac is wrong. > This patch introduced a new control command to set MAC address > in one ti

Re: [PATCH 00/12] Multiqueue virtio-net

2013-01-15 Thread Jason Wang
On 01/15/2013 03:44 AM, Anthony Liguori wrote: > Jason Wang writes: > >> Hello all: >> >> This seires is an update of last version of multiqueue virtio-net support. >> >> Recently, linux tap gets multiqueue support. This series implements basic >> suppo

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/14/2013 02:57 PM, Michael S. Tsirkin wrote: > On Mon, Jan 14, 2013 at 10:59:02AM +0800, Jason Wang wrote: >> On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: >>> On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: >>>> On 01/07/2013 10:55 PM, Michael

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-13 Thread Jason Wang
On 01/13/2013 07:10 PM, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2013 at 11:04:32PM +0800, Jason Wang wrote: >> On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: >>> On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: >>>> On 01/06/2013 09:22 PM, Michael

Re: [Qemu-devel] [RFC PATCH 2/2] virtio-net: introduce a new control to set macaddr

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > From: Amos Kong > > Currently we write MAC address to pci config space byte by byte, > this means that we have an intermediate step where mac is wrong. > This patch introduced a new control command to set MAC address > in one time. > > VIRTIO_NET_F

Re: [RFC PATCH 1/2] move virtnet_send_command() above virtnet_set_mac_address()

2013-01-10 Thread Jason Wang
On 01/10/2013 10:45 PM, ak...@redhat.com wrote: > From: Amos Kong > > We will send vq command to set mac address in virtnet_set_mac_address() > a little fix of coding style Maybe what you need is just a forward declaration. > > Signed-off-by: Amos Kong > --- > drivers/net/virtio_net.c | 89 > +

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 07:49 PM, Stefan Hajnoczi wrote: > On Thu, Jan 10, 2013 at 05:34:14PM +0800, Jason Wang wrote: >> On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: >>> On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: >>>> On 01/09/2013 11:32 PM, Michael S. Tsirk

Re: [PATCH 01/12] tap: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 06:28 PM, Stefan Hajnoczi wrote: > On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: > > Mainly suggestions to make the code easier to understand, but see the > comment about the 1:1 queue/NetClientState model for a general issue > with this approach. Ok,

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-10 Thread Jason Wang
On 01/10/2013 05:06 PM, Wanlong Gao wrote: > On 01/10/2013 03:16 PM, Jason Wang wrote: >> On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: >>> On 01/10/2013 02:43 PM, Jason Wang wrote: >>>> On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-10 Thread Jason Wang
On 01/10/2013 04:44 PM, Stefan Hajnoczi wrote: > On Wed, Jan 09, 2013 at 11:33:25PM +0800, Jason Wang wrote: >> On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: >>> On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: >>>> On Fri, Dec 28, 2012 at 06:3

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On Thursday, January 10, 2013 02:49:14 PM Wanlong Gao wrote: > On 01/10/2013 02:43 PM, Jason Wang wrote: > > On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: > >> On 01/09/2013 06:01 PM, Wanlong Gao wrote: > >>> On 01/09/2013 05:30 PM, Jason Wang wrote:

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On Wednesday, January 09, 2013 11:26:33 PM Jason Wang wrote: > On 01/09/2013 06:01 PM, Wanlong Gao wrote: > > On 01/09/2013 05:30 PM, Jason Wang wrote: > >> On 01/09/2013 04:23 PM, Wanlong Gao wrote: > >>> On 01/08/2013 06:14 PM, Jason Wang wrote: > >>>&

Re: [Qemu-devel] vhost-net thread getting stuck ?

2013-01-09 Thread Jason Wang
On 01/10/2013 04:25 AM, Chegu Vinod wrote: > > Hello, > > 'am running into an issue with the latest bits. [ Pl. see below. The > vhost thread seems to be getting > stuck while trying to memcopy...perhaps a bad address?. ] Wondering > if this is a known issue or > some recent regression ? Hi: Loo

Re: [Qemu-devel] [PATCH 00/12] Multiqueue virtio-net

2013-01-09 Thread Jason Wang
On 01/09/2013 11:32 PM, Michael S. Tsirkin wrote: > On Wed, Jan 09, 2013 at 03:29:24PM +0100, Stefan Hajnoczi wrote: >> On Fri, Dec 28, 2012 at 06:31:52PM +0800, Jason Wang wrote: >>> Perf Numbers: >>> >>> Two Intel Xeon 5620 with direct connected intel 8259

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 06:01 PM, Wanlong Gao wrote: > On 01/09/2013 05:30 PM, Jason Wang wrote: >> On 01/09/2013 04:23 PM, Wanlong Gao wrote: >>> On 01/08/2013 06:14 PM, Jason Wang wrote: >>>> On 01/08/2013 06:00 PM, Wanlong Gao wrote: >>>>> On 01/08/2013 05:51

Re: [PATCH 01/12] tap: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 05:56 PM, Stefan Hajnoczi wrote: > On Fri, Dec 28, 2012 at 06:31:53PM +0800, Jason Wang wrote: >> diff --git a/qapi-schema.json b/qapi-schema.json >> index 5dfa052..583eb7c 100644 >> --- a/qapi-schema.json >> +++ b/qapi-schema.json >>

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-09 Thread Jason Wang
On 01/09/2013 04:23 PM, Wanlong Gao wrote: > On 01/08/2013 06:14 PM, Jason Wang wrote: >> On 01/08/2013 06:00 PM, Wanlong Gao wrote: >>> On 01/08/2013 05:51 PM, Jason Wang wrote: >>>> On 01/08/2013 05:49 PM, Wanlong Gao wrote: >>>>> On 01/08/2013 05:29

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 07:24 PM, Wanlong Gao wrote: > On 01/08/2013 06:14 PM, Jason Wang wrote: >> On 01/08/2013 06:00 PM, Wanlong Gao wrote: >>> On 01/08/2013 05:51 PM, Jason Wang wrote: >>>> On 01/08/2013 05:49 PM, Wanlong Gao wrote: >>>>> On 01/08/2013 05:29

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 06:00 PM, Wanlong Gao wrote: > On 01/08/2013 05:51 PM, Jason Wang wrote: >> On 01/08/2013 05:49 PM, Wanlong Gao wrote: >>> On 01/08/2013 05:29 PM, Jason Wang wrote: >>>> On 01/08/2013 05:07 PM, Wanlong Gao wrote: >>>>> On 12/28/2012 06:3

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:49 PM, Wanlong Gao wrote: > On 01/08/2013 05:29 PM, Jason Wang wrote: >> On 01/08/2013 05:07 PM, Wanlong Gao wrote: >>> On 12/28/2012 06:32 PM, Jason Wang wrote: >>>> +} else if (nc->peer->info->type != NET_CLIENT_OPTIONS_KIND_TAP) { &

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-08 Thread Jason Wang
On 01/08/2013 05:07 PM, Wanlong Gao wrote: > On 12/28/2012 06:32 PM, Jason Wang wrote: >> +} else if (nc->peer->info->type != NET_CLIENT_OPTIONS_KIND_TAP) { >> +ret = -1; >> +} else { >> +ret = tap_detach(nc->peer); >> +} &

Re: [PATCH 07/12] virtio: introduce virtio_queue_del()

2013-01-08 Thread Jason Wang
On 01/08/2013 03:14 PM, Michael S. Tsirkin wrote: > On Fri, Dec 28, 2012 at 06:31:59PM +0800, Jason Wang wrote: >> Some device (such as virtio-net) needs the ability to destroy or re-order the >> virtqueues, this patch adds a helper to do this. >> >> Signed-off-by: Jason

Re: [PATCH 11/12] virtio-net: migration support for multiqueue

2013-01-08 Thread Jason Wang
On 01/08/2013 03:10 PM, Michael S. Tsirkin wrote: > On Fri, Dec 28, 2012 at 06:32:03PM +0800, Jason Wang wrote: >> This patch add migration support for multiqueue virtio-net. The version were >> bumped to 12. >> >> Signed-off-by: Jason Wang >&g

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-07 Thread Jason Wang
On 01/07/2013 10:55 PM, Michael S. Tsirkin wrote: > On Mon, Jan 07, 2013 at 12:38:17PM +0800, Jason Wang wrote: >> On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: >>> On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: >>>> Polling errors were ignored by vho

Re: [PATCH V3 2/2] vhost: handle polling errors

2013-01-06 Thread Jason Wang
On 01/06/2013 09:22 PM, Michael S. Tsirkin wrote: > On Sun, Jan 06, 2013 at 03:18:38PM +0800, Jason Wang wrote: >> Polling errors were ignored by vhost/vhost_net, this may lead to crash when >> trying to remove vhost from waitqueue when after the polling is failed. Solve >

[PATCH V3 1/2] vhost_net: correct error handling in vhost_net_set_backend()

2013-01-05 Thread Jason Wang
Currently, when vhost_init_used() fails the sock refcnt and ubufs were leaked. Correct this by calling vhost_init_used() before assign ubufs and restore the oldsock when it fails. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 16 +++- 1 files changed, 11 insertions(+), 5

[PATCH V3 0/2] handle polling errors

2013-01-05 Thread Jason Wang
estore the state before the ioctl when vhost_init_used() fails - log the error when meet polling errors in the data path - don't put into waitqueue when tun_chr_poll() return POLLERR Jason Wang (2): vhost_net: correct error handling in vhost_net_set_backend() vhost: handle polling error

[PATCH V3 2/2] vhost: handle polling errors

2013-01-05 Thread Jason Wang
in vhost_net since it was replaced by the checking of poll->wqh. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 74 drivers/vhost/vhost.c | 31 +++- drivers/vhost/vhost.h |2 +- 3 files changed, 49 insertions(

Re: [Qemu-devel] [PATCH 10/12] virtio-net: multiqueue support

2013-01-03 Thread Jason Wang
On 12/29/2012 01:52 AM, Blue Swirl wrote: > On Fri, Dec 28, 2012 at 10:32 AM, Jason Wang wrote: >> This patch implements both userspace and vhost support for multiple queue >> virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of >> VirtIONetQueue to VirtIONet

[PATCH 07/12] virtio: introduce virtio_queue_del()

2012-12-28 Thread Jason Wang
Some device (such as virtio-net) needs the ability to destroy or re-order the virtqueues, this patch adds a helper to do this. Signed-off-by: Jason Wang --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw

[PATCH 12/12] virtio-net: compat multiqueue support

2012-12-28 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang --- hw/pc_piix.c |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 19e342a..0145370 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -295,6 +295,10 @@ static QEMUMachine

[PATCH 10/12] virtio-net: multiqueue support

2012-12-28 Thread Jason Wang
This patch implements both userspace and vhost support for multiple queue virtio-net (VIRTIO_NET_F_MQ). This is done by introducing an array of VirtIONetQueue to VirtIONet. Signed-off-by: Jason Wang --- hw/virtio-net.c | 318 ++- hw/virtio

[PATCH 11/12] virtio-net: migration support for multiqueue

2012-12-28 Thread Jason Wang
This patch add migration support for multiqueue virtio-net. The version were bumped to 12. Signed-off-by: Jason Wang --- hw/virtio-net.c | 45 +++-- 1 files changed, 35 insertions(+), 10 deletions(-) diff --git a/hw/virtio-net.c b/hw/virtio-net.c index

[PATCH 09/12] virtio-net: separate virtqueue from VirtIONet

2012-12-28 Thread Jason Wang
To support multiqueue virtio-net, the first step is to separate the virtqueue related fields from VirtIONet to a new structure VirtIONetQueue. The following patches will add an array of VirtIONetQueue to VirtIONet based on this patch. Signed-off-by: Jason Wang --- hw/virtio-net.c | 209

[PATCH 08/12] virtio: add a queue_index to VirtQueue

2012-12-28 Thread Jason Wang
Add a queue_index to VirtQueue and a helper to fetch it, this could be used by multiqueue supported device. Signed-off-by: Jason Wang --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw/virtio.c index bc3c9c3

[PATCH 03/12] net: introduce qemu_get_nic()

2012-12-28 Thread Jason Wang
To support multiqueue , the patch introduce a helper qemu_get_nic() to get the NICState from a NetClientState. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|8 hw/dp8393x.c|6 +++--- hw

[PATCH 05/12] net: multiqueue support

2012-12-28 Thread Jason Wang
-by: Jason Wang --- hw/dp8393x.c |2 +- hw/mcf_fec.c |2 +- hw/qdev-properties.c | 46 +++-- hw/qdev-properties.h |6 +- net.c| 172 +- net.h| 27 +++- 6 files changed, 195

[PATCH 06/12] vhost: multiqueue support

2012-12-28 Thread Jason Wang
virtqueue which this vhost thread serves. Signed-off-by: Jason Wang --- hw/vhost.c | 52 +--- hw/vhost.h |2 ++ hw/vhost_net.c |7 +-- hw/vhost_net.h |2 +- hw/virtio-net.c |3 ++- 5 files changed, 43 insertions

[PATCH 02/12] net: introduce qemu_get_queue()

2012-12-28 Thread Jason Wang
To support multiqueue, the patch introduce a helper qemu_get_queue() which is used to get the NetClientState of a device. The following patches would refactor this helper to support multiqueue. Signed-off-by: Jason Wang --- hw/cadence_gem.c|8 +++--- hw/dp8393x.c|8

[PATCH 04/12] net: intorduce qemu_del_nic()

2012-12-28 Thread Jason Wang
To support multiqueue nic, this patch separate the nic destructor from qemu_del_net_client() to a new helper qemu_del_nic(). The following patches would refactor this function to support multiqueue nic. Signed-off-by: Jason Wang --- hw/e1000.c |2 +- hw/eepro100.c|2

[PATCH 01/12] tap: multiqueue support

2012-12-28 Thread Jason Wang
ted file descriptors (queues) to qemu. Each TAPState were still associated to a tap fd, which mean multiple TAPStates were created when user needs multiqueue taps. Only linux part were implemented now, since it's the only OS that support multiqueue tap. Signed-off-by: Jason Wang --- net/tap-ai

[PATCH 00/12] Multiqueue virtio-net

2012-12-28 Thread Jason Wang
4 9391.96 405.17 9695.12 310.54 9423.76 223.47 Jason Wang (12): tap: multiqueue support net: introduce qemu_get_queue() net: introduce qemu_get_nic() net: intorduce qemu_del_nic() net: multiqueue support vhost: multiqueue support virtio: introduce virtio_queue_del() virtio: add a q

Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Jason Wang
On 12/27/2012 09:14 PM, Michael S. Tsirkin wrote: > On Thu, Dec 27, 2012 at 02:39:19PM +0800, Jason Wang wrote: >> Fix the leaking of oldubufs and fd refcnt when fail to initialized used ring. >> >> Signed-off-by: Jason Wang >> --- >> drivers/vhost/net.c | 14 +

Re: [PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-27 Thread Jason Wang
On 12/27/2012 09:03 PM, Michael S. Tsirkin wrote: > On Thu, Dec 27, 2012 at 02:39:20PM +0800, Jason Wang wrote: >> Currently, polling error were ignored in vhost. This may lead some issues >> (e.g >> kenrel crash when passing a tap fd to vhost before calling TUNSETIFF

Re: [PATCH 2/2] vhost: handle polling failure

2012-12-27 Thread Jason Wang
On 12/27/2012 06:01 PM, Wanlong Gao wrote: > On 12/27/2012 02:39 PM, Jason Wang wrote: >> > Currently, polling error were ignored in vhost. This may lead some issues >> > (e.g >> > kenrel crash when passing a tap fd to vhost before calling TUNSETIFF). Fix >&g

[PATCH 1/2] vhost_net: correct error hanlding in vhost_net_set_backend()

2012-12-26 Thread Jason Wang
Fix the leaking of oldubufs and fd refcnt when fail to initialized used ring. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 14 +++--- 1 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index ebd08b2..629d6b5 100644 --- a

[PATCH 2/2] vhost: handle polling failure

2012-12-26 Thread Jason Wang
() report errors to the caller, which could be used caller or userspace. Signed-off-by: Jason Wang --- drivers/vhost/net.c | 75 + drivers/vhost/vhost.c | 16 +- drivers/vhost/vhost.h | 11 ++- 3 files changed, 50 insertions

Re: [PATCHv6] virtio-spec: virtio network device multiqueue support

2012-12-10 Thread Jason Wang
On Friday, December 07, 2012 04:18:56 PM Michael S. Tsirkin wrote: > Add multiqueue support to virtio network device. > Add a new feature flag VIRTIO_NET_F_MQ for this feature, a new > configuration field max_virtqueue_pairs to detect supported number of > virtqueues as well as a new command VIRTIO

[PATCH net-next v3 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-07 Thread Jason Wang
-off-by: Jason Wang --- drivers/net/virtio_net.c | 282 ++ 1 files changed, 158 insertions(+), 124 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 90ac97d..02a7102 100644 --- a/drivers/net/virtio_net.c +++ b/drivers

[PATCH net-next v3 2/3] virtio_net: multiqueue support

2012-12-07 Thread Jason Wang
. - smp affinity hint to the cpu that owns the queue pairs. This could be used with the flow steering support of the device to guarantee the packets of a single flow is handled by the same cpu. Signed-off-by: Krishna Kumar Signed-off-by: Jason Wang --- drivers/net/virtio_net.c| 473

[PATCH net-next v3 3/3] virtio-net: support changing the number of queue pairs through ethtool

2012-12-07 Thread Jason Wang
This patch implements the ethtool_{set|get}_channels method of virtio-net to allow user to change the number of queues when the device is running on demand. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 43 +++ 1 files changed, 43 insertions

[PATCH net-next v2 0/3] Multiqueue support in virtio-net

2012-12-05 Thread Jason Wang
V2: http://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_net: multiqueue support virtio-net: support changing the number of queue pairs t

[PATCH net-next v2 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-05 Thread Jason Wang
-off-by: Jason Wang --- drivers/net/virtio_net.c | 282 ++ 1 files changed, 158 insertions(+), 124 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8262232..0dcaee7 100644 --- a/drivers/net/virtio_net.c +++ b/drivers

[PATCH net-next v2 2/3] virtio_net: multiqueue support

2012-12-05 Thread Jason Wang
. - smp affinity hint to the cpu that owns the queue pairs. This could be used with the flow steering support of the device to guarantee the packets of a single flow is handled by the same cpu. Signed-off-by: Krishna Kumar Signed-off-by: Jason Wang --- drivers/net/virtio_net.c| 473

[PATCH net-next v2 3/3] virtio-net: support changing the number of queue pairs through ethtool

2012-12-05 Thread Jason Wang
This patch implements the ethtool_{set|get}_channels method of virtio-net to allow user to change the number of queues when the device is running on demand. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 43 +++ 1 files changed, 43 insertions

Re: [PATCH net-next 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On 12/04/2012 11:11 PM, Michael S. Tsirkin wrote: > On Tue, Dec 04, 2012 at 10:45:33PM +0800, Jason Wang wrote: >> On Tuesday, December 04, 2012 03:24:22 PM Michael S. Tsirkin wrote: >>> I found some bugs, see below. >>> Also some style nitpicking, this is not mandator

Re: [PATCH net-next 3/3] virtio-net: change the number of queues through ethtool

2012-12-04 Thread Jason Wang
On Tuesday, December 04, 2012 03:49:59 PM Michael S. Tsirkin wrote: > On Tue, Dec 04, 2012 at 07:07:58PM +0800, Jason Wang wrote: > > This patch implement the ethtool_{set|get}_channels method of ethool to > > allow user to change the number of queues dymaically when the device

Re: [PATCH net-next 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On Tuesday, December 04, 2012 03:24:22 PM Michael S. Tsirkin wrote: > I found some bugs, see below. > Also some style nitpicking, this is not mandatory to address. Thanks for the reviewing. > > On Tue, Dec 04, 2012 at 07:07:57PM +0800, Jason Wang wrote: > > This addes mul

[PATCH net-next 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
processor id. - smp affinity hint were set to the vcpu that owns the queue pairs. Signed-off-by: Krishna Kumar Signed-off-by: Jason Wang --- drivers/net/virtio_net.c| 472 ++- include/uapi/linux/virtio_net.h | 16 ++ 2 files changed, 385 insertions

[PATCH net-next 1/3] virtio-net: separate fields of sending/receiving queue from virtnet_info

2012-12-04 Thread Jason Wang
-off-by: Jason Wang --- drivers/net/virtio_net.c | 271 +- 1 files changed, 149 insertions(+), 122 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 8262232..266f712 100644 --- a/drivers/net/virtio_net.c +++ b/drivers

[PATCH net-next 3/3] virtio-net: change the number of queues through ethtool

2012-12-04 Thread Jason Wang
This patch implement the ethtool_{set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to configure it on demand. Signed-off-by: Jason Wang --- drivers/net/virtio_net.c | 44

[PATCH net-next 0/3] Multiqueue support for virtio-net

2012-12-04 Thread Jason Wang
ml.org/lkml/2012/6/25/120 - RFC V2: http://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_net: multiqueue support virtio-net: change the nu

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On Tuesday, December 04, 2012 09:35:03 AM Michael S. Tsirkin wrote: > On Mon, Dec 03, 2012 at 06:30:49PM +0800, Jason Wang wrote: > > On 12/03/2012 06:14 PM, Michael S. Tsirkin wrote: > > > On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: > > >> >

Re: [net-next rfc v7 2/3] virtio_net: multiqueue support

2012-12-04 Thread Jason Wang
On Monday, December 03, 2012 01:11:18 PM Michael S. Tsirkin wrote: > On Mon, Dec 03, 2012 at 06:01:58PM +0800, Jason Wang wrote: > > On 12/03/2012 05:47 PM, Michael S. Tsirkin wrote: > > > On Mon, Dec 03, 2012 at 02:05:27PM +0800, Jason Wang wrote: > > >> On Monday,

<    1   2   3   4   5   6   7   8   >