Re: [Qemu-devel] Migration downtime more than 5s when migrating guest with massive disks

2017-05-22 Thread Yang Hongyang
On 2017/5/22 20:26, Paolo Bonzini wrote: > > > On 20/05/2017 02:46, Yang Hongyang wrote: >>>> How about do O(1) for stopping stage of live migration? >>>> Because the cpu is stopped in this phase, it wouldn't cause >>>> side effects IMHO, righ

Re: [Qemu-devel] Migration downtime more than 5s when migrating guest with massive disks

2017-05-19 Thread Yang Hongyang
On 2017/5/20 0:46, Paolo Bonzini wrote: > > > On 19/05/2017 14:17, Gonglei (Arei) wrote: >>> It would. Right now memory_region_transaction_commit() is roughly >>> O(n^2) (n devices * n BARs), and there are n of them. >>> >>> Reducing memory_region_transaction_commit to O(n) would be a large >>

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-04-26 Thread Yang Hongyang
Hi Paolo, Dave, On 2017/4/26 23:46, Paolo Bonzini wrote: > > > On 24/04/2017 18:42, Dr. David Alan Gilbert wrote: >> I suppose there's a few questions; >> a) Do we actually need the BQL - and if so why Enable/disable dirty log tracking are operations on memory regions. That's why they need to

