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

2012-05-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com 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 wu...@linux.vnet.ibm.com --- net/hub.c | 27 --- 1 files changed, 24 insertions(+), 3

[PATCH v4 13/16] net: Make info network output more readable info

2012-05-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Reviewed-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 18 ++ net.h | 12 net/hub.c | 23 +-- net/hub.h |1 + 4 files changed,

[PATCH v4 13/16] net: Make info network output more readable info

2012-05-25 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Reviewed-by: Jan Kiszka jan.kis...@siemens.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 18 ++ net.h |1 + net/hub.c | 23 +-- net/hub.h |1 + 4 files changed, 37

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

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com 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

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by:

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |

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

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

[PATCH v3 08/16] net: Remove VLANState

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 127 ++---

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- 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

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- 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

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

2012-05-24 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 35 +++ net.h | 11 +++ net/queue.c | 13 - net/queue.h | 17 ++--- 4 files changed, 28 insertions(+), 48

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

2012-05-24 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by:

[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 wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

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

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

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 35 +++ net.h | 11 +++ net/queue.c | 13 - net/queue.h | 17 ++--- 4 files changed, 28 insertions(+), 48

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |

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

2012-05-23 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com

[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 wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by:

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by:

[PATCH v2 08/15] net: Remove VLANState

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 127 ++---

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

2012-05-23 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com

[PATCH 1/2] block: add the support to drain throttled requests

2012-03-26 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- block.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index b88ee90..1fbf4dd 100644 --- a/block.c +++ b/block.c @@ -862,8 +862,22 @@

[PATCH 2/2] block: disable I/O throttling on sync api

2012-03-26 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- block.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1fbf4dd..5baf340 100644 --- a/block.c +++ b/block.c @@ -1477,6 +1477,12 @@ static int

[PATCH 1/2] block: add the support to drain throttled requests

2012-03-26 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- block.c | 16 +++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/block.c b/block.c index b88ee90..1fbf4dd 100644 ---

[PATCH 2/2] block: disable I/O throttling on sync api

2012-03-26 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- block.c |6 ++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/block.c b/block.c index 1fbf4dd..5baf340 100644 ---

[PATCH v1 00/12] net: hub implemention

2012-03-09 Thread zwu . kernel
From: Zhi Yong Wu wu...@linux.vnet.ibm.com 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

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by:

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com

[PATCH v1 08/12] net: Remove VLANState

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com VLANState is no longer used and can be removed. Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 127 ++---

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

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

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Stefan Hajnoczi stefa...@linux.vnet.ibm.com Signed-off-by: Zhi Yong Wu wu...@linux.vnet.ibm.com --- net.c | 28 +--- net/hub.c | 24 net/hub.h |2 ++ net/slirp.c |

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com

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

2012-03-09 Thread zwu . kernel
From: Stefan Hajnoczi stefa...@linux.vnet.ibm.com 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 stefa...@linux.vnet.ibm.com Signed-off-by: