Re: [PATCH 4/4] x86: properly handle kvm emulation of hyperv

2013-07-25 Thread Jason Wang
On 07/25/2013 03:59 PM, Paolo Bonzini wrote: Il 24/07/2013 23:37, H. Peter Anvin ha scritto: What I'm suggesting is exactly that except that the native hypervisor is later in CPUID space. Me too actually. I was just suggesting an implementation of the idea (that takes into account

[PATCH V2 4/4] x86: correctly detect hypervisor

2013-07-25 Thread Jason Wang
Cc: Frederic Weisbecker fweis...@gmail.com Cc: linux-ker...@vger.kernel.org Cc: de...@linuxdriverproject.org Cc: kvm@vger.kernel.org Cc: xen-de...@lists.xensource.com Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/include/asm/hypervisor.h

[PATCH V2 1/4] x86: introduce hypervisor_cpuid_base()

2013-07-25 Thread Jason Wang
...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb Natapov g...@redhat.com Cc: x...@kernel.org Signed-off-by: Jason Wang jasow...@redhat.com --- Changes from V1: - use memcpy() and uint32_t instead of strcmp() --- arch/x86/include/asm/processor.h | 15

[PATCH V2 2/4] xen: switch to use hypervisor_cpuid_base()

2013-07-25 Thread Jason Wang
...@redhat.com Cc: xen-de...@lists.xensource.com Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/include/asm/xen/hypervisor.h | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/arch/x86/include/asm/xen

[PATCH V2 3/4] kvm: switch to use hypervisor_cpuid_base()

2013-07-25 Thread Jason Wang
Switch to use hypervisor_cpuid_base() to detect KVM. Cc: Gleb Natapov g...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org Cc: kvm@vger.kernel.org Signed-off-by: Jason

Re: [PATCH 4/4] x86: properly handle kvm emulation of hyperv

2013-07-24 Thread Jason Wang
On 07/24/2013 12:48 PM, H. Peter Anvin wrote: On 07/23/2013 09:37 PM, Jason Wang wrote: On 07/23/2013 10:48 PM, H. Peter Anvin wrote: On 07/23/2013 06:55 AM, KY Srinivasan wrote: This strategy of hypervisor detection based on some detection order IMHO is not a robust detection strategy

[PATCH 4/4] x86: properly handle kvm emulation of hyperv

2013-07-23 Thread Jason Wang
: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org Cc: Gleb Natapov g...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/kernel/cpu

[PATCH 1/4] x86: introduce hypervisor_cpuid_base()

2013-07-23 Thread Jason Wang
...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Gleb Natapov g...@redhat.com Cc: x...@kernel.org Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/include/asm/processor.h | 20 1 files changed, 20 insertions(+), 0 deletions

[PATCH 3/4] kvm: switch to use hypervisor_cpuid_base()

2013-07-23 Thread Jason Wang
Switch to use hypervisor_cpuid_base() to detect KVM. Cc: Gleb Natapov g...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Cc: x...@kernel.org Cc: kvm@vger.kernel.org Signed-off-by: Jason

[PATCH 2/4] xen: switch to use hypervisor_cpuid_base()

2013-07-23 Thread Jason Wang
...@redhat.com Cc: xen-de...@lists.xensource.com Cc: virtualizat...@lists.linux-foundation.org Signed-off-by: Jason Wang jasow...@redhat.com --- arch/x86/include/asm/xen/hypervisor.h | 16 +--- 1 files changed, 1 insertions(+), 15 deletions(-) diff --git a/arch/x86/include/asm/xen

Re: [PATCH 1/4] x86: introduce hypervisor_cpuid_base()

2013-07-23 Thread Jason Wang
On 07/23/2013 09:48 PM, Gleb Natapov wrote: On Tue, Jul 23, 2013 at 05:41:02PM +0800, Jason Wang wrote: This patch introduce hypervisor_cpuid_base() which loop test the hypervisor existence function until the signature match and check the number of leaves if required. This could be used

Re: [PATCH 4/4] x86: properly handle kvm emulation of hyperv

