[Qemu-devel] [PATCH 01/16] virtio-scsi: Add wwpn and tgpt properties

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi A vhost-scsi device must be bound to a tcm_vhost target port. This will be done by issuing an ioctl to the device with the wwpn and tgpt. This patch adds these properties to the virtio-scsi-pci device: qemu -device virtio-scsi-pci,wwpn=$TARGET_WWN,tgpt=$TPGT Future pat

[Qemu-devel] [PATCH 09/16] virtio-pci: support host notifiers in TCG mode

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi Normally host notifiers are only used together with vhost-net in KVM mode. It is occassionally useful to use vhost with TCG mode, mainly for testing and development. This isn't hard to achieve, simply fall back to notifying the host notifier manually from qemu if KVM mode

[Qemu-devel] [PATCH 03/16] virtio-scsi: Add vhost_vring_target ioctl struct

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi The vhost-scsi device is associated with a tcm_vhost target using the VHOST_SCSI_SET_ENDPOINT and VHOST_SCSI_CLEAR_ENDPOINT ioctls that take a wwpn and tpgt. Signed-off-by: Stefan Hajnoczi --- hw/virtio-scsi.h |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-

[Qemu-devel] [PATCH 04/16] virtio-scsi: Fix tgpt typo to tpgt and use uint16_t

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/virtio-scsi.h |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hw/virtio-scsi.h b/hw/virtio-scsi.h index 9cddacb..f66d12c 100644 --- a/hw/virtio-scsi.h +++ b/hw/virtio-scsi.h @@ -4

[Qemu-devel] [PATCH 13/16] virtio-scsi: WIP VHOST_SCSI_SET_ENDPOINT call

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi Current we get -EINVAL, need to debug this. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/vhost-scsi.c | 19 ++- hw/virtio-scsi.h | 11 +-- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/hw/vhost-scsi.c b/

[Qemu-devel] [PATCH 11/16] vhost-scsi: add -vhost-scsi host device

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi This patch adds a new type of host device that drives the vhost_scsi device. The syntax to add vhost-scsi is: qemu -vhost-scsi id=vhost-scsi0,wwpn=...,tpgt=123 The virtio-scsi emulated device will make use of vhost-scsi to process virtio-scsi requests inside the kernel

[Qemu-devel] [PATCH 08/16] notifier: add validity check and notify function

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi Event notifiers that have not had the event_notifier_init() function called on them are invalid. The event_notifier_valid() function checks whether or not an event notifier is valild. This can be used to check whether a notifier is in use or not. It sometimes useful to no

[Qemu-devel] [PATCH 15/16] vhost-scsi: move some definitions to its header file

2012-04-18 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- hw/vhost-scsi.c |9 + hw/vhost-scsi.h | 11 +++ 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/hw/vhost-scsi.c b/hw/vhost-scsi.c index 54e6216..62f80bb 100644 --- a/hw/vhost-scsi.c +++ b/hw/vhost-scsi.c @@ -

[Qemu-devel] [PATCH 10/16] virtio-pci: check that event notification worked

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi For sanity assert that event notification succeeds. Signed-off-by: Stefan Hajnoczi --- hw/virtio-pci.c |5 - 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/hw/virtio-pci.c b/hw/virtio-pci.c index dcd58d0..025a518 100644 --- a/hw/virtio-pci.c +++ b/

[Qemu-devel] [PATCH 07/16] virtio-scsi: Start/stop vhost

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi This patch starts and stops vhost as the virtio device transitions through its status phases. Vhost can only be started once the guest reports its driver has successfully initialized, which means the virtqueues have been set up by the guest. Signed-off-by: Stefan Hajnoczi

[Qemu-devel] [PATCH 12/16] virtio-scsi: use the vhost-scsi host device

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi The vhost-scsi code was originally part of the virtio-scsi emulation. This code has since been factored out and should be used instead. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/virtio-pci.c |2 ++ hw/virtio-scsi.c | 10 +++--- hw/virtio

[Qemu-devel] [PATCH 16/16] vhost-scsi: clear endpoint on stopped

