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

2012-07-29 Thread Jason Wang
On 07/29/2012 05:50 PM, Michael S. Tsirkin wrote: On Mon, Jul 23, 2012 at 01:48:35PM +0800, Jason Wang wrote: + } - if (virtio_has_feature(vi-vdev, VIRTIO_NET_F_CTRL_VQ)) { + ret = vi-vdev-config-find_vqs(vi-vdev, total_vqs, vqs, callbacks

[PATCH 1/2] virtio: fix typos of memory barriers

2012-01-20 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/virtio/virtio_ring.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/virtio/virtio_ring.c b/drivers/virtio/virtio_ring.c index 79e1b29..78428a8 100644 --- a/drivers/virtio/virtio_ring.c +++ b/drivers

[PATCH 2/2] virtio: correct the memory barrier in virtqueue_kick_prepare()

2012-01-20 Thread Jason Wang
Use virtio_mb() to make sure the available index to be exposed before checking the the avail event. Otherwise we may get stale value of avail event in guest and never kick the host after. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/virtio/virtio_ring.c |6 +++--- 1 files

[net-next RFC V2 PATCH 0/5] Multiqueue support in tun/tap

2011-09-17 Thread Jason Wang
for multiple sessions. More reasonable method is needed. Please comment, thanks. Any suggestions are welcomed. --- Jason Wang (5): tuntap: move socket to tun_file tuntap: categorize ioctl tuntap: introduce multiqueue flags tuntap: multiqueue support tuntap: add ioctls

[net-next RFC V2 PATCH 1/5] tuntap: move socket to tun_file

2011-09-17 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 347 +++-- 1 files changed, 178 insertions(+), 169 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 7bea9c6..b64ad05 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c

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

2011-09-17 Thread Jason Wang
As we've moved socket related structure to file-private_data, we move the ioctls that only touch socket out of tun_chr_ioctl() as it don't need hold rtnl lock. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 52 ++-- 1 files

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

2011-09-17 Thread Jason Wang
and NETIF_F_LLTX to synchronize between hot path and systemcall. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 358 + 1 files changed, 223 insertions(+), 135 deletions(-) diff --git a/drivers/net/tun.c b/drivers/net/tun.c index

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

2011-09-17 Thread Jason Wang
New ioctls were added to let multiple files/sockets to be attached to a tap device. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 25 ++--- include/linux/if_tun.h |3 +++ 2 files changed, 25 insertions(+), 3 deletions(-) diff --git

[net-next RFC V2 PATCH 3/5] tuntap: introduce multiqueue flags

2011-09-17 Thread Jason Wang
Add flags to be used by creating multiqueue tuntap device. 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

Re: [net-next RFC V2 PATCH 0/5] Multiqueue support in tun/tap

2011-09-19 Thread Jason Wang
On 09/18/2011 03:17 AM, Michael S. Tsirkin wrote: On Sat, Sep 17, 2011 at 02:02:04PM +0800, Jason Wang wrote: A wiki-page was created to narrate the detail design of all parts involved in the multi queue implementation: http://www.linux-kvm.org/page/Multiqueue and some basic tests result could

[RFC v2 PATCH 0/4] Support sending gratuitous by guest

2011-10-21 Thread Jason Wang
add a model specific fucntion which can let nic model to implement its own announce function and then implement a virtio-net specific function to let guest send the gratitous packet. Only basic test were done. Comments are welcomed. Thanks --- Jason Wang (4): announce self after vm start

[RFC v2 PATCH 1/4] announce self after vm start

2011-10-21 Thread Jason Wang
entry may not existed because of aging. This patch solve this by call qemu_announce_self() in vm_start() instead of in process_incoming_migration(). Through this, gratituous packets were sent each time when vm starts. Signed-off-by: Jason Wang jasow...@redhat.com --- migration.c |1 - vl.c

[RFC v2 PATCH 2/4] net: export announce_self_create()

2011-10-21 Thread Jason Wang
Export and move announce_self_create() to net.c in order to be used by model specific announcing function. Signed-off-by: Jason Wang jasow...@redhat.com --- net.c| 31 +++ net.h|1 + savevm.c | 32 3 files changed, 32

[RFC v2 PATCH 3/4] net: model specific announcing support

2011-10-21 Thread Jason Wang
-by: Jason Wang jasow...@redhat.com --- net.h|2 ++ savevm.c |8 +--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/net.h b/net.h index 4943d4b..1845f01 100644 --- a/net.h +++ b/net.h @@ -46,6 +46,7 @@ typedef ssize_t (NetReceive)(VLANClientState *, const uint8_t

[RFC v2 PATCH 4/4] virtio-net: notify guest to annouce itself

2011-10-21 Thread Jason Wang
( such as sending gratituous packets ) through config update interrupt. When gust have done the annoucement, it should clear that bit. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 20 +++- hw/virtio-net.h |2 ++ 2 files changed, 21 insertions(+), 1

[RFC v2 PATCH 5/4 PATCH] virtio-net: send gratuitous packet when needed

2011-10-21 Thread Jason Wang
bit VIRTIO_NET_F_GUEST_ANNOUNCE. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 31 ++- include/linux/virtio_net.h |2 ++ 2 files changed, 32 insertions(+), 1 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net

Re: [Qemu-devel] [RFC v2 PATCH 5/4 PATCH] virtio-net: send gratuitous packet when needed

2011-10-24 Thread Jason Wang
On 10/24/2011 01:25 PM, Michael S. Tsirkin wrote: On Mon, Oct 24, 2011 at 02:54:59PM +1030, Rusty Russell wrote: On Sat, 22 Oct 2011 13:43:11 +0800, Jason Wang jasow...@redhat.com wrote: This make let virtio-net driver can send gratituous packet by a new config bit - VIRTIO_NET_S_ANNOUNCE

Re: [Qemu-devel] [RFC v2 PATCH 5/4 PATCH] virtio-net: send gratuitous packet when needed

2011-10-25 Thread Jason Wang
On 10/25/2011 11:41 PM, Michael S. Tsirkin wrote: On Tue, Oct 25, 2011 at 10:50:41AM +0800, Jason Wang wrote: On 10/24/2011 01:25 PM, Michael S. Tsirkin wrote: On Mon, Oct 24, 2011 at 02:54:59PM +1030, Rusty Russell wrote: On Sat, 22 Oct 2011 13:43:11 +0800, Jason Wang jasow...@redhat.com

[virtio-spec: RFC PATCH] virtio-spec: introduce VIRTIO_NET_F_GUEST_ANNOUNCE

2011-10-26 Thread Jason Wang
. When guest notice this, it should clear it and send the gratuitous packet. Signed-off-by: Jason Wang jasow...@redhat.com --- virtio-spec.lyx | 45 - 1 files changed, 44 insertions(+), 1 deletions(-) diff --git a/virtio-spec.lyx b/virtio-spec.lyx index

Re: [virtio-spec: RFC PATCH] virtio-spec: introduce VIRTIO_NET_F_GUEST_ANNOUNCE

2011-10-26 Thread Jason Wang
On 10/27/2011 09:32 AM, Rusty Russell wrote: On Wed, 26 Oct 2011 16:49:12 +0800, Jason Wang jasow...@redhat.com wrote: Network connections in guest need to be kept after migration. This is done by sending gratuitous packet and let switch learn new port of the mac address. As hypervisor does

[RFC v3 PATCH 0/4] Send gratuitous packets by guest

2011-10-27 Thread Jason Wang
the unused patch of function export. - Typos and other comments from Stefan Hajnoczi. - Disable guest announce for compat machine types. --- Jason Wang (4): announce self after vm start net: model specific announcing support virtio-net: notify guest to annouce itself virtio-net

[RFC v3 PATCH 1/4] announce self after vm start

2011-10-27 Thread Jason Wang
gratuitous packet by guest may change the state of device, so we need to do it after vm is started. Signed-off-by: Jason Wang jasow...@redhat.com --- gdbstub.c |2 +- migration.c |4 ++-- monitor.c |4 ++-- savevm.c|2 +- sysemu.h|2 +- vl.c|7 +-- 6

[RFC v3 PATCH 2/4] net: model specific announcing support

2011-10-27 Thread Jason Wang
This patch introduces a function pointer in NetClientInfo which is called during self announcement to do the model specific announcing. The first user would be virtio-net. Signed-off-by: Jason Wang jasow...@redhat.com --- net.h|2 ++ savevm.c |8 +--- 2 files changed, 7

[RFC v3 PATCH 3/4] virtio-net: notify guest to annouce itself

2011-10-27 Thread Jason Wang
link through config update interrupt. When gust have done the annoucement, it should clear that bit. The feature is negotiated by bit VIRTIO_NET_F_ANNOUNCE. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/virtio-net.c | 18 +- hw/virtio-net.h |3 +++ 2 files changed

[RFC v3 PATCH 4/4] virtio-net: compat guest announce support.

2011-10-27 Thread Jason Wang
Disable guest announce for compat machine types. Signed-off-by: Jason Wang jasow...@redhat.com --- hw/pc_piix.c | 16 1 files changed, 16 insertions(+), 0 deletions(-) diff --git a/hw/pc_piix.c b/hw/pc_piix.c index 8c7f2b7..6ca50a6 100644 --- a/hw/pc_piix.c +++ b/hw/pc_piix.c

[RFC v3 PATCH 5/4 PATCH] virtio-net: send gratuitous packet when needed

2011-10-27 Thread Jason Wang
would be scheduled to send gratuitous packet through NETDEV_NOTIFY_PEERS. This feature is negotiated through bit VIRTIO_NET_F_GUEST_ANNOUNCE. Changes from v2: - Fix the race between unregister_dev() and workqueue Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c

Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-15 Thread jason wang
On 11/15/2011 12:44 PM, Krishna Kumar2 wrote: Sasha Levin levinsasha...@gmail.com wrote on 11/14/2011 03:45:40 PM: Why both the bandwidth and latency performance are dropping so dramatically with multiple VQ? It looks like theres no hash sync between host and guest, which makes the RX VQ

Re: [RFC] kvm tools: Implement multiple VQ for virtio-net

2011-11-16 Thread jason wang
On 11/16/2011 05:09 PM, Krishna Kumar2 wrote: jason wang jasow...@redhat.com wrote on 11/16/2011 11:40:45 AM: Hi Jason, Have any thought in mind to solve the issue of flow handling? So far nothing concrete. Maybe some performance numbers first is better, it would let us know where we

[net-next RFC PATCH 0/5] Series short description

2011-12-05 Thread Jason Wang
: - An alternative idea instead of shared page is ctrl vq, the reason that a shared table is preferable is the delay of ctrl vq itself. - Optimization on irq affinity and tx queue selection Comments are welcomed, thanks! --- Jason Wang (5): virtio_net: passing rxhash through vnet_hdr tuntap

[net-next RFC PATCH 1/5] virtio_net: passing rxhash through vnet_hdr

2011-12-05 Thread Jason Wang
This patch enables the ability to pass the rxhash value to guest through vnet_hdr. This is useful for guest when it wants to cooperate with virtual device to steer a flow to dedicated guest cpu. This feature is negotiated through VIRTIO_NET_F_GUEST_RXHASH. Signed-off-by: Jason Wang jasow

[net-next RFC PATCH 2/5] tuntap: simple flow director support

2011-12-05 Thread Jason Wang
set through a new kind of ioctl - TUNSETFD and were pinned until device exit or another new page were specified. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/tun.c | 63 include/linux/if_tun.h | 10 2 files

[net-next RFC PATCH 3/5] macvtap: flow director support

2011-12-05 Thread Jason Wang
Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/macvlan.c |4 drivers/net/macvtap.c | 36 ++-- include/linux/if_macvlan.h |1 + 3 files changed, 39 insertions(+), 2 deletions(-) diff --git a/drivers/net/macvlan.c b/drivers

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

2011-12-05 Thread Jason Wang
Device specific irq configuration may be need in order to do some optimization. So a new configuration is needed to get the irq of a virtqueue. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/lguest/lguest_device.c |8 drivers/s390/kvm/kvm_virtio.c |6 ++ drivers

[net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-05 Thread Jason Wang
use the guest scheduler to balance the load of TX and reduce the lock contention on egress path, so the processor_id() were used to tx queue selection. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 165 +++- include/linux

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-05 Thread Jason Wang
On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote: On Mon, Dec 5, 2011 at 8:59 AM, Jason Wangjasow...@redhat.com wrote: +static int virtnet_set_fd(struct net_device *dev, u32 pfn) +{ + struct virtnet_info *vi = netdev_priv(dev); + struct virtio_device *vdev = vi-vdev; + + if

Re: [net-next RFC PATCH 2/5] tuntap: simple flow director support

2011-12-05 Thread Jason Wang
On 12/06/2011 04:09 AM, Ben Hutchings wrote: On Mon, 2011-12-05 at 16:58 +0800, Jason Wang wrote: This patch adds a simple flow director to tun/tap device. It is just a page that contains the hash to queue mapping which could be changed by user-space. The backend (tap/macvtap) would query

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-05 Thread Jason Wang
On 12/06/2011 04:42 AM, Ben Hutchings wrote: On Mon, 2011-12-05 at 16:59 +0800, Jason Wang wrote: In order to let the packets of a flow to be passed to the desired guest cpu, we can co-operate with devices through programming the flow director which was just a hash to queue table. This kinds

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-06 Thread Jason Wang
On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow...@redhat.com wrote: On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote: On Mon, Dec 5, 2011 at 8:59 AM, Jason Wangjasow...@redhat.comwrote: +static int virtnet_set_fd(struct net_device *dev, u32

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-06 Thread Jason Wang
On 12/06/2011 09:15 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow...@redhat.comwrote: On 12/05/2011 06:55 PM, Stefan Hajnoczi wrote: On Mon,

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/06/2011 11:42 PM, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On 12/06/2011 05:18 PM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 6:33 AM, Jason Wangjasow...@redhat.com wrote: On

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/07/2011 07:10 AM, Sridhar Samudrala wrote: On 12/6/2011 8:14 AM, Michael S. Tsirkin wrote: On Tue, Dec 06, 2011 at 07:42:54AM -0800, Sridhar Samudrala wrote: On 12/6/2011 5:15 AM, Stefan Hajnoczi wrote: On Tue, Dec 6, 2011 at 10:21 AM, Jason Wangjasow...@redhat.com wrote: On

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-07 Thread Jason Wang
On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wangjasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation Hello all: This is a rough series adds the guest/host cooperation of flow steering support based on

Re: [net-next RFC PATCH 5/5] virtio-net: flow director support

2011-12-07 Thread Jason Wang
On 12/07/2011 05:08 PM, Stefan Hajnoczi wrote: [...] Consider the complexity of the host nic each with their own steering features, this series make the first step with minimal effort to try to let guest driver and host tap/macvtap co-operate like what physical nic does. There may be

Re: [net-next RFC PATCH 0/5] Series short description

2011-12-08 Thread Jason Wang
On 12/08/2011 01:02 AM, Ben Hutchings wrote: On Wed, 2011-12-07 at 19:31 +0800, Jason Wang wrote: On 12/07/2011 03:30 PM, Rusty Russell wrote: On Mon, 05 Dec 2011 16:58:37 +0800, Jason Wangjasow...@redhat.com wrote: multiple queue virtio-net: flow steering through host/guest cooperation

[PATCH] kvm: ioapic: conditionally delay irq delivery during eoi broadcast

2012-03-12 Thread Jason Wang
in case it may register one very soon and for guest who has a bad irq detection routine ( such as note_interrupt() in linux ), this bad irq would be recognized soon as in the past. Signed-off-by: Jason Wang jasow...@redhat.com --- virt/kvm/ioapic.c | 47

Re: [PATCH] kvm: ioapic: conditionally delay irq delivery during eoi broadcast

2012-03-12 Thread Jason Wang
On 03/12/2012 05:23 PM, Gleb Natapov wrote: On Mon, Mar 12, 2012 at 05:07:35PM +0800, Jason Wang wrote: Currently, we call ioapic_service() immediately when we find the irq is still active during eoi broadcast. But for real hardware, there's some dealy between the EOI writing and irq

Re: [RFC PATCH 0/1] NUMA aware scheduling per vhost thread patch

2012-03-27 Thread Jason Wang
Hi: Thanks for the work and it looks very reasonable, some questions below. On 03/23/2012 07:48 AM, Shirley Ma wrote: Sorry for being late to submit this patch. I have spent lots of time trying to find the best approach. This effort is still going on... This patch is built against net-next

Re: question about napi_disable (was Re: [PATCH] virtio_net: set/cancel work on ndo_open/ndo_stop)

2012-04-05 Thread Jason Wang
On 04/04/2012 05:32 PM, Michael S. Tsirkin wrote: On Thu, Dec 29, 2011 at 09:12:38PM +1030, Rusty Russell wrote: Michael S. Tsirkin noticed that we could run the refill work after ndo_close, which can re-enable napi - we don't disable it until virtnet_remove. This is clearly wrong, so

[PATCH 0/2] adding tracepoints to vhost

2012-04-09 Thread Jason Wang
specific tracepoints? --- Jason Wang (2): vhost: basic tracepoints tools: virtio: add a top-like utility for displaying vhost satistics drivers/vhost/trace.h | 153 drivers/vhost/vhost.c | 17 ++ tools/virtio/vhost_stat | 360

[PATCH 1/2] vhost: basic tracepoints

2012-04-09 Thread Jason Wang
To help for the performance optimizations and debugging, this patch tracepoints for vhost. Pay attention that the tracepoints are only for vhost, net code are not touched. Two kinds of activities were traced: virtio and vhost work. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost

[PATCH 2/2] tools: virtio: add a top-like utility for displaying vhost satistics

2012-04-09 Thread Jason Wang
4 0 Signed-off-by: Jason Wang jasow...@redhat.com --- tools/virtio/vhost_stat | 360 +++ 1 files changed, 360 insertions(+), 0 deletions(-) create mode 100755 tools/virtio/vhost_stat diff --git a/tools/virtio/vhost_stat b/tools/virtio

Re: [RFC PATCH 0/2] Multiqueue support for qemu(virtio-net)

2011-04-20 Thread Jason Wang
=32 -enable-kvm -smp $smp Regards, - KK Jason Wang jasow...@redhat.com wrote on 04/20/2011 02:03:07 PM: Jason Wang jasow...@redhat.com 04/20/2011 02:03 PM To Krishna Kumar2/India/IBM@IBMIN, kvm@vger.kernel.org, m...@redhat.com, net...@vger.kernel.org, ru

[RFC PATCH 0/2] Multiqueue support for qemu(virtio-net)

2011-04-27 Thread Jason Wang
Jason Wang writes: Inspired by Krishna's patch (http://www.spinics.net/lists/kvm/msg52098.html) and Michael's suggestions. The following series adds the multiqueue support for qemu and enable it for virtio-net (both userspace and vhost). The aim for this series is to simplified

Re: [Qemu-devel] [RFC PATCH 0/2] Multiqueue support for qemu(virtio-net)

2011-04-30 Thread Jason Wang
Anthony Liguori writes: On 04/20/2011 10:33 PM, Jason Wang wrote: Krishna Kumar2 writes: Thanks Jason! So I can use my virtio-net guest driver and test with this patch? Please provide the script you use to start MQ guest. Yes and thanks. Following

Re: [Qemu-devel] [RFC PATCH 1/2] net: Add multiqueue support

2011-04-30 Thread Jason Wang
Anthony Liguori writes: On 04/20/2011 03:33 AM, Jason Wang wrote: This patch adds the multiqueues support for emulated nics. Each VLANClientState pairs are now abstract as a queue instead of a nic, and multiple VLANClientState pointers were stored in the NICState and treated

[PATCH] virtio_net: introduce VIRTIO_NET_HDR_F_DATA_VALID

2011-06-10 Thread Jason Wang
could be measured by netperf. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/macvtap.c |2 ++ drivers/net/tun.c |2 ++ drivers/net/virtio_net.c |2 ++ include/linux/virtio_net.h |1 + net/packet/af_packet.c |2 ++ 5 files changed, 9 insertions

[PATCH] vhost: set dirty log when updating flags of used ring

2011-06-16 Thread Jason Wang
We need to set log when updating flags of used ring, otherwise they may be missed after migration. A helper was introduced to write used_flags back to guest memory and update the log if necessary. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/vhost.c | 26

[PATCH 1/2] vhost: init used ring after backend was set

2011-06-21 Thread Jason Wang
This patch move the used ring initialization after backend was set. This make us possible to disable the backend and tweak the used ring then restart. And it's also useful for log setting as used ring have been checked then. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/net.c

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

2011-06-21 Thread Jason Wang
We need set log when updating used flags and avail event. Otherwise guest may see stale values after migration and then do not exit or exit unexpectedly. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/vhost/vhost.c | 61 +++-- 1 files

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

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 Wang jasowang Actually del_queue

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); +} + +return ret; +} + +static void

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) { +ret = -1; +} else { +ret

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:32 PM, Jason Wang wrote: +} else if (nc-peer-info-type

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 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao

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 PM, Jason Wang wrote: On 01/08/2013 05:07 PM, Wanlong Gao

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 @@ -2465,7 +2465,7 @@ { 'type': 'NetdevTapOptions

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 PM, Jason Wang wrote: On 01/08/2013 05:49 PM, Wanlong Gao

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 82599EB Host/Guest kernel: David net tree vhost

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: Looks like

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: On 01/08/2013 06:00 PM, Wanlong Gao wrote: On 01/08/2013

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: On 01/09/2013 04:23 PM, Wanlong Gao

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:31:52PM +0800, Jason Wang wrote: Perf

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: On 01/09/2013 06:01 PM, Wanlong Gao wrote

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, thanks

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. Tsirkin wrote: On Wed, Jan 09, 2013 at 03:29

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

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

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 S. Tsirkin wrote: On Sun, Jan 06, 2013

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 S. Tsirkin wrote: On Mon, Jan 07, 2013

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 jasow...@redhat.com 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 support for multiqueue tap, nic and vhost

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

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

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 rom...@orebokech.com wrote: Creating a vhost-net device allocates an object large enough (34320 bytes on x86-64) to trigger an

[PATCH V2 00/20] Multiqueue virtio-net

2013-01-25 Thread Jason Wang
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 Jason Wang (20): net: introduce qemu_get_queue() net: introduce

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

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

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

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

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

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

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

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

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

[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 jasow

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

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

<    1   2   3   4   5   6   7   8   >