2013-07-23 Thread Jason Wang
On 07/23/2013 10:48 PM, H. Peter Anvin wrote: On 07/23/2013 06:55 AM, KY Srinivasan wrote: This strategy of hypervisor detection based on some detection order IMHO is not a robust detection strategy. The current scheme works since the only hypervisor emulated (by other hypervisors happens

Re: [PATCH 1/4] x86: introduce hypervisor_cpuid_base()

2013-07-23 Thread Jason Wang
On 07/24/2013 12:03 AM, H. Peter Anvin wrote: On 07/23/2013 04:16 AM, Paolo Bonzini wrote: That's nicer, though strcmp is what the replaced code used to do in patches 2 and 3. Note that memcmp requires the caller to use KVMKVMKVM\0\0 as the signature (or alternatively hypervisor_cpuid_base

[PATCH] x86: properly handle KVM emulation of hyperv

2013-07-19 Thread Jason Wang
: Gleb Natapov g...@redhat.com Cc: Paolo Bonzini pbonz...@redhat.com Cc: Vadim Rozenfeld vroze...@redhat.com Cc: K. Y. Srinivasan k...@microsoft.com Cc: Thomas Gleixner t...@linutronix.de Cc: Ingo Molnar mi...@redhat.com Cc: H. Peter Anvin h...@zytor.com Signed-off-by: Jason Wang jasow...@redhat.com

Re: [PATCH net] vhost-net: fix use-after-free in vhost_net_flush

2013-06-21 Thread Jason Wang
); if (ubufs) - vhost_net_ubuf_put_and_wait(ubufs); + vhost_net_ubuf_put_wait_and_free(ubufs); err_ubufs: fput(sock-file); err_vq: Acked-by: Jason Wang jasow...@redhat.com -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message to majord

Re: [PATCH] get 2% or more performance improved by reducing spin_lock race

2013-06-07 Thread Jason Wang
On 06/07/2013 03:31 PM, Qinchuanyu wrote: the wake_up_process func is included by spin_lock/unlock in vhost_work_queue, but it could be done outside the spin_lock. I have test it with kernel 3.0.27 and guest suse11-sp2 using iperf, the num as below. orignal

[PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
] ? kthread_freezable_should_stop+0x70/0x70 Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c |3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 2b51e23..b07d96b 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost

Re: [PATCH] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
On 06/05/2013 09:44 PM, Sergei Shtylyov wrote: Hello. On 05-06-2013 11:40, Jason Wang wrote: When we decide not use zero-copy, msg.control should be set to NULL otherwise macvtap/tap may set zerocopy callbacks which may decrease the kref of ubufs wrongly. Bug were introduced by commit

[PATCH V2] vhost_net: clear msg.control for non-zerocopy case during tx

2013-06-05 Thread Jason Wang
] ? kthread_freezable_should_stop+0x70/0x70 Acked-by: Michael S. Tsirkin m...@redhat.com Signed-off-by: Jason Wang jasow...@redhat.com --- The patch is needed for -stable. Changes from v1: - code style issue fix --- drivers/vhost/net.c |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git

Re: updated: kvm networking todo wiki

2013-05-24 Thread Jason Wang
On 05/23/2013 04:50 PM, Michael S. Tsirkin wrote: Hey guys, I've updated the kvm networking todo wiki with current projects. Will try to keep it up to date more often. Original announcement below. Thanks a lot. I've added the tasks I'm currently working on to the wiki. btw. I notice the

Re: provide vhost thread per virtqueue for forwarding scenario

2013-05-22 Thread Jason Wang
On 05/22/2013 05:59 PM, Zang Hongyong wrote: On 2013/5/20 15:43, Michael S. Tsirkin wrote: On Mon, May 20, 2013 at 02:11:19AM +, Qinchuanyu wrote: Vhost thread provide both tx and rx ability for virtio-net. In the forwarding scenarios, tx and rx share the vhost thread, and throughput is

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-20 Thread Jason Wang
...@vger.kernel.org; linux-ker...@vger.kernel.org; Jason Wang Subject: Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool On Sun, May 19, 2013 at 10:56:16PM +, Narasimhan, Sriram wrote: Hi Michael, Comments inline... -Original Message- From

Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool

2013-05-19 Thread Jason Wang
; kvm@vger.kernel.org; net...@vger.kernel.org; linux-ker...@vger.kernel.org; Jason Wang Subject: Re: [PATCH] virtio-net: Reporting traffic queue distribution statistics through ethtool On Sun, May 19, 2013 at 04:09:48PM +, Narasimhan, Sriram wrote: Hi Michael, I was getting all packets

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Jason Wang
On 05/20/2013 11:06 AM, Qinchuanyu wrote: Right now the wake_up_process func is included in spin_lock/unlock, but it could be done outside the spin_lock. I have test it with kernel 3.0.27 and guest suse11-sp2, it provide 2%-3% net performance improved. Signed-off-by: Chuanyu Qin

Re: [PATCH] vhost: get 2% performance improved by reducing spin_lock race in vhost_work_queue

2013-05-19 Thread Jason Wang
On 05/20/2013 12:22 PM, Qinchuanyu wrote: The patch below is base on https://git.kernel.org/cgit/linux/kernel/git/next/linux-next.git/tree/drivers/vhost/vhost.c?id=refs/tags/next-20130517 Signed-off-by: Chuanyu Qin qinchua...@huawei.com --- a/drivers/vhost/vhost.c 2013-05-20

Re: [PATCH 0/3] vhost cleanups and separate module

2013-05-12 Thread Jason Wang
On 05/07/2013 08:44 PM, Michael S. Tsirkin wrote: On Tue, May 07, 2013 at 02:13:44PM +0930, Rusty Russell wrote: Michael S. Tsirkin m...@redhat.com writes: On Mon, May 06, 2013 at 03:41:36PM +0930, Rusty Russell wrote: Asias He as...@redhat.com writes: Asias He (3): vhost: Remove

Re: virtio-net mq vq initialization

2013-04-14 Thread Jason Wang
On 04/14/2013 11:16 PM, Sasha Levin wrote: On 04/14/2013 06:01 AM, Michael S. Tsirkin wrote: On Sat, Apr 13, 2013 at 05:23:41PM -0400, Sasha Levin wrote: On 04/12/2013 07:36 AM, Rusty Russell wrote: Sasha Levin sasha.le...@oracle.com writes: On 04/11/2013 12:36 PM, Will Deacon wrote: Hello

[PATCH] vhost_net: remove tx polling state

2013-04-11 Thread Jason Wang
% | zerocopy enabled: sessions|transaction rates|normalize| before/after/+improvements 1 | 7318.33/11929.76/+63.0%| 521.86/843.30/+61.6% | 25| 167264.88/242422.15/+44.9% | 2181.60/2788.16/+27.8% | 50| 272181.02/294347.04/+8.1% | 3071.56/3257.85/+6.1% | Signed-off-by: Jason Wang jasow

Re: TCP small packets throughput and multiqueue virtio-net

2013-03-11 Thread Jason Wang
On 03/08/2013 11:05 PM, Eric Dumazet wrote: On Fri, 2013-03-08 at 14:24 +0800, Jason Wang wrote: Hello all: I meet an issue when testing multiqueue virtio-net. When I testing guest small packets stream sending performance with netperf. I find an regression of multiqueue. When I run 2

Re: TCP small packets throughput and multiqueue virtio-net

2013-03-11 Thread Jason Wang
On 03/09/2013 01:26 AM, Rick Jones wrote: Well, the point is : if your app does write(1024) bytes, thats probably because it wants small packets from the very beginning. (See the TCP PUSH flag ?) I think that raises the question of whether or not Jason was setting the test-specific -D

Re: [PATCH] vhost_net: remove tx polling state

2013-03-11 Thread Jason Wang
On 03/11/2013 12:50 AM, Michael S. Tsirkin wrote: On Thu, Mar 07, 2013 at 12:31:56PM +0800, Jason Wang wrote: After commit 2b8b328b61c799957a456a5a8dab8cc7dea68575 (vhost_net: handle polling errors when setting backend), we in fact track the polling state through poll-wqh, so there's no need

Re: [PATCH] vhost_net: remove tx polling state

2013-03-11 Thread Jason Wang
On 03/11/2013 03:09 PM, Jason Wang wrote: On 03/11/2013 12:50 AM, Michael S. Tsirkin wrote: On Thu, Mar 07, 2013 at 12:31:56PM +0800, Jason Wang wrote: After commit 2b8b328b61c799957a456a5a8dab8cc7dea68575 (vhost_net: handle polling errors when setting backend), we in fact track the polling

Re: [PATCH] vhost_net: remove tx polling state