2012-04-18 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- hw/vhost-scsi.c | 11 ++- 1 files changed, 10 insertions(+), 1 deletions(-) diff --git a/hw/vhost-scsi.c b/hw/vhost-scsi.c index 62f80bb..3e3378a 100644 --- a/hw/vhost-scsi.c +++ b/hw/vhost-scsi.c @@ -84,7 +84,16 @@ int vhost_scsi_star

[Qemu-devel] [PATCH 06/16] virtio-scsi: Open and initialize /dev/vhost-scsi

2012-04-18 Thread zwu . kernel
From: Stefan Hajnoczi Begin adding vhost support by opening /dev/vhost-scsi. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/virtio-scsi.c | 12 1 files changed, 12 insertions(+), 0 deletions(-) diff --git a/hw/virtio-scsi.c b/hw/virtio-scsi.c index ff5d351..5

[Qemu-devel] [PATCH 00/16] QEMU vhost-scsi support

2012-04-18 Thread zwu . kernel
From: Zhi Yong Wu The patchset was developed originally by Stefan about one year ago. I now rebase it to latest qemu.git/master and fixed some issues to make it work against tcm_vhost and virtio_scsi driver. But there are still some issues to fix. Let us make more effort later. Stefan Hajnocz

[Qemu-devel] [PATCH 14/16] vhost-scsi: enable vhost notifiers for multiple queues

