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

2012-12-03 Thread Jason Wang
On 12/03/2012 05:47 PM, Michael S. Tsirkin wrote: On Mon, Dec 03, 2012 at 02:05:27PM +0800, Jason Wang wrote: On Monday, December 03, 2012 12:34:08 PM Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +static const struct ethtool_ops virtnet_ethtool_ops; + +/* + * Converting

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

2012-12-03 Thread Jason Wang
On 12/03/2012 06:14 PM, Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: - if (!try_fill_recv(vi-rq, GFP_KERNEL)) - schedule_delayed_work(vi-rq.refill, 0); + for (i = 0; i vi-max_queue_pairs; i++) + if (!try_fill_recv(vi-rq[i

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

2012-12-02 Thread Jason Wang
On Sunday, December 02, 2012 06:06:31 PM Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:15:59PM +0800, Jason Wang wrote: This addes multiqueue support to virtio_net driver. In multiple queue modes, the driver expects the number of queue paris is equal to the number of vcpus

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

2012-12-02 Thread Jason Wang
On Monday, December 03, 2012 12:34:08 PM Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +static const struct ethtool_ops virtnet_ethtool_ops; + +/* + * Converting between virtqueue no. and kernel tx/rx queue no. + * 0:rx0 1:tx0 2:cvq 3:rx1 4:tx1 ... 2N+1:rxN 2N+2:txN

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

2012-12-02 Thread Jason Wang
On Sunday, December 02, 2012 06:09:06 PM Michael S. Tsirkin wrote: On Tue, Nov 27, 2012 at 06:16:00PM +0800, Jason Wang wrote: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let

[net-next rfc v7 0/3] Multiqueue virtio-net

2012-11-27 Thread Jason Wang
://lwn.net/Articles/505388/ - V4: https://lkml.org/lkml/2012/6/25/120 - V2: http://lwn.net/Articles/467283/ Perf Numbers: Will do some basic test and post as a reply to this mail. Jason Wang (3): virtio-net: separate fields of sending/receiving queue from virtnet_info virtio_net: multiqueue

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

2012-11-27 Thread Jason Wang
...@in.ibm.com Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 289 +- 1 files changed, 158 insertions(+), 131 deletions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 26c502e..7975133 100644

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

2012-11-27 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| 454 ++- include/uapi/linux/virtio_net.h

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

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

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

2012-11-22 Thread Jason Wang
On 11/22/2012 10:46 PM, Michael S. Tsirkin wrote: Add RFS support to virtio network device. Add a new feature flag VIRTIO_NET_F_RFS for this feature, a new configuration field max_virtqueue_pairs to detect supported number of virtqueues as well as a new command VIRTIO_NET_CTRL_RFS to program

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

2012-11-18 Thread Jason Wang
On 11/05/2012 07:16 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This addes multiqueue support to virtio_net driver. There's two mode supported: single queue pair mode and multiple queue pairs mode. An obvious difference compared with a physical mq card is that virtio-net

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

2012-11-18 Thread Jason Wang
On 11/05/2012 07:46 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific

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

2012-11-18 Thread Jason Wang
On 11/05/2012 09:08 AM, Rusty Russell wrote: Jason Wang jasow...@redhat.com writes: +struct virtnet_info { + u16 num_queue_pairs;/* # of RX/TX vq pairs */ + u16 total_queue_pairs; + + struct send_queue *sq; + struct receive_queue *rq; + struct virtqueue

Re: [rfc net-next v6 0/3] Multiqueue virtio-net

2012-10-31 Thread Jason Wang
On 10/31/2012 03:05 AM, Rick Jones wrote: On 10/30/2012 03:03 AM, Jason Wang wrote: Hi 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 review

[rfc net-next v6 1/3] virtio_net: Introduce VIRTIO_NET_F_MULTIQUEUE

2012-10-30 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/uapi/linux/virtio_net.h |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/include/uapi

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

2012-10-30 Thread Jason Wang
from the same flow, driver would let the device (usually tuntap) to use the 'rx follows tx' packet steering rules when working in multiqueue mode. In this mode, the device would select the rxq based on the last queue where the packet of the flow were sent. Signed-off-by: Jason Wang jasow

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

2012-10-30 Thread Jason Wang
This patch implement the {set|get}_channels method of ethool to allow user to change the number of queues dymaically when the device is running. This would let the user to tune the device for specific applications. Signed-off-by: Jason Wang jasow...@redhat.com --- drivers/net/virtio_net.c | 43

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: [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: [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: [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 +

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

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

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

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

[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

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

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

[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

[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

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

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

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

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

[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

[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

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

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

[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

<    1   2   3   4   5   6   7   8   >