2013-03-11 Thread Jason Wang
On 03/11/2013 04:29 PM, Michael S. Tsirkin wrote: On Mon, Mar 11, 2013 at 03:09:10PM +0800, Jason Wang wrote: On 03/11/2013 12:50 AM, Michael S. Tsirkin wrote: On Thu, Mar 07, 2013 at 12:31:56PM +0800, Jason Wang wrote: After commit 2b8b328b61c799957a456a5a8dab8cc7dea68575 (vhost_net: handle

TCP small packets throughput and multiqueue virtio-net

2013-03-07 Thread Jason Wang
Hello all: I meet an issue when testing multiqueue virtio-net. When I testing guest small packets stream sending performance with netperf. I find an regression of multiqueue. When I run 2 sessions of TCP_STREAM test with 1024 byte from guest to local host, I get following result: 1q result:

[PATCH] vhost_net: remove tx polling state

2013-03-06 Thread Jason Wang
. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c | 60 drivers/vhost/vhost.c |3 ++ 2 files changed, 13 insertions(+), 50 deletions(-) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 959b1cd..d1a03dd 100644

Re: [Qemu-devel] [PATCH V4 RESEND 15/22] tap: multiqueue support

2013-02-20 Thread Jason Wang
On 02/11/2013 06:28 PM, Markus Armbruster wrote: Commit 264986e2 extended NetdevTapOptions without updating the documentation. Hasn't been addressed since. Must fix for 1.4, in my opinion. Will send a patch to fix this. Thanks This is the offending patch: Jason Wang jasow...@redhat.com

Re: [Qemu-devel] [PATCH V4 RESEND 09/22] net: multiqueue support

2013-02-18 Thread Jason Wang
On 02/13/2013 05:21 AM, Alexander Graf wrote: On 01.02.2013, at 08:39, Jason Wang wrote: This patch adds basic multiqueue support for qemu. The idea is simple, an array of NetClientStates were introduced in NICState, parse_netdev() were extended to find and match all NetClientStates

Re: [PATCH V4 RESEND 00/22] Multiqueue virtio-net

2013-02-01 Thread Jason Wang
On 02/01/2013 03:39 PM, Jason Wang wrote: Hello all: This seires is an update of last version of multiqueue virtio-net support. Hi Anthony: This series is not applied cleanly on master, could you please pick those for 1.4? Thanks -- To unsubscribe from this list: send the line unsubscribe

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

2013-01-31 Thread Jason Wang
On 01/31/2013 09:44 PM, Eric Blake wrote: On 01/31/2013 12:00 AM, Jason Wang wrote: On 01/31/2013 02:29 AM, Eric Blake wrote: On 01/30/2013 04:12 AM, Jason Wang wrote: With this changes, user could start a multiqueue virtio-net device through ./qemu -netdev tap,id=hn0,queues=2,vhost

Re: [PATCH V4 00/22] Multiqueue virtio-net

2013-01-31 Thread Jason Wang
On 01/31/2013 10:36 PM, Michael S. Tsirkin wrote: On Thu, Jan 31, 2013 at 04:21:49PM +0200, Michael S. Tsirkin wrote: On Wed, Jan 30, 2013 at 07:12:19PM +0800, Jason Wang wrote: Hello all: This seires is an update of last version of multiqueue virtio-net support. This series tries to brings

[PATCH V4 RESEND 00/22] Multiqueue virtio-net

2013-01-31 Thread Jason Wang
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 Jason Wang (22): net: tap: using bool instead of bitfield net: tap: use abort() instead of assert(0) net: introduce

[PATCH V4 RESEND 01/22] net: tap: using bool instead of bitfield

2013-01-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-net.c |2 +- include/net/tap.h |4 ++-- net/tap-win32.c |6 +++--- net/tap.c | 38 ++ 4 files changed, 24 insertions(+), 26

[PATCH V4 RESEND 02/22] net: tap: use abort() instead of assert(0)

2013-01-31 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap-linux.c |4 ++-- net/tap-win32.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 059f5f3..0a6acc7 100644 --- a/net/tap

[PATCH V4 RESEND 03/22] net: introduce qemu_get_queue()

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw

[PATCH V4 RESEND 04/22] net: introduce qemu_get_nic()

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/cadence_gem.c

[PATCH V4 RESEND 05/22] net: intorduce qemu_del_nic()

2013-01-31 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- 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

[PATCH V4 RESEND 06/22] net: introduce qemu_find_net_clients_except()

2013-01-31 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 jasow...@redhat.com

[PATCH V4 RESEND 07/22] net: introduce qemu_net_client_setup()

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com

[PATCH V4 RESEND 08/22] net: introduce NetClientState destructor

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m

[PATCH V4 RESEND 09/22] net: multiqueue support

2013-01-31 Thread Jason Wang
is not allowed. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/dp8393x.c|2 +- hw/mcf_fec.c|2 +- hw/qdev-properties-system.c | 46 +++--- hw/qdev-properties.h|6 +- include/net/net.h

[PATCH V4 RESEND 10/22] tap: import linux multiqueue constants

2013-01-31 Thread Jason Wang
with 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap-linux.h |4 1 files changed, 4

[PATCH V4 RESEND 11/22] tap: factor out common tap initialization

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap.c | 130

[PATCH V4 RESEND 12/22] tap: add Linux multiqueue support

2013-01-31 Thread Jason Wang
is only supported in Linux, return error on other platforms. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- net/tap-aix.c | 10 ++ net/tap-bsd.c | 10 ++ net/tap-haiku.c | 10 ++ net/tap-linux.c | 51

[PATCH V4 RESEND 13/22] tap: support enabling or disabling a queue

2013-01-31 Thread Jason Wang
only done when the tap was enabled. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/net/tap.h |2 ++ net/tap-win32.c | 10 ++ net/tap.c | 43 --- 3 files changed, 52

[PATCH V4 RESEND 14/22] tap: introduce a helper to get the name of an interface

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/net/tap.h |1 + net/tap-aix.c |5 + net/tap

[PATCH V4 RESEND 15/22] tap: multiqueue support

2013-01-31 Thread Jason Wang
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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- include/net/tap.h |1 - net/tap-aix.c |3 +- net/tap-bsd.c

[PATCH V4 RESEND 18/22] virtio: add a queue_index to VirtQueue

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0

[PATCH V4 RESEND 19/22] virtio-net: separate virtqueue from VirtIONet

2013-01-31 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 jasow...@redhat.com Signed-off

[PATCH V4 RESEND 20/22] virtio-net: multiqueue support

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio-net.c | 301

[PATCH V4 RESEND 21/22] virtio-net: migration support for multiqueue

2013-01-31 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 jasow...@redhat.com Signed-off-by: Michael S

[PATCH V4 RESEND 22/22] virtio-net: compat multiqueue support

2013-01-31 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang jasow...@redhat.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- 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 ba09714..0af436c 100644 --- a/hw

[PATCH V4 RESEND 17/22] virtio: introduce virtio_del_queue()

2013-01-31 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 jasowang Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11

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

2013-01-30 Thread Jason Wang
On 01/30/2013 07:03 AM, Michael S. Tsirkin wrote: On Tue, Jan 29, 2013 at 04:55:25PM -0600, Anthony Liguori wrote: Michael S. Tsirkin m...@redhat.com writes: On Tue, Jan 29, 2013 at 08:10:26PM +, Blue Swirl wrote: On Tue, Jan 29, 2013 at 1:50 PM, Jason Wang jasow...@redhat.com wrote

[PATCH V4 00/22] Multiqueue virtio-net

2013-01-30 Thread Jason Wang
9415.04 312.68 9409.29 300.9 16384 4 9391.96 405.17 9695.12 310.54 9423.76 223.47 Jason Wang (22): net: tap: using bool instead of bitfield net: tap: use abort() instead of assert(0) net: introduce qemu_get_queue() net: introduce qemu_get_nic() net: intorduce qemu_del_nic() net

[PATCH V4 01/22] net: tap: using bool instead of bitfield

2013-01-30 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c |2 +- include/net/tap.h |4 ++-- net/tap-win32.c |6 +++--- net/tap.c | 38 ++ 4 files changed, 24 insertions(+), 26 deletions(-) diff --git a/hw/virtio-net.c b/hw

[PATCH V4 02/22] net: tap: use abort() instead of assert(0)

2013-01-30 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- net/tap-linux.c |4 ++-- net/tap-win32.c |2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/net/tap-linux.c b/net/tap-linux.c index 059f5f3..0a6acc7 100644 --- a/net/tap-linux.c +++ b/net/tap-linux.c @@ -164,7 +164,7

[PATCH V4 03/22] net: introduce qemu_get_queue()

2013-01-30 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 jasow...@redhat.com --- hw/cadence_gem.c|9 +++-- hw/dp8393x.c

[PATCH V4 04/22] net: introduce qemu_get_nic()

2013-01-30 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 jasow...@redhat.com --- hw/cadence_gem.c|8 hw/dp8393x.c

[PATCH V4 05/22] net: intorduce qemu_del_nic()

2013-01-30 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- 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

[PATCH V4 06/22] net: introduce qemu_find_net_clients_except()

2013-01-30 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 jasow...@redhat.com

[PATCH V4 07/22] net: introduce qemu_net_client_setup()

2013-01-30 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 jasow...@redhat.com --- net/net.c | 29 +++-- 1

[PATCH V4 08/22] net: introduce NetClientState destructor

2013-01-30 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 jasow...@redhat.com --- include/net/net.h |2 ++ net

[PATCH V4 09/22] net: multiqueue support

2013-01-30 Thread Jason Wang
is not allowed. Signed-off-by: Jason Wang jasow...@redhat.com --- 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

[PATCH V4 10/22] tap: import linux multiqueue constants

2013-01-30 Thread Jason Wang
with 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 jasow...@redhat.com --- net/tap-linux.h |4 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/net/tap

[PATCH V4 11/22] tap: factor out common tap initialization

2013-01-30 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 jasow...@redhat.com --- net/tap.c | 130 ++--- 1 files changed, 73

[PATCH V4 12/22] tap: add Linux multiqueue support

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

[PATCH V4 13/22] tap: support enabling or disabling a queue

2013-01-30 Thread Jason Wang
only done when the tap was enabled. Signed-off-by: Jason Wang jasow...@redhat.com --- 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

[PATCH V4 14/22] tap: introduce a helper to get the name of an interface

2013-01-30 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 jasow...@redhat.com --- include/net/tap.h |1 + net/tap-aix.c |6 ++ net/tap-bsd.c |4 net/tap-haiku.c |4

[PATCH V4 15/22] tap: multiqueue support

2013-01-30 Thread Jason Wang
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 jasow...@redhat.com --- include/net/tap.h |1 - net/tap-aix.c |3 +- net/tap-bsd.c |3 +- net/tap-haiku.c |3 +- net/tap

[PATCH V4 16/22] vhost: multiqueue support

2013-01-30 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 jasow

[PATCH V4 17/22] virtio: introduce virtio_del_queue()

2013-01-30 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 jasowang --- hw/virtio.c |9 + hw/virtio.h |2 ++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b

[PATCH V4 18/22] virtio: add a queue_index to VirtQueue

2013-01-30 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 jasow...@redhat.com --- hw/virtio.c |8 hw/virtio.h |1 + 2 files changed, 9 insertions(+), 0 deletions(-) diff --git a/hw/virtio.c b/hw

[PATCH V4 19/22] virtio-net: separate virtqueue from VirtIONet

2013-01-30 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 jasow...@redhat.com --- hw/virtio

[PATCH V4 20/22] virtio-net: multiqueue support

2013-01-30 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 jasow...@redhat.com --- hw/virtio-net.c | 303

[PATCH V4 21/22] virtio-net: migration support for multiqueue

2013-01-30 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 jasow...@redhat.com --- hw/virtio-net.c

[PATCH V4 22/22] virtio-net: compat multiqueue support

2013-01-30 Thread Jason Wang
Disable multiqueue support for pre 1.4. Signed-off-by: Jason Wang jasow...@redhat.com --- 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 b9a9b2e..84069b1 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -309,6 +309,10

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

2013-01-30 Thread Jason Wang
On 01/31/2013 02:29 AM, Eric Blake wrote: On 01/30/2013 04:12 AM, Jason Wang wrote: With this changes, user could start a multiqueue virtio-net device through ./qemu -netdev tap,id=hn0,queues=2,vhost=on -device virtio-net-pci,netdev=hn0 Management tools such as libvirt can pass multiple pre

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 jasow...@redhat.com 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 be enabled/disabled

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 multiple vhost

[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 jasow...@redhat.com --- hw/cadence_gem.c|8 hw/dp8393x.c

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

2013-01-29 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- 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

[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 jasow...@redhat.com

[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 jasow...@redhat.com --- include/net/net.h |2 ++ net

[PATCH V3 07/20] net: multiqueue support

2013-01-29 Thread Jason Wang
is not allowed. Signed-off-by: Jason Wang jasow...@redhat.com --- 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

[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 jasow...@redhat.com --- hw/cadence_gem.c|9 +++-- hw/dp8393x.c

[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 jasow...@redhat.com --- net/tap.c | 130 ++--- 1 files changed, 73

[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 jasow...@redhat.com --- net/net.c | 29 +++-- 1

[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 jasow...@redhat.com --- net/tap-aix.c | 10 ++ net/tap-bsd.c | 11 +++ net/tap-haiku.c | 11 +++ net/tap-linux.c | 52

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

2013-01-29 Thread Jason Wang
only done when the tap was enabled. Signed-off-by: Jason Wang jasow...@redhat.com --- 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

[PATCH V3 13/20] tap: multiqueue support

2013-01-29 Thread Jason Wang
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 jasow...@redhat.com --- include/net/tap.h |1 - net/tap-aix.c |3 +- net/tap-bsd.c |3 +- net/tap-haiku.c |3 +- net/tap

<    1   2   3   4   5   6   7   8   >