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

2012-12-04 Thread Jason Wang
...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- 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

[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 krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c| 472 ++- include/uapi/linux/virtio_net.h

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 multiqueue support to virtio_net

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 is running. This would

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 mandatory to address. Thanks

[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 jasow...@redhat.com --- drivers/net/virtio_net.c | 43 +++ 1 files

[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 krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com

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

2012-12-05 Thread Jason Wang
...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- 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

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

2012-12-05 Thread Jason Wang
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 through ethtool drivers/net/virtio_net.c| 726

[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 jasow...@redhat.com --- drivers/net/virtio_net.c | 43 +++ 1 files

[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 krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com

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

2012-12-07 Thread Jason Wang
...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- 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

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

[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 jasow...@redhat.com --- drivers/vhost/net.c | 75 + drivers/vhost/vhost.c | 16 +- drivers/vhost/vhost.h | 11 ++- 3 files changed

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

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 this by: Can this kernel crash be reproduced

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). Fix this by: - extend

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 jasow...@redhat.com --- drivers/vhost/net.c | 14 +++--- 1 files

[PATCH 00/12] Multiqueue virtio-net

2012-12-28 Thread Jason Wang
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 queue_index

[PATCH 01/12] tap: multiqueue support

2012-12-28 Thread Jason Wang
) 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 jasow...@redhat.com --- net/tap-aix.c

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

[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 jasow...@redhat.com --- hw/e1000.c |2 +- hw/eepro100

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

[PATCH 05/12] net: multiqueue support

2012-12-28 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- 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

[PATCH 06/12] vhost: multiqueue support

2012-12-28 Thread Jason Wang
virtqueue which this vhost thread serves. Signed-off-by: Jason Wang jasow...@redhat.com --- 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

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

[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 jasow...@redhat.com --- hw/virtio-net.c | 318

[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 jasow...@redhat.com --- hw/virtio-net.c | 45 +++-- 1 files changed, 35 insertions(+), 10 deletions(-) diff --git a/hw/virtio-net.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 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 19e342a..0145370 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c @@ -295,6 +295,10

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

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 jasow...@redhat.com 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 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 jasow...@redhat.com --- drivers/vhost/net.c | 74 drivers/vhost/vhost.c | 31 +++- drivers/vhost/vhost.h |2 +- 3 files changed, 49

[PATCH V3 0/2] handle polling errors

2013-01-05 Thread Jason Wang
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 errors drivers/vhost

[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 jasow...@redhat.com --- drivers/vhost/net.c | 16 +++- 1 files changed, 11

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 this problem by: - checking

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 vhost/vhost_net, this may lead to crash

Re: [PATCH 2/2] vhost: set log when updating used flags or avail event

2011-07-08 Thread Jason Wang
On 07/07/2011 08:57 PM, Michael S. Tsirkin wrote: Subject: vhost: used ring logging cleanup remove extra log bit setting for used ring updates: it's no longer necessary. Also, use vhost_avail_event instead of duplicating offset math. Signed-off-by: Michael S. Tsirkinm...@redhat.com --- We

[net-next RFC PATCH 2/7] tuntap: categorize ioctl

2011-08-11 Thread Jason Wang
As we've moved socket related structure to file-private_data, we can separate system calls that only touch tfile from others as they don't need hold rtnl lock. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 52 ++-- 1 files

[net-next RFC PATCH 3/7] tuntap: introduce multiqueue related flags

2011-08-11 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- include/linux/if_tun.h |2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 06b1829..c92a291 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h @@ -34,6 +34,7

[net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-11 Thread Jason Wang
for multiqueue tap device. And RCU is used for doing synchronization between packet handling and system calls such as removing queues. Currently, multiqueue support is limited for tap , but it's easy also enable it for tun if we find it was also helpful. Signed-off-by: Jason Wang jasow

[net-next RFC PATCH 5/7] tuntap: add ioctls to attach or detach a file form tap device

2011-08-11 Thread Jason Wang
, and this file could be re-attach to the tap device as a queue again. After those ioctls were added, userspace can create a multiqueue tap device by open /dev/net/tap and call TUNSETIFF, then it could easily control the number of queues through TUNATTACHQUEUE and TUNDETACHQUEUE. Signed-off-by: Jason Wang

[net-next RFC PATCH 0/7] multiqueue support for tun/tap

2011-08-11 Thread Jason Wang
packets. - addressing the comments of virtio-net driver - performance tunning Please review and comment it, Thanks. --- Jason Wang (5): tuntap: move socket/sock related structures to tun_file tuntap: categorize ioctl tuntap: introduce multiqueue related flags tuntap

[net-next RFC PATCH 1/7] tuntap: move socket/sock related structures to tun_file

2011-08-11 Thread Jason Wang
to be attached to a single tap device. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 349 +++-- 1 files changed, 180 insertions(+), 169 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 71f3d1a..2739887

[net-next RFC PATCH 6/7] Change virtqueue structure

2011-08-11 Thread Jason Wang
From: Krishna Kumar krkum...@in.ibm.com Move queue_index from virtio_pci_vq_info to virtqueue. This allows callback handlers to figure out the queue number for the vq that needs attention. Signed-off-by: Krishna Kumar krkum...@in.ibm.com --- drivers/virtio/virtio_pci.c | 10 +++---

[net-next RFC PATCH 7/7] virtio-net changes

2011-08-11 Thread Jason Wang
From: Krishna Kumar krkum...@in.ibm.com Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with the old qemu since the last element is not accessed unless qemu sets VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang

[net-next RFC PATCH 0/7] multiqueue support for tun/tap

2011-08-11 Thread Jason Wang
Jason Wang writes: As multi-queue nics were commonly used for high-end servers, current single queue based tap can not satisfy the requirement of scaling guest network performance as the numbers of vcpus increase. So the following series implements multiple queue support in tun/tap

Re: [Qemu-devel] [net-next RFC PATCH 7/7] virtio-net changes

2011-08-14 Thread Jason Wang
- Original Message - On Fri, 2011-08-12 at 09:55 +0800, Jason Wang wrote: From: Krishna Kumar krkum...@in.ibm.com Implement mq virtio-net driver. Though struct virtio_net_config changes, it works with the old qemu since the last element is not accessed unless qemu sets

Re: [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-14 Thread Jason Wang
- Original Message - Le vendredi 12 août 2011 à 09:55 +0800, Jason Wang a écrit : + rxq = skb_get_rxhash(skb); + if (rxq) { + tfile = rcu_dereference(tun-tfiles[rxq % numqueues]); + if (tfile) + goto out; + } You can avoid an expensive divide with following trick : u32 idx

Re: [net-next RFC PATCH 4/7] tuntap: multiqueue support

2011-08-14 Thread Jason Wang
- Original Message - On Fri, Aug 12, 2011 at 09:55:20AM +0800, Jason Wang wrote: With the abstraction that each socket were a backend of a queue for userspace, this patch adds multiqueue support for tap device by allowing multiple sockets to be attached to a tap device. Then we

Re: [net-next RFC PATCH 0/7] multiqueue support for tun/tap

2011-08-14 Thread Jason Wang
- Original Message - On Fri, 2011-08-12 at 09:54 +0800, Jason Wang wrote: As multi-queue nics were commonly used for high-end servers, current single queue based tap can not satisfy the requirement of scaling guest network performance as the numbers of vcpus increase. So

Re: [PATCH 1/5] virtio-ring: move queue_index to vring_virtqueue

2012-08-29 Thread Jason Wang
On 08/28/2012 07:54 PM, Paolo Bonzini wrote: From: Jason Wangjasow...@redhat.com Instead of storing the queue index in transport-specific virtio structs, this patch moves them to vring_virtqueue and introduces an helper to get the value. This lets drivers simplify their management and tracing

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

2012-09-04 Thread Jason Wang
On 09/03/2012 07:55 PM, Michael S. Tsirkin wrote: At Jason's request, I am trying to help finalize the spec for the new multiqueue feature. Changes from Jason's rfc: - reserved vq 3: this makes all rx vqs even and tx vqs odd, which looks nicer to me. - documented packet steering, added a

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

2012-09-10 Thread Jason Wang
On 09/10/2012 02:33 PM, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 09:27:38AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 09:16:29AM +0300, Michael S. Tsirkin wrote: On Mon, Sep 10, 2012 at 11:42:25AM +0930, Rusty Russell wrote: OK, I read the spec (pasted below for easy

Re: [KVM-AUTOTEST PATCH 11/12] KVM test: make VMs use a dynamic MAC-IP mapping generated by tcpdump

2009-08-11 Thread Jason Wang
Hello Michael: Based on our experiences with TAP networking scripts, the verify_mac_ip_pair() could not work well under multiple nics when testing linux guests. The main problem is the policy of multiple interfaces responding in linux, we should take care of the value of

[PATCH][KVM-AUTOTEST] TAP network support in kvm-autotest

2009-05-13 Thread Jason Wang
Hi All: This patch tries to add tap network support in kvm-autotest. Multiple nics connected to different bridges could be achieved through this script. Public bridge is important for testing real network traffic and migration. The patch gives each nic with randomly generated mac address. The

Re: kvm-autotest: The automation plans?

2009-05-14 Thread jason wang
Michael Goldish 写道: - jason wang jasow...@redhat.com wrote: sudhir kumar 写道: Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we have standalone migration only. Is there any plans of enhancing kvm-autotest so

Re: [PATCH][KVM-AUTOTEST] TAP network support in kvm-autotest

2009-05-15 Thread jason wang
could be finally found somehow. During our tests, the scripts may fail to get the IP address of guest when host iptables is turned on. Please see additional comments below. - Jason Wang jasow...@redhat.com wrote: Hi All: This patch tries to add tap network support in kvm-autotest

Re: kvm-autotest: The automation plans?

2009-05-15 Thread jason wang
Michael Goldish 写道: - sudhir kumar smalik...@gmail.com wrote: On Thu, May 14, 2009 at 12:22 PM, jason wang jasow...@redhat.com wrote: sudhir kumar 写道: Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we

Re: kvm-autotest: The automation plans?

2009-05-20 Thread jason wang
sudhir kumar 写道: 2009/5/14 sudhir kumar smalik...@gmail.com: On Thu, May 14, 2009 at 12:22 PM, jason wang jasow...@redhat.com wrote: sudhir kumar 写道: Hi Uri/Lucas, Do you have any plans for enhancing kvm-autotest? I was looking mainly on the following 2 aspects: (1). we

Re: [KVM-AUTOTEST PATCH 1/2] KVM test: add shutdown test

2009-06-16 Thread jason wang
Hello Michael: The shutdown case is useful but the patch does really similar work to vm.destroy(). Maybe we could simple let the preprocess progress to shutdown all the vms just like: - shutdown: install setup vms = '' Michael Goldish 写道: The shutdown test logs into a VM and

Re: Latest kvm autotest patch queue

2009-06-25 Thread jason wang
format after test - Reviewed 2) Step file tests: introducing a new feature and some small changes - Reviewed 3) Introducing kvm_subprocess - Reviewed Jason Wang (jasow...@redhat.com) 1) TAP network support in kvm

[net-next RFC V4 PATCH 1/4] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2012-06-25 Thread Jason Wang
From: Krishna Kumar krkum...@in.ibm.com Introduce VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- include/linux/virtio_net.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux

[net-next RFC V4 PATCH 2/4] virtio_ring: move queue_index to vring_virtqueue

2012-06-25 Thread Jason Wang
Instead of storing the queue index in virtio infos, this patch moves them to vring_virtqueue and introduces helpers to set and get the value. This would simplify the management and tracing. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/virtio/virtio_mmio.c |5 + drivers

[net-next RFC V4 PATCH 0/4] Multiqueue virtio-net

2012-06-25 Thread Jason Wang
9374.67 138% 214.50 160.25 74% Changes from V3: - Rebase to the net-next - Let queue 2 to be the control virtqueue to obey the spec - Prodives irq affinity - Choose txq based on processor id References: - V3: http://lwn.net/Articles/467283/ --- Jason Wang (3): virtio_ring: move

[net-next RFC V4 PATCH 3/4] virtio: introduce a method to get the irq of a specific virtqueue

2012-06-25 Thread Jason Wang
. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/lguest/lguest_device.c |8 drivers/s390/kvm/kvm_virtio.c |6 ++ drivers/virtio/virtio_mmio.c |8 drivers/virtio/virtio_pci.c| 12 include/linux/virtio_config.h |4 5 files

[net-next RFC V4 PATCH 4/4] virtio_net: multiqueue support

2012-06-25 Thread Jason Wang
: - Txq selection is based on the processor id in order to avoid contending a lock whose owner may exits to host. - Since the txq/txq were per-cpu, affinity hint were set to the cpu that owns the queue pairs. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow

[RFC V2 PATCH 0/4] Multiqueue support for tap and virtio-net/vhost

2012-06-25 Thread Jason Wang
review and comments. --- Jason Wang (4): option: introduce qemu_get_opt_all() tap: multiqueue support net: multiqueue support virtio-net: add multiqueue support hw/dp8393x.c |2 hw/mcf_fec.c |2 hw/qdev-properties.c | 33 +++- hw/qdev.h

[RFC V2 PATCH 1/4] option: introduce qemu_get_opt_all()

2012-06-25 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- qemu-option.c | 19 +++ qemu-option.h |2 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index bb3886c..9263125 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -545,6 +545,25 @@ static QemuOpt

[RFC V2 PATCH 2/4] tap: multiqueue support

2012-06-25 Thread Jason Wang
and detach file. Platform-specific helpers were called and only linux helper has its content as multiqueue tap were only supported in linux. Signed-off-by: Jason Wang jasow...@redhat.com --- net.c |4 + net/tap-aix.c | 13 +++- net/tap-bsd.c | 13 +++- net/tap-haiku.c | 13

[RFC V2 PATCH 3/4] net: multiqueue support

2012-06-25 Thread Jason Wang
from or sent out. Virtio-net would be the first user. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/dp8393x.c |2 +- hw/mcf_fec.c |2 +- hw/qdev-properties.c | 33 +++- hw/qdev.h|3 ++- net.c| 58

[RFC V2 PATCH 4/4] virtio-net: add multiqueue support

2012-06-25 Thread Jason Wang
be used without changes in vhost code. So each vhost_net structure were used to track a single VLANClientState and two virtqueues in the past. As multiple VLANClientState were stored in the NICState, we can infer the correspond VLANClientState from this and queue_index easily. Signed-off-by: Jason Wang

Re: [net-next RFC V4 PATCH 3/4] virtio: introduce a method to get the irq of a specific virtqueue

2012-06-25 Thread Jason Wang
On 06/25/2012 06:14 PM, Michael S. Tsirkin wrote: On Mon, Jun 25, 2012 at 05:41:17PM +0800, Jason Wang wrote: Device specific irq optimizations such as irq affinity may be used by virtio drivers. So this patch introduce a new method to get the irq of a specific virtqueue. After this patch

Re: [net-next RFC V4 PATCH 0/4] Multiqueue virtio-net

2012-06-26 Thread Jason Wang
On 06/26/2012 01:49 AM, Sridhar Samudrala wrote: On 6/25/2012 2:16 AM, Jason Wang wrote: Hello All: This series is an update version of multiqueue virtio-net driver based on Krishna Kumar's work to let virtio-net use multiple rx/tx queues to do the packets reception and transmission. Please

Re: [net-next RFC V4 PATCH 0/4] Multiqueue virtio-net

2012-06-26 Thread Jason Wang
On 06/26/2012 02:01 AM, Shirley Ma wrote: Hello Jason, Good work. Do you have local guest to guest results? Thanks Shirley Hi Shirley: I would run tests to measure the performance and post here. Thanks -- To unsubscribe from this list: send the line unsubscribe kvm in the body of a message

Re: [RFC V2 PATCH 4/4] virtio-net: add multiqueue support

2012-07-02 Thread Jason Wang
On 07/01/2012 05:43 PM, Michael S. Tsirkin wrote: On Mon, Jun 25, 2012 at 06:04:49PM +0800, Jason Wang wrote: This patch let the virtio-net can transmit and recevie packets through multiuple VLANClientStates and abstract them as multiple virtqueues to guest. A new parameter 'queues' were

[net-next RFC V5 0/5] Multiqueue virtio-net

2012-07-05 Thread Jason Wang
103856.79 171% 1055.21 1245.17 118% Jason Wang (4): virtio_ring: move queue_index to vring_virtqueue virtio: intorduce an API to set affinity for a virtqueue virtio_net: multiqueue support virtio_net: support negotiating the number of queues through ctrl vq Krishna Kumar (1): virtio_net

[net-next RFC V5 1/5] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2012-07-05 Thread Jason Wang
From: Krishna Kumar krkum...@in.ibm.com Introduce VIRTIO_NET_F_MULTIQUEUE. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- include/linux/virtio_net.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/linux

[net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue

2012-07-05 Thread Jason Wang
Instead of storing the queue index in virtio infos, this patch moves them to vring_virtqueue and introduces helpers to set and get the value. This would simplify the management and tracing. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/virtio/virtio_mmio.c |5 + drivers

[net-next RFC V5 3/5] virtio: intorduce an API to set affinity for a virtqueue

2012-07-05 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/virtio/virtio_pci.c | 46 + include/linux/virtio_config.h | 21 ++ 2 files changed, 67 insertions(+), 0 deletions(-) diff --git a/drivers/virtio/virtio_pci.c b/drivers/virtio

[net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-05 Thread Jason Wang
pairs. Signed-off-by: Krishna Kumar krkum...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 645 ++- include/linux/virtio_net.h |2 + 2 files changed, 452 insertions(+), 195 deletions(-) diff --git a/drivers/net

[net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq

2012-07-05 Thread Jason Wang
index). Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 171 ++- include/linux/virtio_net.h |7 ++ 2 files changed, 142 insertions(+), 36 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c

Re: [net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue

2012-07-05 Thread Jason Wang
On 07/05/2012 07:40 PM, Sasha Levin wrote: On Thu, 2012-07-05 at 18:29 +0800, Jason Wang wrote: Instead of storing the queue index in virtio infos, this patch moves them to vring_virtqueue and introduces helpers to set and get the value. This would simplify the management and tracing. Signed

Re: [net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq

2012-07-05 Thread Jason Wang
On 07/05/2012 08:51 PM, Sasha Levin wrote: On Thu, 2012-07-05 at 18:29 +0800, Jason Wang wrote: @@ -1387,6 +1404,10 @@ static int virtnet_probe(struct virtio_device *vdev) if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) vi-has_cvq = true; + /* Use single tx

Re: [net-next RFC V5 0/5] Multiqueue virtio-net

2012-07-06 Thread Jason Wang
On 07/06/2012 01:45 AM, Rick Jones wrote: On 07/05/2012 03:29 AM, Jason Wang wrote: Test result: 1) 1 vm 2 vcpu 1q vs 2q, 1 - 1q, 2 - 2q, no pinning - Guest to External Host TCP STREAM sessions size throughput1 throughput2 norm1 norm2 1 64 650.55 655.61 100% 24.88 24.86 99% 2 64 1446.81

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-06 Thread Jason Wang
On 07/06/2012 04:02 AM, Amos Kong wrote: On 07/05/2012 06:29 PM, Jason Wang wrote: This patch converts virtio_net to a multi queue device. After negotiated VIRTIO_NET_F_MULTIQUEUE feature, the virtio device has many tx/rx queue pairs, and driver could read the number from config space

Re: [net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq

2012-07-06 Thread Jason Wang
On 07/06/2012 02:38 PM, Stephen Hemminger wrote: On Fri, 06 Jul 2012 11:20:06 +0800 Jason Wangjasow...@redhat.com wrote: On 07/05/2012 08:51 PM, Sasha Levin wrote: On Thu, 2012-07-05 at 18:29 +0800, Jason Wang wrote: @@ -1387,6 +1404,10 @@ static int virtnet_probe(struct virtio_device *vdev

[RFC V3 0/5] Multiqueue support for tap and virtio-net/vhost

2012-07-06 Thread Jason Wang
guest notifiers assignment/de-assignment - changes the command lines to: qemu -netdev tap,queues=2 -device virtio-net-pci,queues=2 References: - V2 http://www.spinics.net/lists/kvm/msg74588.html - V1 http://comments.gmane.org/gmane.comp.emulators.qemu/100481 Jason Wang (5): option: introduce

[RFC V3 1/5] option: introduce qemu_get_opt_all()

2012-07-06 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- qemu-option.c | 19 +++ qemu-option.h |2 ++ 2 files changed, 21 insertions(+), 0 deletions(-) diff --git a/qemu-option.c b/qemu-option.c index bb3886c..9263125 100644 --- a/qemu-option.c +++ b/qemu-option.c @@ -545,6 +545,25 @@ static QemuOpt

[RFC V3 2/5] tap: multiqueue support

2012-07-06 Thread Jason Wang
- increase and decrease the number of queues by introducing helpter to attach or detach a file descriptor to the device Then qemu can use this as the infrastructures of emulating a multiple queue capable network cards. Signed-off-by: Jason Wang jasow...@redhat.com --- net.c |4 + net

[RFC V3 3/5] net: multiqueue support

2012-07-06 Thread Jason Wang
from or sent out. Virtio-net would be the first user. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/dp8393x.c |2 +- hw/mcf_fec.c |2 +- hw/qdev-properties.c | 34 + hw/qdev.h|3 +- net.c| 79

[RFC V3 4/5] vhost: multiqueue support

2012-07-06 Thread Jason Wang
, this is done by introducing an vq_index filed in vhost_dev struct to record the index of first virtuque that is used by the vhost devs. Then vhost could simply convert it to the local vhost queue index and issue ioctls. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/vhost.c | 53

[RFC V3 5/5] virtio-net: add multiqueue support

2012-07-06 Thread Jason Wang
,netdev=hn0,queues=2 To let user tweak the performance, guest could negotiate the num of queues it wishes to use through control virtqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 505 ++- hw/virtio-net.h | 12 ++ 2

Re: [net-next RFC V5 0/5] Multiqueue virtio-net

2012-07-08 Thread Jason Wang
On 07/07/2012 12:23 AM, Rick Jones wrote: On 07/06/2012 12:42 AM, Jason Wang wrote: I'm not expert of tcp, but looks like the changes are reasonable: - we can do full-sized TSO check in tcp_tso_should_defer() only for westwood, according to tcp westwood - run tcp_tso_should_defer for tso_segs

Re: [net-next RFC V5 5/5] virtio_net: support negotiating the number of queues through ctrl vq

2012-07-22 Thread Jason Wang
On 07/20/2012 08:33 PM, Michael S. Tsirkin wrote: On Thu, Jul 05, 2012 at 06:29:54PM +0800, Jason Wang wrote: This patch let the virtio_net driver can negotiate the number of queues it wishes to use through control virtqueue and export an ethtool interface to let use tweak it. As current

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-22 Thread Jason Wang
On 07/20/2012 09:40 PM, Michael S. Tsirkin wrote: On Thu, Jul 05, 2012 at 06:29:53PM +0800, Jason Wang wrote: This patch converts virtio_net to a multi queue device. After negotiated VIRTIO_NET_F_MULTIQUEUE feature, the virtio device has many tx/rx queue pairs, and driver could read the number

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-22 Thread Jason Wang
On 07/21/2012 08:02 PM, Sasha Levin wrote: On 07/20/2012 03:40 PM, Michael S. Tsirkin wrote: - err = init_vqs(vi); + if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) + vi-has_cvq = true; + How about we disable multiqueue if there's no cvq? Will make logic a bit

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-29 Thread Jason Wang
On 07/29/2012 05:44 PM, Michael S. Tsirkin wrote: On Sat, Jul 21, 2012 at 02:02:58PM +0200, Sasha Levin wrote: On 07/20/2012 03:40 PM, Michael S. Tsirkin wrote: - err = init_vqs(vi); + if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) + vi-has_cvq = true; + How

Re: [net-next RFC V5 4/5] virtio_net: multiqueue support

2012-07-29 Thread Jason Wang
On 07/23/2012 05:28 PM, Sasha Levin wrote: On 07/23/2012 07:54 AM, Jason Wang wrote: On 07/21/2012 08:02 PM, Sasha Levin wrote: On 07/20/2012 03:40 PM, Michael S. Tsirkin wrote: -err = init_vqs(vi); +if (virtio_has_feature(vdev, VIRTIO_NET_F_CTRL_VQ)) +vi-has_cvq = true

Re: [net-next RFC V5 2/5] virtio_ring: move queue_index to vring_virtqueue

2012-07-29 Thread Jason Wang
On 07/26/2012 04:20 PM, Paolo Bonzini wrote: Il 05/07/2012 13:40, Sasha Levin ha scritto: @@ -275,7 +274,7 @@ static void vm_del_vq(struct virtqueue *vq) vring_del_virtqueue(vq); /* Select and deactivate the queue */ - writel(info-queue_index, vm_dev-base +

<    1   2   3   4   5   6   7   8   >