Re: [Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-04-24 Thread Yang Hongyang
On 2017/4/24 20:06, Juan Quintela wrote: > Yang Hongyang wrote: >> Hi all, >> >> We found dirty log switch costs more then 13 seconds while migrating >> a 4T memory guest, and dirty log switch is currently protected by QEMU >> BQL. This causes guest freeze for

[Qemu-devel] About QEMU BQL and dirty log switch in Migration

2017-04-24 Thread Yang Hongyang
Hi all, We found dirty log switch costs more then 13 seconds while migrating a 4T memory guest, and dirty log switch is currently protected by QEMU BQL. This causes guest freeze for a long time when switching dirty log on, and the migration downtime is unacceptable. Are there any chance to optimiz

Re: [Qemu-devel] [RFC] Split migration bitmaps by ramblock

2017-03-24 Thread Yang Hongyang
On 2017/3/24 16:34, Juan Quintela wrote: > Yang Hongyang wrote: >> Hi Juan, >> >> First of all, I like the refactor patchset about RAMState, it makes >> things clean, great! > > Thanks. > > The whole idea of the series was to make testing change

Re: [Qemu-devel] [PATCH 42/51] ram: Pass RAMBlock to bitmap_sync

2017-03-24 Thread Yang Hongyang
Hi Juan, On 2017/3/24 16:29, Juan Quintela wrote: > Yang Hongyang wrote: >> On 2017/3/24 4:45, Juan Quintela wrote: >>> We change the meaning of start to be the offset from the beggining of >>> the block. >>> >>> @@ -701,7 +701,7 @@ s

Re: [Qemu-devel] [RFC] Split migration bitmaps by ramblock

2017-03-23 Thread Yang Hongyang
Hi Juan, First of all, I like the refactor patchset about RAMState, it makes things clean, great! On 2017/3/24 5:01, Juan Quintela wrote: > Hi > > This series split the migration and unsent bitmaps by ramblock. This > makes it easier to synchronize in small bits. This is on top of the > RAMS

Re: [Qemu-devel] [PATCH 42/51] ram: Pass RAMBlock to bitmap_sync

2017-03-23 Thread Yang Hongyang
On 2017/3/24 4:45, Juan Quintela wrote: > We change the meaning of start to be the offset from the beggining of > the block. > > Signed-off-by: Juan Quintela > --- > include/exec/ram_addr.h | 2 ++ > migration/ram.c | 8 > 2 files changed, 6 insertions(+), 4 deletions(-) > > d

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Yang Hongyang
Hi Paolo, On Fri, Mar 3, 2017 at 9:33 PM, Paolo Bonzini wrote: > > > On 03/03/2017 14:26, Dr. David Alan Gilbert wrote: > > * Paolo Bonzini (pbonz...@redhat.com) wrote: > >> > >> > >> On 03/03/2017 14:11, Dr. David Alan Gilbert wrote: > >>> * Paolo Bonzini (pbonz...@redhat.com) wrote: > > >

Re: [Qemu-devel] [Bug?] BQL about live migration

2017-03-03 Thread Yang Hongyang
Hi Dave, On Fri, Mar 3, 2017 at 9:26 PM, Dr. David Alan Gilbert wrote: > * Paolo Bonzini (pbonz...@redhat.com) wrote: > > > > > > On 03/03/2017 14:11, Dr. David Alan Gilbert wrote: > > > * Paolo Bonzini (pbonz...@redhat.com) wrote: > > >> > > >> > > >> On 03/03/2017 13:00, Dr. David Alan Gilbert

Re: [Qemu-devel] [PATCH V2] net: fix qemu_announce_self not emitting packets

2016-06-07 Thread Yang Hongyang
On Tue, Jun 7, 2016 at 9:00 PM, Peter Lieven wrote: > commit fefe2a78 accidently dropped the code path for injecting > raw packets. This feature is needed for sending gratuitous ARPs > after an incoming migration has completed. The result is increased > network downtime for vservers where the net

Re: [Qemu-devel] [PATCH] net: fix qemu_announce_self not emitting packets

2016-06-07 Thread Yang Hongyang
off-by: Peter Lieven > After addressing Paolo's comments Reviewed-by: Yang Hongyang > --- > net/net.c | 6 +- > 1 file changed, 5 insertions(+), 1 deletion(-) > > diff --git a/net/net.c b/net/net.c > index 5f3e5a9..d5834ea 100644 > --- a/net/net.c > +++ b/ne

Re: [Qemu-devel] [PATCH v3] vnc: add configurable keyboard delay

2016-06-02 Thread Yang Hongyang
> Signed-off-by: Gerd Hoffmann > Tested-by: Yang Hongyang > --- > qemu-options.hx | 8 > ui/vnc.c| 13 +++-- > ui/vnc.h| 1 + > 3 files changed, 20 insertions(+), 2 deletions(-) > > diff --git a/qemu-options.hx b/qemu-options

Re: [Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer

2016-06-02 Thread Yang Hongyang
On Thu, Jun 2, 2016 at 6:05 PM, Gerd Hoffmann wrote: > On Do, 2016-06-02 at 17:19 +0800, Yang Hongyang wrote: > > Hi Gerd, > > Thanks for reply! > > > > > > On Thu, Jun 2, 2016 at 4:37 PM, Gerd Hoffmann > > wrote: > > On Do, 2

Re: [Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer

2016-06-02 Thread Yang Hongyang
Hi Gerd, Thanks for reply! On Thu, Jun 2, 2016 at 4:37 PM, Gerd Hoffmann wrote: > On Do, 2016-06-02 at 14:05 +0800, Yang Hongyang wrote: > > According to PS/2 Mouse/Keyboard Protocol, the keyboard output buffer > > size is 16 bytes, but we only use 15 bytes actually, t

[Qemu-devel] [PATCH] ps2: take exact use of ps2 buffer

2016-06-01 Thread Yang Hongyang
ey event which is "8" key up is dropped. Signed-off-by: Yang Hongyang Cc: Gerd Hoffmann Cc: Gonglei Cc: Juan Quintela --- hw/input/ps2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hw/input/ps2.c b/hw/input/ps2.c index a8aa36f..0726270 100644 --- a/hw/in

Re: [Qemu-devel] [PATCH] qemu-ga: do not run qga test when guest agent disabled

2016-04-19 Thread Yang Hongyang
I think this patch should also be backported to stable v2.5.1 On Tue, Apr 19, 2016 at 3:39 PM, Yang Hongyang wrote: > When configure with --disable-guest-agent, make check will fail with: > ERROR:tests/test-qga.c:74:fixture_setup: assertion failed (error == NULL): > Failed to exec

[Qemu-devel] [PATCH] qemu-ga: do not run qga test when guest agent disabled

2016-04-19 Thread Yang Hongyang
a] Error 1 This check was commented out by bab47d9a75a. I think that was by mistake, because the commit message of that commit didn't mention this change. Signed-off-by: Yang Hongyang Cc: Gerd Hoffmann Cc: Michael S. Tsirkin Cc: Michael Roth Cc: Paolo Bonzini --- tests/Makefile | 4 +++- 1

Re: [Qemu-devel] [PATCH] net/filter: rename qemu_netfilter_pass_to_next() to qemu_netfilter_iterate()

2016-03-08 Thread Yang Hongyang
Hi Chen, What's the motivation that you want to change this name? The function actually is not intent to iterate every filter. On Mon, Mar 7, 2016 at 6:03 PM, Zhang Chen wrote: > This API will iterate the filters attached to netdev > > Signed-off-by: Zhang Chen > Signed-off-by: Wen Congyang

Re: [Qemu-devel] [PATCH] net: filter: correctly remove filter from the list during finalization

2016-02-24 Thread Yang Hongyang
un0,interval=10 \ > -object filter-buffer,id=f1,netdev=un0 > Segmentation fault (core dumped) > > This is because we don't check whether or not the filter was in the > list of netdev. This patch fixes this. Oops, thanks for catching this! > > Cc: Yang Hongyang > Signed-

Re: [Qemu-devel] [PATCH v3 4/4] net/filter: Add a default filter to each netdev

2016-02-01 Thread Yang Hongyang
On 02/01/2016 08:01 PM, zhanghailiang wrote: We add each netdev a default buffer filter, and the default buffer filter is disabled, so it has no side effect for packets delivering in qemu net layer. The default buffer filter can be used by COLO or Micro-checkpoint, The reason we add the defaul

Re: [Qemu-devel] [PATCH v3 2/4] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Yang Hongyang
On 02/01/2016 08:01 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help adding a filter object to a netdev. Besides, we add a is_default member for struct NetFilterState to indicate whether the filter is default or not. Signed-off-by: zhanghailiang

Re: [Qemu-devel] [PATCH v3 0/4] Netfilter: Add each netdev a default filter

2016-02-01 Thread Yang Hongyang
If we have to add a default filter, then I have a suggestion only for this series: 1. Add a nop filter. filter-nop.c 2. Add a "default-filter=xxx" property to -netdev, if not specified, default to nop. On 02/01/2016 08:01 PM, zhanghailiang wrote: This series is a prerequisite for COLO, here w

Re: [Qemu-devel] [PATCH RFC v2 3/5] net/filter: Introduce a helper to add a filter to the netdev

2016-02-01 Thread Yang Hongyang
On 02/01/2016 03:56 PM, Hailiang Zhang wrote: On 2016/2/1 15:46, Jason Wang wrote: On 02/01/2016 02:13 PM, Hailiang Zhang wrote: On 2016/2/1 11:14, Jason Wang wrote: On 01/27/2016 04:29 PM, zhanghailiang wrote: We add a new helper function netdev_add_filter(), this function can help add

Re: [Qemu-devel] [PATCH] net/traffic-mirrorer:Add traffic-mirroer

2016-01-26 Thread Yang Hongyang
de looks good overall, so: Reviewed-by: Yang Hongyang --- net/Makefile.objs | 1 + net/traffic-mirrorer.c | 173 + qemu-options.hx| 5 ++ vl.c | 3 +- 4 files changed, 181 insertions(+), 1 deletion(-) creat

Re: [Qemu-devel] [PATCH V2] net: awlays walk through filters reversely if traffic is outgress

2016-01-25 Thread Yang Hongyang
<->redirector <->colo-rewriter <->emulated device After this changes, outgress traffic always pass through filters in a reverse order. Signed-off-by: Wen Congyang Signed-off-by: Li Zhijian LGTM Reviewed-by: Yang Hongyang --- include/net/net.h | 4 +++- net/filter.c | 2

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-07 Thread Yang Hongyang
On 2015年12月07日 15:38, Hailiang Zhang wrote: On 2015/12/3 15:21, Yang Hongyang wrote: On 2015年12月03日 14:48, Hailiang Zhang wrote: On 2015/12/3 14:25, Wen Congyang wrote: On 12/03/2015 11:53 AM, Hailiang Zhang wrote: On 2015/12/3 9:17, Wen Congyang wrote: On 11/24/2015 05:25 PM

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-12-02 Thread Yang Hongyang
t will solve the problem. Thanks, Hailiang Thanks Wen Congyang Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v11: - New patch --- include/net/filter.h | 3 +++ net/filter-buffer.c | 74 net/net.c

Re: [Qemu-devel] [PATCH COLO-Frame v11 38/39] colo: Use default buffer-filter to buffer and release packets

2015-11-27 Thread Yang Hongyang
On 2015年11月24日 17:25, zhanghailiang wrote: Enable default filter to buffer packets and release the packets after a checkpoint. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v11: - Use new helper functions to buffer and release packets. --- migration/colo.c | 7

Re: [Qemu-devel] [PATCH COLO-Frame v11 35/39] filter-buffer: Accept zero interval

2015-11-27 Thread Yang Hongyang
On 2015年11月24日 17:25, zhanghailiang wrote: For default buffer filter, its 'interval' value is zero, so here we should accept zero interval. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang Reviewed-by: Yang Hongyang --- v11: - Add comment v10: - new patch ---

Re: [Qemu-devel] [PATCH COLO-Frame v11 34/39] net/filter-buffer: Add default filter-buffer for each netdev

2015-11-27 Thread Yang Hongyang
it has no side effect for the netdev. Signed-off-by: zhanghailiang Cc: Jason Wang Cc: Yang Hongyang --- v11: - New patch --- [...] static void filter_buffer_flush(NetFilterState *nf) @@ -65,6 +73,10 @@ static ssize_t filter_buffer_receive_iov(NetFilterState *nf, { Filte

Re: [Qemu-devel] [PATCH] vnc: fix mismerge

2015-11-05 Thread Yang Hongyang
saddr->u.inet->has_to = true; saddr->u.inet->to = to + 5900; } saddr->u.inet->ipv4 = saddr->u.inet->has_ipv4 = has_ipv4; Reviewed-by: Yang Hongyang -- Thanks, Yang

Re: [Qemu-devel] [PATCH COLO-Frame v10 34/38] filter-buffer: Accept zero interval

2015-11-03 Thread Yang Hongyang
Some commit message would be better. On 2015年11月03日 19:56, zhanghailiang wrote: Signed-off-by: zhanghailiang Cc: Jason Wang Reviewed-by: Yang Hongyang --- v10: new patch --- net/filter-buffer.c | 10 -- 1 file changed, 10 deletions(-) diff --git a/net/filter-buffer.c b/net

Re: [Qemu-devel] [PATCH COLO-Frame v10 33/38] netfilter: Introduce an API to delete the timer of all buffer-filters

2015-11-03 Thread Yang Hongyang
Can you explain why this is needed? Seems that this api hasn't been used in this series. On 2015年11月03日 19:56, zhanghailiang wrote: Signed-off-by: zhanghailiang Cc: Jason Wang --- v10: new patch --- include/net/filter.h | 1 + net/filter-buffer.c | 17 + 2 files changed,

Re: [Qemu-devel] [PATCH COLO-Frame v10 32/38] netfilter: Add a public API to release all the buffered packets

2015-11-03 Thread Yang Hongyang
On 2015年11月03日 19:56, zhanghailiang wrote: For COLO or MC FT, We need a function to release all the buffered packets actively. Signed-off-by: zhanghailiang Cc: Jason Wang --- v10: new patch --- include/net/filter.h | 1 + include/net/net.h| 4 net/filter-buffer.c | 15 +

Re: [Qemu-devel] [PATCH COLO-Frame v10 36/38] netfilter: Introduce an API to delete all the automatically added netfilters

2015-11-03 Thread Yang Hongyang
On 2015年11月03日 19:56, zhanghailiang wrote: We add a new property 'auto' for netfilter to distinguish if netfilter is added by user or automatically added. Signed-off-by: zhanghailiang Cc: Jason Wang --- v10: new patch --- include/net/filter.h | 2 ++ net/filter-buffer.c | 17 +

Re: [Qemu-devel] [PATCH COLO-Frame v10 35/38] netfilter: Introduce a API to automatically add filter-buffer for each netdev

2015-11-03 Thread Yang Hongyang
On 2015年11月03日 19:56, zhanghailiang wrote: Signed-off-by: zhanghailiang Cc: Jason Wang --- v10: new patch --- include/net/filter.h | 1 + include/net/net.h| 3 ++ net/filter-buffer.c | 84 net/net.c| 20 +

[Qemu-devel] [PATCH] vnc: fix bug: vnc server can't start when 'to' is specified

2015-10-27 Thread Yang Hongyang
offset to 'to' opts. Signed-off-by: Yang Hongyang Cc: Daniel P. Berrange Cc: Eric Blake Cc: Gerd Hoffmann --- ui/vnc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/vnc.c b/ui/vnc.c index faff054..db24545 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -3545,7 +3

[Qemu-devel] [PATCH 2/2] net: free the string returned by object_get_canonical_path_component

2015-10-19 Thread Yang Hongyang
The value returned from object_get_canonical_path_component must be freed. Signed-off-by: Yang Hongyang Cc: Jason Wang Cc: Paolo Bonzini --- net/net.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/net/net.c b/net/net.c index 0c4a012..459bf19 100644 --- a/net/net.c

[Qemu-devel] [PATCH 1/2] net: make iov_to_buf take right size argument in nc_sendv_compat()

2015-10-19 Thread Yang Hongyang
We want "buf, sizeof(buf)" here. sizeof(buffer) is the size of a pointer, which is wrong. Thanks to Paolo for pointing it out. Signed-off-by: Yang Hongyang Cc: Jason Wang Cc: Paolo Bonzini --- net/net.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/net.c b

Re: [Qemu-devel] [PATCH v2 4/5] net/dump: Provide the dumping facility as a net-filter

2015-10-13 Thread Yang Hongyang
On 10/13/2015 06:40 PM, Thomas Huth wrote: Use the net-filter infrastructure to provide the dumping functions for netdev devices, too. Signed-off-by: Thomas Huth Reviewed-by: Yang Hongyang --- net/dump.c | 129 - vl.c

Re: [Qemu-devel] [PATCH v2 3/5] net/dump: Separate the NetClientState from the DumpState

2015-10-13 Thread Yang Hongyang
On 10/13/2015 06:40 PM, Thomas Huth wrote: With the upcoming dumping-via-netfilter patch, the DumpState should not be related to NetClientState anymore, so move the related information to a new struct called DumpNetClient. Signed-off-by: Thomas Huth Reviewed-by: Yang Hongyang --- net

Re: [Qemu-devel] [PATCH v2 2/5] net/dump: Rework net-dump init functions

2015-10-13 Thread Yang Hongyang
net_init_dump(). Signed-off-by: Thomas Huth Reviewed-by: Yang Hongyang --- net/dump.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/net/dump.c b/net/dump.c index aa0d45d..e6f6be0 100644 --- a/net/dump.c +++ b/net/dump.c @@ -118,13 +118,10 @@ static

Re: [Qemu-devel] [PATCH v2 1/5] net/dump: Add support for receive_iov function

2015-10-13 Thread Yang Hongyang
On 10/13/2015 06:39 PM, Thomas Huth wrote: Adding a proper receive_iov function to the net dump module. This will make it easier to support the dump filter feature for the -netdev option in later patches. Signed-off-by: Thomas Huth Reviewed-by: Yang Hongyang --- net/dump.c | 24

Re: [Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/07/2015 09:33 AM, Yang Hongyang wrote: On 10/01/2015 01:43 AM, Markus Armbruster wrote: Yang Hongyang writes: This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the

[Qemu-devel] [PATCH v13 10/10] tests: add test cases for netfilter object

2015-10-06 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- tests

[Qemu-devel] [PATCH v13 09/10] netfilter: add a netbuffer filter

2015-10-06 Thread Yang Hongyang
can't be omitted currently, and can't be 0. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- net/Makefile.objs | 1 + net/filter-buffer.c | 186 qemu-options.hx | 17 + vl.c| 6 +- 4 files ch

[Qemu-devel] [PATCH v13 05/10] net/queue: introduce NetQueueDeliverFunc

2015-10-06 Thread Yang Hongyang
net/queue.c has logic to send/queue/flush packets but a qemu_deliver_packet_iov() call is hardcoded. Abstract this func so that we can use our own deliver function in netfilter. Signed-off-by: Yang Hongyang Cc: Stefan Hajnoczi Signed-off-by: Jason Wang --- include/net/queue.h | 13

[Qemu-devel] [PATCH v13 07/10] netfilter: print filter info associate with the netdev

2015-10-06 Thread Yang Hongyang
From: Yang Hongyang When execute "info network", print filter info also. add a info_str member to NetFilterState, store specific filters info. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/filter.h | 1 + net/filter.c | 20

[Qemu-devel] [PATCH v13 06/10] netfilter: add an API to pass the packet to next filter

2015-10-06 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next() to pass the packet to next filter. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 7 +++ net/filter.c | 58 2 files changed

[Qemu-devel] [PATCH v13 08/10] net/queue: export qemu_net_queue_append_iov

2015-10-06 Thread Yang Hongyang
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v13 04/10] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-10-06 Thread Yang Hongyang
qemu_deliver_packet_iov already have the compat delivery, we can drop qemu_deliver_packet. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 5 - net/net.c | 51 --- net/queue.c | 6 +- 3 files

[Qemu-devel] [PATCH v13 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
ches into one - remove receive() api from netfilter, only receive_iov() is enough - addressed comments from Jason&Thomas v1: initial patch. Yang Hongyang (10): vl.c: init delayed object after net_init_clients init/cleanup of netfilter object netfilter: hook packets before net queue se

[Qemu-devel] [PATCH v13 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
-off-by: Yang Hongyang --- include/net/filter.h| 61 + include/net/net.h | 1 + include/qemu/typedefs.h | 1 + net/Makefile.objs | 1 + net/filter.c| 138 net/net.c | 7 +++ qapi

[Qemu-devel] [PATCH v13 03/10] netfilter: hook packets before net queue send

2015-10-06 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 8 +++ net/filter.c | 17 ++ net/net.c| 66 3 files changed

[Qemu-devel] [PATCH v13 01/10] vl.c: init delayed object after net_init_clients

2015-10-06 Thread Yang Hongyang
Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang --- vl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index f2bd8d2..366f38f 100644 --- a/vl.c +++ b

Re: [Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
On 10/01/2015 12:59 AM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-10-06 Thread Yang Hongyang
On 10/01/2015 12:59 AM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH v12 09/10] netfilter: add a netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/01/2015 01:11 AM, Markus Armbruster wrote: Yang Hongyang writes: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you can also use it to simulate the network delay. Suggest to polish this slightly

Re: [Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-10-06 Thread Yang Hongyang
On 10/01/2015 01:43 AM, Markus Armbruster wrote: Yang Hongyang writes: This patch add an netfilter abstract object, captures all network packets on associated netdev. Also implement a concrete filter buffer based on this abstract object. the "buffer" netfilter could be use

[Qemu-devel] [PATCH v12 10/10] tests: add test cases for netfilter object

2015-09-28 Thread Yang Hongyang
Using qtest qmp interface to implement following cases: 1) add/remove netfilter 2) add a netfilter then delete the netdev 3) add/remove more than one netfilters 4) add more than one netfilters and then delete the netdev Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- tests

[Qemu-devel] [PATCH v12 07/10] netfilter: print filter info associate with the netdev

2015-09-28 Thread Yang Hongyang
From: Yang Hongyang When execute "info network", print filter info also. add a info_str member to NetFilterState, store specific filters info. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/filter.h | 1 + net/filter.c | 20

[Qemu-devel] [PATCH v12 09/10] netfilter: add a netbuffer filter

2015-09-28 Thread Yang Hongyang
in microseconds, it can't be omitted currently, and can't be 0. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- net/Makefile.objs | 1 + net/filter-buffer.c | 187 qemu-options.hx | 14 vl.c|

[Qemu-devel] [PATCH v12 04/10] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-09-28 Thread Yang Hongyang
qemu_deliver_packet_iov already have the compat delivery, we can drop qemu_deliver_packet. Signed-off-by: Yang Hongyang Signed-off-by: Jason Wang --- include/net/net.h | 5 - net/net.c | 51 --- net/queue.c | 6 +- 3 files

[Qemu-devel] [PATCH v12 08/10] net/queue: export qemu_net_queue_append_iov

2015-09-28 Thread Yang Hongyang
This will be used by buffer filter implementation later to queue packets. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/queue.h | 7 +++ net/queue.c | 12 ++-- 2 files changed, 13 insertions(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v12 06/10] netfilter: add an API to pass the packet to next filter

2015-09-28 Thread Yang Hongyang
add an API qemu_netfilter_pass_to_next() to pass the packet to next filter. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 7 +++ net/filter.c | 58 2 files changed

[Qemu-devel] [PATCH v12 02/10] init/cleanup of netfilter object

2015-09-28 Thread Yang Hongyang
. QTAILQ_ENTRY next used by netdev, filter belongs to the specific netdev is in this queue. Signed-off-by: Yang Hongyang --- include/net/filter.h| 62 ++ include/net/net.h | 1 + include/qemu/typedefs.h | 1 + net/Makefile.objs | 1 + net/filter.c

[Qemu-devel] [PATCH v12 05/10] net/queue: introduce NetQueueDeliverFunc

2015-09-28 Thread Yang Hongyang
net/queue.c has logic to send/queue/flush packets but a qemu_deliver_packet_iov() call is hardcoded. Abstract this func so that we can use our own deliver function in netfilter. Signed-off-by: Yang Hongyang Cc: Stefan Hajnoczi Signed-off-by: Jason Wang --- include/net/queue.h | 13

[Qemu-devel] [PATCH v12 01/10] vl.c: init delayed object after net_init_clients

2015-09-28 Thread Yang Hongyang
Init delayed object after net_init_clients, because netfilters need to be initialized after net clients initialized. Signed-off-by: Yang Hongyang --- vl.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/vl.c b/vl.c index e211f6a..6f27b64 100644 --- a/vl.c +++ b

[Qemu-devel] [PATCH v12 03/10] netfilter: hook packets before net queue send

2015-09-28 Thread Yang Hongyang
Capture packets that will be sent. Signed-off-by: Yang Hongyang Reviewed-by: Thomas Huth Signed-off-by: Jason Wang --- include/net/filter.h | 8 +++ net/filter.c | 17 ++ net/net.c| 66 3 files changed

[Qemu-devel] [PATCH v12 00/10] Add a netfilter object and netbuffer filter

2015-09-28 Thread Yang Hongyang
ter, only receive_iov() is enough - addressed comments from Jason&Thomas v1: initial patch. Yang Hongyang (10): vl.c: init delayed object after net_init_clients init/cleanup of netfilter object netfilter: hook packets before net queue send net: merge qemu_deliver_packet and qemu_deli

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-27 Thread Yang Hongyang
On 09/25/2015 11:07 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-27 Thread Yang Hongyang
On 09/25/2015 11:26 PM, Markus Armbruster wrote: Thomas Huth writes: On 25/09/15 10:03, Yang Hongyang wrote: On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: [...] diff --git a/vl.c b/vl.c index ec589e2..3cf89d5 100644 --- a/vl.c +++ b/vl.c @@ -2794,7 +2794,12

Re: [Qemu-devel] [PATCH v1] netfilter: various comment fixes

2015-09-27 Thread Yang Hongyang
On 09/28/2015 02:15 PM, Jason Wang wrote: On 09/25/2015 11:33 PM, Markus Armbruster wrote: Yang Hongyang writes: This patchset addressed Markus comment on netfilter patch series, most of them are comment fixes. It is based on jason's net tree: https://github.com/jasowang/qemu/tre

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-27 Thread Yang Hongyang
On 09/28/2015 01:47 PM, Jason Wang wrote: On 09/25/2015 10:10 PM, Markus Armbruster wrote: Jason Wang writes: On 09/24/2015 07:52 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 04:41 PM, Markus Armbruster wrote: Yang Hongyang writes: [...] diff --git a/qapi

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-25 Thread Yang Hongyang
On 09/25/2015 04:18 PM, Thomas Huth wrote: On 25/09/15 10:03, Yang Hongyang wrote: On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: [...] diff --git a/vl.c b/vl.c index ec589e2..3cf89d5 100644 --- a/vl.c +++ b/vl.c @@ -2794,7 +2794,12 @@ static bool

Re: [Qemu-devel] [PATCH v1] netfilter: various comment fixes

2015-09-25 Thread Yang Hongyang
Hi Markus, If I missed something, please feel free to point out... On 09/25/2015 04:08 PM, Yang Hongyang wrote: This patchset addressed Markus comment on netfilter patch series, most of them are comment fixes. It is based on jason's net tree: https://github.com/jasowang/qemu/tre

[Qemu-devel] [PATCH v1] netfilter: various comment fixes

2015-09-25 Thread Yang Hongyang
This patchset addressed Markus comment on netfilter patch series, most of them are comment fixes. It is based on jason's net tree: https://github.com/jasowang/qemu/tree/net Signed-off-by: Yang Hongyang --- include/net/filter.h | 2 ++ net/filter-buffer.c | 15 +-- net/fil

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-25 Thread Yang Hongyang
On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: [...] diff --git a/vl.c b/vl.c index ec589e2..3cf89d5 100644 --- a/vl.c +++ b/vl.c @@ -2794,7 +2794,12 @@ static bool object_create_initial(const char *type) if (g_str_equal(type, "rng-egd")) {

Re: [Qemu-devel] [PATCH v11 09/12] netfilter: add a netbuffer filter

2015-09-25 Thread Yang Hongyang
On 09/24/2015 05:12 PM, Markus Armbruster wrote: Yang Hongyang writes: This filter is to buffer/release packets, this feature can be used when using MicroCheckpointing, or other Remus like VM FT solutions, you What's "Remus"? Remus is an opensource VM FT solution: pap

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 07:40 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 04:41 PM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 07:36 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 07:35 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay. Copying Paolo for another pair of eyeballs (he wrote this code

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 05:42 PM, Markus Armbruster wrote: Yang Hongyang writes: On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay. Copying Paolo for another pair of eyeballs (he wrote this code

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 04:41 PM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH v11 02/12] init/cleanup of netfilter object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 04:41 PM, Markus Armbruster wrote: Yang Hongyang writes: Add a netfilter object based on QOM. A netfilter is attached to a netdev, captures all network packets that pass through the netdev. When we delete the netdev, we also delete the netfilter object attached to it, because

Re: [Qemu-devel] [PATCH v11 01/12] qmp: delete qemu opts when delete an object

2015-09-24 Thread Yang Hongyang
On 09/24/2015 03:43 PM, Markus Armbruster wrote: This has finally reached the front of my review queue. I apologize for the lng delay. Copying Paolo for another pair of eyeballs (he wrote this code). [...] + +opts = qemu_opts_find(qemu_find_opts_err("object", NULL), id); +qemu_op

Re: [Qemu-devel] [PATCH 4/5] net/dump: Provide the dumping facility as a net filter

2015-09-24 Thread Yang Hongyang
The filter interface part looks good to me, thanks! On 09/24/2015 03:22 PM, Thomas Huth wrote: Use the net filter infrastructure to provide the dumping functions for netdev devices, too. Signed-off-by: Thomas Huth --- net/dump.c | 129 +

Re: [Qemu-devel] [PATCH v11 12/12] netfilter: add multiqueue support

2015-09-22 Thread Yang Hongyang
On 09/22/2015 05:30 PM, Jason Wang wrote: [...] if (!nf->netdev_id) { error_setg(errp, "Parameter 'netdev' is required"); @@ -165,9 +174,6 @@ static void netfilter_complete(UserCreatable *uc, Error **errp) error_setg(errp, QERR_INVALID_PARAMETER_VALUE, "netdev",

Re: [Qemu-devel] [PATCH v11 04/12] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-09-22 Thread Yang Hongyang
On 09/22/2015 05:19 PM, Jason Wang wrote: [...] If we drop this patch, we will need to introduce 2 deliver func, which seems not clean and simple. Then you can probably skip the iov_to_buf() if iov_cnt is one in the above code? Seems like a good idea to avoid the extra memcpy, thank you! BTW

Re: [Qemu-devel] [PATCH v11 12/12] netfilter: add multiqueue support

2015-09-22 Thread Yang Hongyang
On 09/22/2015 04:32 PM, Jason Wang wrote: On 09/22/2015 04:07 PM, Yang Hongyang wrote: On 09/22/2015 03:36 PM, Jason Wang wrote: On 09/16/2015 08:16 PM, Yang Hongyang wrote: From: Yang Hongyang add multiqueue support, if there's multiqueue, we add multi netfilter objects,

Re: [Qemu-devel] [PATCH v11 12/12] netfilter: add multiqueue support

2015-09-22 Thread Yang Hongyang
On 09/22/2015 04:31 PM, Jason Wang wrote: [...] +/* setup filter */ +nfqc = NETFILTER_GET_CLASS(obj); +if (nfqc->setup) { +nfqc->setup(nfq, &local_err); +if (local_err) { +error_propagate(errp, local_err); +goto out

Re: [Qemu-devel] [PATCH v11 04/12] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-09-22 Thread Yang Hongyang
On 09/22/2015 04:14 PM, Jason Wang wrote: On 09/22/2015 03:44 PM, Yang Hongyang wrote: Hi Jason, Thanks for the review, On 09/22/2015 03:30 PM, Jason Wang wrote: On 09/16/2015 08:16 PM, Yang Hongyang wrote: qemu_deliver_packet_iov already have the compat delivery, we can drop

Re: [Qemu-devel] [PATCH v11 12/12] netfilter: add multiqueue support

2015-09-22 Thread Yang Hongyang
On 09/22/2015 03:36 PM, Jason Wang wrote: On 09/16/2015 08:16 PM, Yang Hongyang wrote: From: Yang Hongyang add multiqueue support, if there's multiqueue, we add multi netfilter objects, other netfilter objects is the child of the first added netfilter object. So when we delete a netf

Re: [Qemu-devel] [PATCH v11 00/12] Add a netfilter object and netbuffer filter

2015-09-22 Thread Yang Hongyang
On 09/22/2015 03:39 PM, Jason Wang wrote: [...] Want to merge this. But have comments on patch 4 and multiqueue patches. I suggest to drop them in next version so I can merge to reduce the review iterations. Other optimizations and fixups could be done on top. Thanks a lot! I agree that

Re: [Qemu-devel] [PATCH v11 12/12] netfilter: add multiqueue support

2015-09-22 Thread Yang Hongyang
On 09/22/2015 03:36 PM, Jason Wang wrote: On 09/16/2015 08:16 PM, Yang Hongyang wrote: From: Yang Hongyang add multiqueue support, if there's multiqueue, we add multi netfilter objects, other netfilter objects is the child of the first added netfilter object. So when we delete a netf

Re: [Qemu-devel] [PATCH v11 04/12] net: merge qemu_deliver_packet and qemu_deliver_packet_iov

2015-09-22 Thread Yang Hongyang
Hi Jason, Thanks for the review, On 09/22/2015 03:30 PM, Jason Wang wrote: On 09/16/2015 08:16 PM, Yang Hongyang wrote: qemu_deliver_packet_iov already have the compat delivery, we can drop qemu_deliver_packet. Signed-off-by: Yang Hongyang --- include/net/net.h | 5 - net/net.c

Re: [Qemu-devel] [PATCH RFC v4 27/29] qapi: Change Netdev into a flat union

2015-09-18 Thread Yang Hongyang
On 09/18/2015 04:11 AM, Eric Blake wrote: On 09/17/2015 08:34 AM, Eric Blake wrote: I apply Markus's v8 patch and this series, make check will fail: TEST: tests/virtio-net-test... (pid=23648) /x86_64/virtio/net/pci/basic: qemu-system-x86_64: -netdev

  1   2   3   4   5   >