2012-04-18 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- hw/vhost-scsi.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/hw/vhost-scsi.c b/hw/vhost-scsi.c index 82e0a68..54e6216 100644 --- a/hw/vhost-scsi.c +++ b/hw/vhost-scsi.c @@ -64,6 +64,12 @@ int vhost_scsi_start(VHos

[Qemu-devel] [PATCH] docs: fix one issue in qcow2 specs

2012-04-24 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- docs/specs/qcow2.txt |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index b6adcad..ae68a6e 100644 --- a/docs/specs/qcow2.txt +++ b/docs/specs/qcow2.txt @@ -185,7 +185,7 @@ L2

[Qemu-devel] [PATCH] qcow2: fix the return value -ENOENT -> -EEXIST

2012-04-26 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block/qcow2-snapshot.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/qcow2-snapshot.c b/block/qcow2-snapshot.c index 42f971b..4561a2a 100644 --- a/block/qcow2-snapshot.c +++ b/block/qcow2-snapshot.c @@ -331,7 +33

[Qemu-devel] [PATCH v2] net: add the support for -netdev socket, listen

2012-02-18 Thread zwu . kernel
From: Zhi Yong Wu The -net socket,listen option does not work with the newer -netdev syntax: http://lists.gnu.org/archive/html/qemu-devel/2011-11/msg01508.html This patch makes it work now. Signed-off-by: Zhi Yong Wu --- net.c| 26 + net.h|2 + net/so

[Qemu-devel] [PATCH 1/2] qemu-img: fix segment fault when the image format is qed

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu [root@f15 qemu]# qemu-img info /home/zwu/work/misc/rh6.img image: /home/zwu/work/misc/rh6.img file format: qed virtual size: 4.0G (4294967296 bytes) disk size: 1.2G cluster_size: 65536 Segmentation fault (core dumped) Today when i were fixing another issue, i found this issue;

[Qemu-devel] [PATCH 2/2] qemu-io: fix segment fault when the image format is qed

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu [root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img format name: qed cluster size: 64 KiB vm state offset: 0.00 bytes Segmentation fault (core dumped) This reason is same as the former patch Signed-off-by: Zhi Yong Wu --- qemu-io.c |2 ++ 1 files changed, 2

[Qemu-devel] [PATCH 2/2] qemu-io: fix segment fault when the image format is qed

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu [root@f15 qemu]# qemu-io -c info /home/zwu/work/misc/rh6.img format name: qed cluster size: 64 KiB vm state offset: 0.00 bytes Segmentation fault (core dumped) This reason is same as the former patch Signed-off-by: Zhi Yong Wu --- qemu-io.c |2 ++ 1 files changed, 2

[Qemu-devel] [PATCH] block: fix block I/O throtting with IDE

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu The patch is based on the latest QEMU upstream. If you will backport the patchset to QEMU 1.0, pls note the difference. Signed-off-by: Zhi Yong Wu --- block.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index ae297bb..07cd1

[Qemu-devel] [PATCH 1/2] block: add the support for draining the throttled request queue

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu If one guest has multiple disks with enabling I/O throttling function separately, when draining activities are done, some requests maybe are in the throttled queue; So we need to restart them at first. Moreover, when only one disk need to be drained such as hotplug out, if an

[Qemu-devel] [PATCH 2/2] block: fix the inaccurate draining activities with block I/O throttling

2012-02-19 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- blockdev.c |4 ++-- hw/ide/macio.c |2 +- hw/ide/pci.c |3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index 7a6613a..fa85c78 100644 --- a/blockdev.c +++ b/blockdev.c @@ -693,7 +693

[Qemu-devel] [PATCH v1 03/12] net: Look up 'vlan' net clients using hubs

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |5 +++-- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/ne

[Qemu-devel] [PATCH v1 11/12] net: Rename vc local variables to nc

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Now that VLANClientState has been renamed to NetClientState all 'vc' local variables should be 'nc'. Much of the code already used 'nc' but there are places where 'vc' needs to be renamed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/ne2000.h |

[Qemu-devel] [PATCH v1 12/12] net: Rename qemu_del_vlan_client() to qemu_del_net_client()

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/e1000.c |2 +- hw/eepro100.

[Qemu-devel] [PATCH v1 06/12] net: Remove vlan qdev property

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature is implemented using hubs and no longer uses special-purpose VLANState structs that are accessible as qdev properties. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/qdev-properties.c | 72 -

[Qemu-devel] [PATCH v1 01/12] net: Add a hub net client

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature can be implemented in terms of hubs. By introducing a hub net client it becomes possible to remove the special case vlan code from net.c and push the vlan feature out of generic networking code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu -

[Qemu-devel] [PATCH v1 05/12] net: Drop vlan argument to qemu_new_net_client()

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Since hubs are now used to implement the 'vlan' feature and the vlan argument is always NULL, remove the argument entirely and update all net clients that use qemu_new_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 27

[Qemu-devel] [PATCH v1 04/12] hub: Check that hubs are configured correctly

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Checks can be performed to make sure that hubs have at least one NIC and one host device, warning the user if this is not the case. Configurations which do not meet this rule tend to be broken but just emit a warning. This patch preserves compatibility with the checks perfo

[Qemu-devel] [PATCH v1 02/12] net: Use hubs for the vlan feature

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi Stop using the special-case vlan code in net.c. Instead use the hub net client to implement the vlan feature. The next patch will remove vlan code from net.c completely. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 46 ++

[Qemu-devel] [PATCH v1 09/12] net: Rename non_vlan_clients to net_clients

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi There is no longer a distinction between vlan clients and non-vlan clients in the net core. The net core only knows about point-to-point clients which are connected to a peer. It's time to rename the global list of net clients since it no longer refers to vlans at all. Si

[Qemu-devel] [PATCH v1 08/12] net: Remove VLANState

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 127 ++--- net.h |8 net/socket.c |6 +- net/tap.c |6 +- net/

[Qemu-devel] [PATCH v1 00/12] net: hub implemention

2012-03-09 Thread zwu . kernel
From: Zhi Yong Wu The patchset implements network hub stead of vlan. The main work was done by stefan, and i only rebased it to latest QEMU upstream, did some testings and will be responsible for pushing it to QEMU upstream. Stefan Hajnoczi (12): net: Add a hub net client net: Use hubs for

[Qemu-devel] [PATCH v1 07/12] net: Remove vlan code from net.c

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi The vlan implementation in net.c has been replaced by hubs so we can remove the code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/xen_nic.c |1 - net.c| 108 -- net.h|1

[Qemu-devel] [PATCH v2 1/2] block: add the support to drain throttled requests

2012-03-11 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block.c | 21 + block_int.h |1 + 2 files changed, 22 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 52ffe14..0825168 100644 --- a/block.c +++ b/block.c @@ -853,6 +853,21 @@ void bdrv_close_all(v

[Qemu-devel] [PATCH v2 2/2] block: drain throttled requests for one block device

2012-03-11 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- blockdev.c |4 ++-- hw/ide/macio.c |2 +- hw/ide/pci.c |3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/blockdev.c b/blockdev.c index d78aa51..1bc4667 100644 --- a/blockdev.c +++ b/blockdev.c @@ -694,7 +694

[Qemu-devel] [PATCH v3 1/2] block: add the support to drain throttled requests

2012-03-12 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block.c | 21 - block_int.h |1 + 2 files changed, 21 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 52ffe14..b3cbcc3 100644 --- a/block.c +++ b/block.c @@ -853,6 +853,20 @@ void bdrv_close_all(v

[Qemu-devel] [PATCH v2] OVS: update INSTALL.KVM

2013-05-28 Thread zwu . kernel
From: Zhi Yong Wu When i played with OVS again today, i found that the argument of "ovs-dpctl show" is not correct, so INSTALL.KVM need to be updated accordingly. Signed-off-by: Zhi Yong Wu --- INSTALL.KVM |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/INSTALL.KV

[Qemu-devel] [PATCH 1/2] qcow2: remove a line of unnecessary code

2012-04-28 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block/qcow2-cluster.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index a747a88..b048821 100644 --- a/block/qcow2-cluster.c +++ b/block/qcow2-cluster.c @@ -538,7 +538,6 @@

[Qemu-devel] [PATCH 2/2] qcow2: fix the byte endian convertion

2012-04-28 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block/qcow2-refcount.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 812c93c..443c021 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -367,7 +36

[Qemu-devel] [PATCH 1/2] block: make bdrv_create adopt coroutine

2012-05-04 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block.c | 48 +++- 1 files changed, 47 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 43c794c..3ff78c5 100644 --- a/block.c +++ b/block.c @@ -341,13 +341,59 @@ BlockDriver *bdrv_f

[Qemu-devel] [PATCH 2/2] qcow2: lock on prealloc

2012-05-04 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block/qcow2.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 8c60a6f..ee4678f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1192,7 +1192,10 @@ static int qcow2_create2(const cha

[Qemu-devel] [PATCH 1/2] block: make bdrv_create adopt coroutine

2012-05-04 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- block.c | 48 +++- 1 files changed, 47 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index 43c794c..5de55fe 100644 --- a/block.c +++ b/block.c @@ -341,13 +341,59 @@ BlockDriver *bdrv_f

[Qemu-devel] [PATCH v2 1/2] block: make bdrv_create adopt coroutine

2012-05-07 Thread zwu . kernel
From: Zhi Yong Wu The current qemu.git introduces failure with preallocation and some sizes: qemu-img create -f qcow2 new.img 976563K -o preallocation=metadata qemu-img: qemu-coroutine-lock.c:111: qemu_co_mutex_unlock: Assertion `mutex->locked == 1' failed. And lock needs to work in coroutine c

[Qemu-devel] [PATCH v2 2/2] qcow2: lock on prealloc

2012-05-07 Thread zwu . kernel
From: Zhi Yong Wu preallocate() will be locked. Signed-off-by: Zhi Yong Wu --- block/qcow2.c |3 +++ 1 files changed, 3 insertions(+), 0 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 8c60a6f..ee4678f 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1192,7 +1192,10 @@ sta

[Qemu-devel] [PATCH] qcow2: adjust qcow2_co_flush_to_os -> qcow2_co_flush_to_disk

2012-05-14 Thread zwu . kernel
From: Zhi Yong Wu qcow2_co_flush_to_os() actually flush all cached data to the disk. To keep its name consistent with its actual function, adjust its name accordingly. Signed-off-by: Zhi Yong Wu --- block/qcow2.c |4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bloc

[Qemu-devel] [PATCH v2 13/15] net: Remove obsolete vlan info

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net.c |1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/net.c b/net.c index 61dc28d..8c8e703 100644 --- a/net.c +++ b/net.c @@ -1079,7 +1079,6 @@ void do_info_network(Monitor *mon) NetClientState *nc, *peer; net_c

[Qemu-devel] [PATCH v2 11/15] net: Rename vc local variables to nc

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Now that VLANClientState has been renamed to NetClientState all 'vc' local variables should be 'nc'. Much of the code already used 'nc' but there are places where 'vc' needs to be renamed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/ne2000.h |

[Qemu-devel] [PATCH v2 09/15] net: Rename non_vlan_clients to net_clients

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi There is no longer a distinction between vlan clients and non-vlan clients in the net core. The net core only knows about point-to-point clients which are connected to a peer. It's time to rename the global list of net clients since it no longer refers to vlans at all. Si

[Qemu-devel] [PATCH v2 00/15] net: hub-based networking

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu The patchset implements network hub stead of vlan. The main work was done by stefan, and i rebased it to latest QEMU upstream, did some testings and am responsible for pushing it to QEMU upstream. Changelog from v1: 1.) cleanup some obsolete vlan info 2.) cleanup deliver/

[Qemu-devel] [PATCH v2 01/15] net: Add a hub net client

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature can be implemented in terms of hubs. By introducing a hub net client it becomes possible to remove the special case vlan code from net.c and push the vlan feature out of generic networking code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu -

[Qemu-devel] [PATCH v2 02/15] net: Use hubs for the vlan feature

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Stop using the special-case vlan code in net.c. Instead use the hub net client to implement the vlan feature. The next patch will remove vlan code from net.c completely. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 46 ++

[Qemu-devel] [PATCH v2 12/15] net: Rename qemu_del_vlan_client() to qemu_del_net_client()

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/e1000.c |2 +- hw/eepr

[Qemu-devel] [PATCH v2 03/15] net: Look up 'vlan' net clients using hubs

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |5 +++-- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/ne

[Qemu-devel] [PATCH v2 04/15] hub: Check that hubs are configured correctly

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Checks can be performed to make sure that hubs have at least one NIC and one host device, warning the user if this is not the case. Configurations which do not meet this rule tend to be broken but just emit a warning. This patch preserves compatibility with the checks perfo

[Qemu-devel] [PATCH v2 07/15] net: Remove vlan code from net.c

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi The vlan implementation in net.c has been replaced by hubs so we can remove the code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/xen_nic.c |1 - net.c| 108 -- net.h|1

[Qemu-devel] [PATCH v2 14/15] net: cleanup deliver/deliver_iov func pointers

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net.c | 35 +++ net.h | 11 +++ net/queue.c | 13 - net/queue.h | 17 ++--- 4 files changed, 28 insertions(+), 48 deletions(-) diff --git a/net.c b/net.c index 8

[Qemu-devel] [PATCH v2 15/15] net: invoke qemu_can_send_packet only before net queue sending function

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net/queue.c |4 ++-- net/slirp.c |7 --- net/tap.c|2 +- slirp/if.c |5 - slirp/libslirp.h |1 - 5 files changed, 3 insertions(+), 16 deletions(-) diff --git a/net/queue.c b/net/queue.c index 0

[Qemu-devel] [PATCH v2 05/15] net: Drop vlan argument to qemu_new_net_client()

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi Since hubs are now used to implement the 'vlan' feature and the vlan argument is always NULL, remove the argument entirely and update all net clients that use qemu_new_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 27

[Qemu-devel] [PATCH v2 08/15] net: Remove VLANState

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 127 ++--- net.h |8 net/socket.c |6 +- net/tap.c |6 +- net/

[Qemu-devel] [PATCH v2 06/15] net: Remove vlan qdev property

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature is implemented using hubs and no longer uses special-purpose VLANState structs that are accessible as qdev properties. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/qdev-properties.c | 72 -

[Qemu-devel] [PATCH] version: update version info

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- VERSION |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/VERSION b/VERSION index 87903b6..9084fa2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.93 +1.1.0 -- 1.7.6

[Qemu-devel] [PATCH v3 01/16] net: Add a hub net client

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature can be implemented in terms of hubs. By introducing a hub net client it becomes possible to remove the special case vlan code from net.c and push the vlan feature out of generic networking code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu -

[Qemu-devel] [PATCH v3 02/16] net: Use hubs for the vlan feature

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Stop using the special-case vlan code in net.c. Instead use the hub net client to implement the vlan feature. The next patch will remove vlan code from net.c completely. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 46 ++

[Qemu-devel] [PATCH v3 00/16] net: hub-based networking

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu The patchset implements network hub stead of vlan. The main work was done by stefan, and i rebased it to latest QEMU upstream, did some testings and am responsible for pushing it to QEMU upstream. Changelog from v2: 1.) add the support for hub own flow control [paolo] 2.)

[Qemu-devel] [PATCH v3 04/16] hub: Check that hubs are configured correctly

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Checks can be performed to make sure that hubs have at least one NIC and one host device, warning the user if this is not the case. Configurations which do not meet this rule tend to be broken but just emit a warning. This patch preserves compatibility with the checks perfo

[Qemu-devel] [PATCH v3 07/16] net: Remove vlan code from net.c

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi The vlan implementation in net.c has been replaced by hubs so we can remove the code. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/xen_nic.c |1 - net.c| 108 -- net.h|1

[Qemu-devel] [PATCH v3 09/16] net: Rename non_vlan_clients to net_clients

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi There is no longer a distinction between vlan clients and non-vlan clients in the net core. The net core only knows about point-to-point clients which are connected to a peer. It's time to rename the global list of net clients since it no longer refers to vlans at all. Si

[Qemu-devel] [PATCH v3 08/16] net: Remove VLANState

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 127 ++--- net.h |8 net/socket.c |6 +- net/tap.c |6 +- net/

[Qemu-devel] [PATCH v3 12/16] net: Rename qemu_del_vlan_client() to qemu_del_net_client()

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Another step in moving the vlan feature out of net core. Users only deal with NetClientState and therefore qemu_del_vlan_client() should be named qemu_del_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/e1000.c |2 +- hw/eepr

[Qemu-devel] [PATCH v3 16/16] hub: add the support for hub own flow control

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net/hub.c | 35 --- net/hub.h |2 ++ net/queue.c |5 + 3 files changed, 39 insertions(+), 3 deletions(-) diff --git a/net/hub.c b/net/hub.c index 8a583ab..d27c52a 100644 --- a/net/hub.c +++ b/net

[Qemu-devel] [PATCH v3 15/16] net: determine if packets can be sent before net queue deliver packets

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net/queue.c |8 net/slirp.c |7 --- slirp/if.c |5 - slirp/libslirp.h |1 - 4 files changed, 4 insertions(+), 17 deletions(-) diff --git a/net/queue.c b/net/queue.c index 0afd783..7484d2a 100644 -

[Qemu-devel] [PATCH v3 13/16] net: Make the monitor output more reasonable hub info

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net.c |7 ++- net/hub.c |2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/net.c b/net.c index 61dc28d..79ac51f 100644 --- a/net.c +++ b/net.c @@ -887,6 +887,12 @@ static const struct { }, }, #end

[Qemu-devel] [PATCH v3 14/16] net: cleanup deliver/deliver_iov func pointers

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu Signed-off-by: Zhi Yong Wu --- net.c | 35 +++ net.h | 11 +++ net/queue.c | 13 - net/queue.h | 17 ++--- 4 files changed, 28 insertions(+), 48 deletions(-) diff --git a/net.c b/net.c index 7

[Qemu-devel] [PATCH v3 11/16] net: Rename vc local variables to nc

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Now that VLANClientState has been renamed to NetClientState all 'vc' local variables should be 'nc'. Much of the code already used 'nc' but there are places where 'vc' needs to be renamed. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/ne2000.h |

[Qemu-devel] [PATCH v3 03/16] net: Look up 'vlan' net clients using hubs

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |5 +++-- 4 files changed, 30 insertions(+), 29 deletions(-) diff --git a/ne

[Qemu-devel] [PATCH v3 06/16] net: Remove vlan qdev property

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi The vlan feature is implemented using hubs and no longer uses special-purpose VLANState structs that are accessible as qdev properties. Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- hw/qdev-properties.c | 72 -

[Qemu-devel] [PATCH v3 05/16] net: Drop vlan argument to qemu_new_net_client()

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi Since hubs are now used to implement the 'vlan' feature and the vlan argument is always NULL, remove the argument entirely and update all net clients that use qemu_new_net_client(). Signed-off-by: Stefan Hajnoczi Signed-off-by: Zhi Yong Wu --- net.c | 27

[Qemu-devel] [PATCH v4 16/16] hub: add the support for hub own flow control

2012-05-25 Thread zwu . kernel
From: Zhi Yong Wu Only when all other hub port's *peer* .can_receive() all return 1, the source hub port .can_receive() return 1. Signed-off-by: Zhi Yong Wu --- net/hub.c | 27 --- 1 files changed, 24 insertions(+), 3 deletions(-) diff --git a/net/hub.c b/net/hub.c

<    1   2