* [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
@ 2016-09-05 9:37 Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 01/12] docs: Add documentation for COLO-proxy Zhang Chen
` (14 more replies)
0 siblings, 15 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
COLO-proxy is a part of COLO project. COLO project is
composed of COLO-frame, COLO-proxy and block-replication.
It is used to compare the network package to help COLO
decide whether to do checkpoint. With COLO-proxy's help,
COLO greatly improves the performance.
The filter-redirector, filter-mirror, colo-compare
and filter-rewriter compose the COLO-proxy.
COLO-compare
It is used to compare the network package to help COLO decide
whether to do checkpoint.
Filter-rewriter
It will rewrite some of secondary packet to make
secondary guest's connection established successfully.
In this module we will rewrite tcp packet's ack to the secondary
from primary,and rewrite tcp packet's seq to the primary from
secondary.
The full version in this github:
https://github.com/zhangckid/qemu/tree/colo-v2.7-proxy-mode-compare-and-rewriter-sep5
v13:
- add docs/colo-proxy.txt
- add MAINTAINERS
- remove unnecessary .h
- remove QTAILQ_ENTRY(CompareState)
- fix some comments
- add find_and_check_chardev() to avoid code duplication
- remove the "is_unix" in patch3
- change error_report() to trace in patch4
- use l2hdr_len here instead of ETH_HLEP
- fix code style
- remove colo_rm_connection()
- remove hashtable_size
- change g_queue_foreach() to g_queue_find_custom() in patch7
- change trace_colo_compare_tcp_miscompare() to fprintf() in patch8
- add codes not queue vlan packets
v12:
- add qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
to this series as the first patch.
- update COLO net ascii figure.
- add chardev socket check.
- fix some typo.
- add some comments.
- rename net/colo-base.c to net/colo.c
- rename network/transport_layer to network/transport_header.
- move the job that clear coon_list when hashtable_size oversize
to connection_get.
- reuse connection_destroy() do colo_rm_connection().
- fix pkt mem leak in colo_compare_connection().
(result be released in g_queue_remove(), so it were not leak)
- rename thread_name "compare" to "colo-compare".
- change icmp compare to memcmp().
v11:
- Make patch 5 to a independent patch series.
[PATCH V3] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
- For Jason's comments, merge filter-rewriter to this series.
(patch 7,8,9)
- Add reverse_connection_key()
- remove conn_list in filter-rewriter
- remove unprocessed_connections
- add some comments
v10:
- fix typo
- Should we make patch 5 independent with this series?
This patch just add a API for qemu-char.
v9:
p5:
- use chr_update_read_handler_full() replace
the chr_update_read_handler()
- use io_watch_poll_prepare_full() replace
the io_watch_poll_prepare()
- use io_watch_poll_funcs_full replace
the io_watch_poll_funcs
- avoid code duplication
v8:
p5:
- add new patch:
qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
v7:
p5:
- add [PATCH]qemu-char: Fix context for g_source_attach()
in this patch series.
v6:
p6:
- add more commit log.
- fix icmp comparison to compare all packet.
p5:
- add more cpmments in commit log.
- change REGULAR_CHECK_MS to REGULAR_PACKET_CHECK_MS
- make check old packet independent to compare thread
- remove thread_status
p4:
- change this patch only about
Connection and ConnectionKey.
- add some comments in commit log.
- remove mode in fill_connection_key().
- fix some comments and bug.
- move colo_conn_state to patch of
"work with colo-frame"
- remove conn_list_lock.
- add MAX_QUEUE_SIZE, if primary_list or
secondary_list biger than MAX_QUEUE_SIZE
we will drop packet.
p3:
- add new independent kernel jhash patch.
p2:
- add new independent colo-base patch.
p1:
- add a ascii figure and some comments to explain it
- move trace.h to p2
- move QTAILQ_HEAD(, CompareState) net_compares to
patch of "work with colo-frame"
- add some comments in qemu-option.hx
v5:
p3:
- comments from Jason
we poll and handle chardev in comapre thread,
Through this way, there's no need for extra
synchronization with main loop
this depend on another patch:
qemu-char: Fix context for g_source_attach()
- remove QemuEvent
p2:
- remove conn->list_lock
p1:
- move compare_pri/sec_chr_in to p3
- move compare_chr_send to p2
v4:
p4:
- add some comments
- fix some trace-events
- fix tcp compare error
p3:
- add rcu_read_lock().
- fix trace name
- fix jason's other comments
- rebase some Dave's branch function
p2:
- colo_compare_connection() change g_queue_push_head() to
- g_queue_push_tail() match to sorted order.
- remove pkt->s
- move data structure to colo-base.h
- add colo-base.c reuse codes for filter-rewriter
- add some filter-rewriter needs struct
- depends on previous SocketReadState patch
p1:
- except move qemu_chr_add_handlers()
to colo thread
- remove class_finalize
- remove secondary arp codes
- depends on previous SocketReadState patch
v3:
- rebase colo-compare to colo-frame v2.7
- fix most of Dave's comments
(except RCU)
- add TCP,UDP,ICMP and other packet comparison
- add trace-event
- add some comments
- other bug fix
- add RFC index
- add usage in patch 1/4
v2:
- add jhash.h
v1:
- initial patch
Zhang Chen (12):
docs: Add documentation for COLO-proxy
qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
colo-compare: introduce colo compare initialization
net/colo.c: add colo.c to define and handle packet
Jhash: add linux kernel jhashtable in qemu
colo-compare: track connection and enqueue packet
colo-compare: introduce packet comparison thread
colo-compare: add TCP,UDP,ICMP packet comparison
filter-rewriter: introduce filter-rewriter initialization
filter-rewriter: track connection and parse packet
filter-rewriter: rewrite tcp packet to keep secondary connection
MAINTAINERS: add maintainer for COLO-proxy
MAINTAINERS | 9 +
docs/colo-proxy.txt | 188 ++++++++++++
include/qemu/jhash.h | 59 ++++
include/sysemu/char.h | 11 +-
net/Makefile.objs | 3 +
net/colo-compare.c | 776 ++++++++++++++++++++++++++++++++++++++++++++++++++
net/colo.c | 211 ++++++++++++++
net/colo.h | 76 +++++
net/filter-rewriter.c | 268 +++++++++++++++++
qemu-char.c | 77 +++--
qemu-options.hx | 52 ++++
trace-events | 16 ++
vl.c | 4 +-
13 files changed, 1724 insertions(+), 26 deletions(-)
create mode 100644 docs/colo-proxy.txt
create mode 100644 include/qemu/jhash.h
create mode 100644 net/colo-compare.c
create mode 100644 net/colo.c
create mode 100644 net/colo.h
create mode 100644 net/filter-rewriter.c
--
2.7.4
^ permalink raw reply [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 01/12] docs: Add documentation for COLO-proxy
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 02/12] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext Zhang Chen
` (13 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
Introduce the design of COLO-proxy, and how to use it.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
---
docs/colo-proxy.txt | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 188 insertions(+)
create mode 100644 docs/colo-proxy.txt
diff --git a/docs/colo-proxy.txt b/docs/colo-proxy.txt
new file mode 100644
index 0000000..76767cb
--- /dev/null
+++ b/docs/colo-proxy.txt
@@ -0,0 +1,188 @@
+COLO-proxy
+----------
+Copyright (c) 2016 Intel Corporation
+Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
+Copyright (c) 2016 Fujitsu, Corp.
+
+This work is licensed under the terms of the GNU GPL, version 2 or later.
+See the COPYING file in the top-level directory.
+
+This document gives an overview of COLO proxy's design.
+
+== Background ==
+COLO-proxy is a part of COLO project. It is used
+to compare the network package to help COLO decide
+whether to do checkpoint. With COLO-proxy's help,
+COLO greatly improves the performance.
+
+The filter-redirector, filter-mirror, colo-compare
+and filter-rewriter compose the COLO-proxy.
+
+== Architecture ==
+
+COLO-Proxy is based on qemu netfilter and it's a plugin for qemu netfilter
+(except colo-compare). It keep Secondary VM connect normally to
+client and compare packets sent by PVM with sent by SVM.
+If the packet difference, notify COLO-frame to do checkpoint and send
+all primary packet has queued. Otherwise just send the queued primary
+packet and drop the queued secondary packet.
+
+Below is a COLO proxy ascii figure:
+
+ Primary qemu Secondary qemu
++--------------------------------------------------------------+ +----------------------------------------------------------------+
+| +----------------------------------------------------------+ | | +-----------------------------------------------------------+ |
+| | | | | | | |
+| | guest | | | | guest | |
+| | | | | | | |
+| +-------^--------------------------+-----------------------+ | | +---------------------+--------+----------------------------+ |
+| | | | | ^ | |
+| | | | | | | |
+| | +------------------------------------------------------+ | | | |
+|netfilter| | | | | | netfilter | | |
+| +----------+ +----------------------------+ | | | +-----------------------------------------------------------+ |
+| | | | | | out | | | | | | filter excute order | |
+| | | | +-----------------------------+ | | | | | | +-------------------> | |
+| | | | | | | | | | | | | | TCP | |
+| | +-----+--+-+ +-----v----+ +-----v----+ |pri +----+----+sec| | | | +------------+ +---+----+---v+rewriter++ +------------+ | |
+| | | | | | | | |in | |in | | | | | | | | | | | | |
+| | | filter | | filter | | filter +------> colo <------+ +--------> filter +--> adjust | adjust +--> filter | | |
+| | | mirror | |redirector| |redirector| | | compare | | | | | | redirector | | ack | seq | | redirector | | |
+| | | | | | | | | | | | | | | | | | | | | | | |
+| | +----^-----+ +----+-----+ +----------+ | +---------+ | | | | +------------+ +--------+--------------+ +---+--------+ | |
+| | | tx | rx rx | | | | | tx all | rx | |
+| | | | | | | | +-----------------------------------------------------------+ |
+| | | +--------------+ | | | | | |
+| | | filter excute order | | | | | | |
+| | | +----------------> | | | +--------------------------------------------------------+ |
+| +-----------------------------------------+ | | |
+| | | | | |
++--------------------------------------------------------------+ +----------------------------------------------------------------+
+ |guest receive | guest send
+ | |
++--------+----------------------------v------------------------+
+| | NOTE: filter direction is rx/tx/all
+| tap | rx:receive packets sent to the netdev
+| | tx:receive packets sent by the netdev
++--------------------------------------------------------------+
+
+1.Guest receive packet route:
+
+Primary:
+
+Tap --> Mirror Client Filter
+Mirror client will send packet to guest,at the
+same time, copy and forward packet to secondary
+mirror server.
+
+Secondary:
+
+Mirror Server Filter --> TCP Rewriter
+If receive packet is TCP packet,we will adjust ack
+and update TCP checksum, then send to secondary
+guest. Otherwise directly send to guest.
+
+2.Guest send packet route:
+
+Primary:
+
+Guest --> Redirect Server Filter
+Redirect server filter receive primary guest packet
+but do nothing, just pass to next filter.
+
+Redirect Server Filter --> COLO-Compare
+COLO-compare receive primary guest packet then
+waiting scondary redirect packet to compare it.
+If packet same,send queued primary packet and clear
+queued secondary packet, Otherwise send primary packet
+and do checkpoint.
+
+COLO-Compare --> Another Redirector Filter
+The redirector get packet from colo-compare by use
+chardev socket.
+
+Redirector Filter --> Tap
+Send the packet.
+
+Secondary:
+
+Guest --> TCP Rewriter Filter
+If the packet is TCP packet,we will adjust seq
+and update TCP checksum. Then send it to
+redirect client filter. Otherwise directly send to
+redirect client filter.
+
+Redirect Client Filter --> Redirect Server Filter
+Forward packet to primary.
+
+== Components introduction ==
+
+Filter-mirror is a netfilter plugin.
+It gives qemu the ability to mirror
+packets to a chardev.
+
+Filter-redirector is a netfilter plugin.
+It gives qemu the ability to redirect net packet.
+Redirector can redirect filter's net packet to outdev,
+and redirect indev's packet to filter.
+
+ filter
+ +
+ redirector |
+ +--------------+
+ | | |
+ | | |
+ | | |
+ indev +---------+ +----------> outdev
+ | | |
+ | | |
+ | | |
+ +--------------+
+ |
+ v
+ filter
+
+COLO-compare, we do packet comparing job.
+Packets coming from the primary char indev will be sent to outdev.
+Packets coming from the secondary char dev will be dropped after comparing.
+COLO-comapre need two input chardev and one output chardev:
+primary_in=chardev1-id (source: primary send packet)
+secondary_in=chardev2-id (source: secondary send packet)
+outdev=chardev3-id
+
+Filter-rewriter will rewrite some of secondary packet to make
+secondary guest's tcp connection established successfully.
+In this module we will rewrite tcp packet's ack to the secondary
+from primary,and rewrite tcp packet's seq to the primary from
+secondary.
+
+== Usage ==
+
+Here, we use demo ip and port discribe more clearly.
+Primary(ip:3.3.3.3):
+-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
+-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
+-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
+-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
+-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
+-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
+-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
+-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
+-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
+-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
+-object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
+-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
+
+Secondary(ip:3.3.3.8):
+-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
+-device e1000,netdev=hn0,mac=52:a4:00:12:78:66
+-chardev socket,id=red0,host=3.3.3.3,port=9003
+-chardev socket,id=red1,host=3.3.3.3,port=9004
+-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
+-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
+
+Note:
+ a.COLO-proxy must work with COLO-frame and Block-replication.
+ b.Primary COLO must be started firstly, because COLO-proxy needs
+ chardev socket server running before secondary started.
+ c.Filter-rewriter only rewrite tcp packet.
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 02/12] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 01/12] docs: Add documentation for COLO-proxy Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 03/12] colo-compare: introduce colo compare initialization Zhang Chen
` (12 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
Add qemu_chr_add_handlers_full() API, we can use
this API pass in a GMainContext,make handler run
in the context rather than main_loop.
This comments from Daniel P . Berrange.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
---
include/sysemu/char.h | 11 +++++++-
qemu-char.c | 77 +++++++++++++++++++++++++++++++++++----------------
2 files changed, 63 insertions(+), 25 deletions(-)
diff --git a/include/sysemu/char.h b/include/sysemu/char.h
index ee7e554..0d0465a 100644
--- a/include/sysemu/char.h
+++ b/include/sysemu/char.h
@@ -65,7 +65,8 @@ struct CharDriverState {
int (*chr_sync_read)(struct CharDriverState *s,
const uint8_t *buf, int len);
GSource *(*chr_add_watch)(struct CharDriverState *s, GIOCondition cond);
- void (*chr_update_read_handler)(struct CharDriverState *s);
+ void (*chr_update_read_handler)(struct CharDriverState *s,
+ GMainContext *context);
int (*chr_ioctl)(struct CharDriverState *s, int cmd, void *arg);
int (*get_msgfds)(struct CharDriverState *s, int* fds, int num);
int (*set_msgfds)(struct CharDriverState *s, int *fds, int num);
@@ -422,6 +423,14 @@ void qemu_chr_add_handlers(CharDriverState *s,
IOEventHandler *fd_event,
void *opaque);
+/* This API can make handler run in the context what you pass to. */
+void qemu_chr_add_handlers_full(CharDriverState *s,
+ IOCanReadHandler *fd_can_read,
+ IOReadHandler *fd_read,
+ IOEventHandler *fd_event,
+ void *opaque,
+ GMainContext *context);
+
void qemu_chr_be_generic_open(CharDriverState *s);
void qemu_chr_accept_input(CharDriverState *s);
int qemu_chr_add_client(CharDriverState *s, int fd);
diff --git a/qemu-char.c b/qemu-char.c
index 5f82ebb..100aada 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -446,11 +446,12 @@ void qemu_chr_fe_printf(CharDriverState *s, const char *fmt, ...)
static void remove_fd_in_watch(CharDriverState *chr);
-void qemu_chr_add_handlers(CharDriverState *s,
- IOCanReadHandler *fd_can_read,
- IOReadHandler *fd_read,
- IOEventHandler *fd_event,
- void *opaque)
+void qemu_chr_add_handlers_full(CharDriverState *s,
+ IOCanReadHandler *fd_can_read,
+ IOReadHandler *fd_read,
+ IOEventHandler *fd_event,
+ void *opaque,
+ GMainContext *context)
{
int fe_open;
@@ -464,8 +465,9 @@ void qemu_chr_add_handlers(CharDriverState *s,
s->chr_read = fd_read;
s->chr_event = fd_event;
s->handler_opaque = opaque;
- if (fe_open && s->chr_update_read_handler)
- s->chr_update_read_handler(s);
+ if (fe_open && s->chr_update_read_handler) {
+ s->chr_update_read_handler(s, context);
+ }
if (!s->explicit_fe_open) {
qemu_chr_fe_set_open(s, fe_open);
@@ -478,6 +480,16 @@ void qemu_chr_add_handlers(CharDriverState *s,
}
}
+void qemu_chr_add_handlers(CharDriverState *s,
+ IOCanReadHandler *fd_can_read,
+ IOReadHandler *fd_read,
+ IOEventHandler *fd_event,
+ void *opaque)
+{
+ qemu_chr_add_handlers_full(s, fd_can_read, fd_read,
+ fd_event, opaque, NULL);
+}
+
static int null_chr_write(CharDriverState *chr, const uint8_t *buf, int len)
{
return len;
@@ -715,7 +727,8 @@ static void mux_chr_event(void *opaque, int event)
mux_chr_send_event(d, i, event);
}
-static void mux_chr_update_read_handler(CharDriverState *chr)
+static void mux_chr_update_read_handler(CharDriverState *chr,
+ GMainContext *context)
{
MuxDriver *d = chr->opaque;
@@ -729,8 +742,10 @@ static void mux_chr_update_read_handler(CharDriverState *chr)
d->chr_event[d->mux_cnt] = chr->chr_event;
/* Fix up the real driver with mux routines */
if (d->mux_cnt == 0) {
- qemu_chr_add_handlers(d->drv, mux_chr_can_read, mux_chr_read,
- mux_chr_event, chr);
+ qemu_chr_add_handlers_full(d->drv, mux_chr_can_read,
+ mux_chr_read,
+ mux_chr_event,
+ chr, context);
}
if (d->focus != -1) {
mux_chr_send_event(d, d->focus, CHR_EVENT_MUX_OUT);
@@ -846,6 +861,7 @@ typedef struct IOWatchPoll
IOCanReadHandler *fd_can_read;
GSourceFunc fd_read;
void *opaque;
+ GMainContext *context;
} IOWatchPoll;
static IOWatchPoll *io_watch_poll_from_source(GSource *source)
@@ -853,7 +869,8 @@ static IOWatchPoll *io_watch_poll_from_source(GSource *source)
return container_of(source, IOWatchPoll, parent);
}
-static gboolean io_watch_poll_prepare(GSource *source, gint *timeout_)
+static gboolean io_watch_poll_prepare(GSource *source,
+ gint *timeout_)
{
IOWatchPoll *iwp = io_watch_poll_from_source(source);
bool now_active = iwp->fd_can_read(iwp->opaque) > 0;
@@ -866,7 +883,7 @@ static gboolean io_watch_poll_prepare(GSource *source, gint *timeout_)
iwp->src = qio_channel_create_watch(
iwp->ioc, G_IO_IN | G_IO_ERR | G_IO_HUP | G_IO_NVAL);
g_source_set_callback(iwp->src, iwp->fd_read, iwp->opaque, NULL);
- g_source_attach(iwp->src, NULL);
+ g_source_attach(iwp->src, iwp->context);
} else {
g_source_destroy(iwp->src);
g_source_unref(iwp->src);
@@ -913,19 +930,22 @@ static GSourceFuncs io_watch_poll_funcs = {
static guint io_add_watch_poll(QIOChannel *ioc,
IOCanReadHandler *fd_can_read,
QIOChannelFunc fd_read,
- gpointer user_data)
+ gpointer user_data,
+ GMainContext *context)
{
IOWatchPoll *iwp;
int tag;
- iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs, sizeof(IOWatchPoll));
+ iwp = (IOWatchPoll *) g_source_new(&io_watch_poll_funcs,
+ sizeof(IOWatchPoll));
iwp->fd_can_read = fd_can_read;
iwp->opaque = user_data;
iwp->ioc = ioc;
iwp->fd_read = (GSourceFunc) fd_read;
iwp->src = NULL;
+ iwp->context = context;
- tag = g_source_attach(&iwp->parent, NULL);
+ tag = g_source_attach(&iwp->parent, context);
g_source_unref(&iwp->parent);
return tag;
}
@@ -1057,7 +1077,8 @@ static GSource *fd_chr_add_watch(CharDriverState *chr, GIOCondition cond)
return qio_channel_create_watch(s->ioc_out, cond);
}
-static void fd_chr_update_read_handler(CharDriverState *chr)
+static void fd_chr_update_read_handler(CharDriverState *chr,
+ GMainContext *context)
{
FDCharDriver *s = chr->opaque;
@@ -1065,7 +1086,8 @@ static void fd_chr_update_read_handler(CharDriverState *chr)
if (s->ioc_in) {
chr->fd_in_tag = io_add_watch_poll(s->ioc_in,
fd_chr_read_poll,
- fd_chr_read, chr);
+ fd_chr_read, chr,
+ context);
}
}
@@ -1309,7 +1331,8 @@ static void pty_chr_update_read_handler_locked(CharDriverState *chr)
}
}
-static void pty_chr_update_read_handler(CharDriverState *chr)
+static void pty_chr_update_read_handler(CharDriverState *chr,
+ GMainContext *context)
{
qemu_mutex_lock(&chr->chr_write_lock);
pty_chr_update_read_handler_locked(chr);
@@ -1413,7 +1436,8 @@ static void pty_chr_state(CharDriverState *chr, int connected)
if (!chr->fd_in_tag) {
chr->fd_in_tag = io_add_watch_poll(s->ioc,
pty_chr_read_poll,
- pty_chr_read, chr);
+ pty_chr_read,
+ chr, NULL);
}
}
}
@@ -2552,7 +2576,8 @@ static gboolean udp_chr_read(QIOChannel *chan, GIOCondition cond, void *opaque)
return TRUE;
}
-static void udp_chr_update_read_handler(CharDriverState *chr)
+static void udp_chr_update_read_handler(CharDriverState *chr,
+ GMainContext *context)
{
NetCharDriver *s = chr->opaque;
@@ -2560,7 +2585,8 @@ static void udp_chr_update_read_handler(CharDriverState *chr)
if (s->ioc) {
chr->fd_in_tag = io_add_watch_poll(s->ioc,
udp_chr_read_poll,
- udp_chr_read, chr);
+ udp_chr_read, chr,
+ context);
}
}
@@ -2963,12 +2989,14 @@ static void tcp_chr_connect(void *opaque)
if (s->ioc) {
chr->fd_in_tag = io_add_watch_poll(s->ioc,
tcp_chr_read_poll,
- tcp_chr_read, chr);
+ tcp_chr_read,
+ chr, NULL);
}
qemu_chr_be_generic_open(chr);
}
-static void tcp_chr_update_read_handler(CharDriverState *chr)
+static void tcp_chr_update_read_handler(CharDriverState *chr,
+ GMainContext *context)
{
TCPCharDriver *s = chr->opaque;
@@ -2980,7 +3008,8 @@ static void tcp_chr_update_read_handler(CharDriverState *chr)
if (s->ioc) {
chr->fd_in_tag = io_add_watch_poll(s->ioc,
tcp_chr_read_poll,
- tcp_chr_read, chr);
+ tcp_chr_read, chr,
+ context);
}
}
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 03/12] colo-compare: introduce colo compare initialization
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 01/12] docs: Add documentation for COLO-proxy Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 02/12] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 04/12] net/colo.c: add colo.c to define and handle packet Zhang Chen
` (11 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
This a COLO net ascii figure:
Primary qemu Secondary qemu
+--------------------------------------------------------------+ +----------------------------------------------------------------+
| +----------------------------------------------------------+ | | +-----------------------------------------------------------+ |
| | | | | | | |
| | guest | | | | guest | |
| | | | | | | |
| +-------^--------------------------+-----------------------+ | | +---------------------+--------+----------------------------+ |
| | | | | ^ | |
| | | | | | | |
| | +------------------------------------------------------+ | | | |
|netfilter| | | | | | netfilter | | |
| +----------+ +----------------------------+ | | | +-----------------------------------------------------------+ |
| | | | | | out | | | | | | filter excute order | |
| | | | +-----------------------------+ | | | | | | +-------------------> | |
| | | | | | | | | | | | | | TCP | |
| | +-----+--+-+ +-----v----+ +-----v----+ |pri +----+----+sec| | | | +------------+ +---+----+---v+rewriter++ +------------+ | |
| | | | | | | | |in | |in | | | | | | | | | | | | |
| | | filter | | filter | | filter +------> colo <------+ +--------> filter +--> adjust | adjust +--> filter | | |
| | | mirror | |redirector| |redirector| | | compare | | | | | | redirector | | ack | seq | | redirector | | |
| | | | | | | | | | | | | | | | | | | | | | | |
| | +----^-----+ +----+-----+ +----------+ | +---------+ | | | | +------------+ +--------+--------------+ +---+--------+ | |
| | | tx | rx rx | | | | | tx all | rx | |
| | | | | | | | +-----------------------------------------------------------+ |
| | | +--------------+ | | | | | |
| | | filter excute order | | | | | | |
| | | +----------------> | | | +--------------------------------------------------------+ |
| +-----------------------------------------+ | | |
| | | | | |
+--------------------------------------------------------------+ +----------------------------------------------------------------+
|guest receive | guest send
| |
+--------+----------------------------v------------------------+
| | NOTE: filter direction is rx/tx/all
| tap | rx:receive packets sent to the netdev
| | tx:receive packets sent by the netdev
+--------------------------------------------------------------+
In COLO-compare, we do packet comparing job.
Packets coming from the primary char indev will be sent to outdev.
Packets coming from the secondary char dev will be dropped after comparing.
colo-comapre need two input chardev and one output chardev:
primary_in=chardev1-id (source: primary send packet)
secondary_in=chardev2-id (source: secondary send packet)
outdev=chardev3-id
usage:
primary:
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
-object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
secondary:
-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
-device e1000,netdev=hn0,mac=52:a4:00:12:78:66
-chardev socket,id=red0,host=3.3.3.3,port=9003
-chardev socket,id=red1,host=3.3.3.3,port=9004
-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/Makefile.objs | 1 +
net/colo-compare.c | 268 +++++++++++++++++++++++++++++++++++++++++++++++++++++
qemu-options.hx | 39 ++++++++
vl.c | 3 +-
4 files changed, 310 insertions(+), 1 deletion(-)
create mode 100644 net/colo-compare.c
diff --git a/net/Makefile.objs b/net/Makefile.objs
index b7c22fd..ba92f73 100644
--- a/net/Makefile.objs
+++ b/net/Makefile.objs
@@ -16,3 +16,4 @@ common-obj-$(CONFIG_NETMAP) += netmap.o
common-obj-y += filter.o
common-obj-y += filter-buffer.o
common-obj-y += filter-mirror.o
+common-obj-y += colo-compare.o
diff --git a/net/colo-compare.c b/net/colo-compare.c
new file mode 100644
index 0000000..9b3b6ec
--- /dev/null
+++ b/net/colo-compare.c
@@ -0,0 +1,268 @@
+/*
+ * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
+ * (a.k.a. Fault Tolerance or Continuous Replication)
+ *
+ * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
+ * Copyright (c) 2016 FUJITSU LIMITED
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/error-report.h"
+#include "qemu-common.h"
+#include "qapi/qmp/qerror.h"
+#include "qapi/error.h"
+#include "net/net.h"
+#include "qom/object_interfaces.h"
+#include "qemu/iov.h"
+#include "qom/object.h"
+#include "qemu/typedefs.h"
+#include "net/queue.h"
+#include "sysemu/char.h"
+#include "qemu/sockets.h"
+#include "qapi-visit.h"
+
+#define TYPE_COLO_COMPARE "colo-compare"
+#define COLO_COMPARE(obj) \
+ OBJECT_CHECK(CompareState, (obj), TYPE_COLO_COMPARE)
+
+#define COMPARE_READ_LEN_MAX NET_BUFSIZE
+
+typedef struct CompareState {
+ Object parent;
+
+ char *pri_indev;
+ char *sec_indev;
+ char *outdev;
+ CharDriverState *chr_pri_in;
+ CharDriverState *chr_sec_in;
+ CharDriverState *chr_out;
+ SocketReadState pri_rs;
+ SocketReadState sec_rs;
+} CompareState;
+
+typedef struct CompareClass {
+ ObjectClass parent_class;
+} CompareClass;
+
+typedef struct CompareChardevProps {
+ bool is_socket;
+} CompareChardevProps;
+
+static char *compare_get_pri_indev(Object *obj, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ return g_strdup(s->pri_indev);
+}
+
+static void compare_set_pri_indev(Object *obj, const char *value, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ g_free(s->pri_indev);
+ s->pri_indev = g_strdup(value);
+}
+
+static char *compare_get_sec_indev(Object *obj, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ return g_strdup(s->sec_indev);
+}
+
+static void compare_set_sec_indev(Object *obj, const char *value, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ g_free(s->sec_indev);
+ s->sec_indev = g_strdup(value);
+}
+
+static char *compare_get_outdev(Object *obj, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ return g_strdup(s->outdev);
+}
+
+static void compare_set_outdev(Object *obj, const char *value, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ g_free(s->outdev);
+ s->outdev = g_strdup(value);
+}
+
+static void compare_pri_rs_finalize(SocketReadState *pri_rs)
+{
+ /* if packet_enqueue pri pkt failed we will send unsupported packet */
+}
+
+static void compare_sec_rs_finalize(SocketReadState *sec_rs)
+{
+ /* if packet_enqueue sec pkt failed we will notify trace */
+}
+
+static int compare_chardev_opts(void *opaque,
+ const char *name, const char *value,
+ Error **errp)
+{
+ CompareChardevProps *props = opaque;
+
+ if (strcmp(name, "backend") == 0 && strcmp(value, "socket") == 0) {
+ props->is_socket = true;
+ } else if (strcmp(name, "host") == 0) {
+ } else if (strcmp(name, "port") == 0) {
+ } else if (strcmp(name, "server") == 0) {
+ } else if (strcmp(name, "wait") == 0) {
+ } else if (strcmp(name, "path") == 0) {
+ }else {
+ error_setg(errp,
+ "COLO-compare does not support a chardev with option %s=%s",
+ name, value);
+ return -1;
+ }
+ return 0;
+}
+
+/*
+ * Return 0 is success.
+ * Return 1 is failed.
+ */
+static int find_and_check_chardev(CharDriverState **chr,
+ char *chr_name,
+ Error **errp)
+{
+ CompareChardevProps props;
+
+ *chr = qemu_chr_find(chr_name);
+ if (*chr == NULL) {
+ error_setg(errp, "Device '%s' not found",
+ chr_name);
+ return 1;
+ }
+
+ memset(&props, 0, sizeof(props));
+ if (qemu_opt_foreach((*chr)->opts, compare_chardev_opts, &props, errp)) {
+ return 1;
+ }
+
+ if (!props.is_socket) {
+ error_setg(errp, "chardev \"%s\" is not a tcp socket",
+ chr_name);
+ return 1;
+ }
+ return 0;
+}
+
+/*
+ * Called from the main thread on the primary
+ * to setup colo-compare.
+ */
+static void colo_compare_complete(UserCreatable *uc, Error **errp)
+{
+ CompareState *s = COLO_COMPARE(uc);
+
+ if (!s->pri_indev || !s->sec_indev || !s->outdev) {
+ error_setg(errp, "colo compare needs 'primary_in' ,"
+ "'secondary_in','outdev' property set");
+ return;
+ } else if (!strcmp(s->pri_indev, s->outdev) ||
+ !strcmp(s->sec_indev, s->outdev) ||
+ !strcmp(s->pri_indev, s->sec_indev)) {
+ error_setg(errp, "'indev' and 'outdev' could not be same "
+ "for compare module");
+ return;
+ }
+
+ if(find_and_check_chardev(&s->chr_pri_in, s->pri_indev,errp)) {
+ return;
+ }
+
+ if(find_and_check_chardev(&s->chr_sec_in, s->sec_indev,errp)) {
+ return;
+ }
+
+ if(find_and_check_chardev(&s->chr_out, s->outdev,errp)) {
+ return;
+ }
+
+ qemu_chr_fe_claim_no_fail(s->chr_pri_in);
+
+ qemu_chr_fe_claim_no_fail(s->chr_sec_in);
+
+ qemu_chr_fe_claim_no_fail(s->chr_out);
+
+ net_socket_rs_init(&s->pri_rs, compare_pri_rs_finalize);
+ net_socket_rs_init(&s->sec_rs, compare_sec_rs_finalize);
+
+ return;
+}
+
+static void colo_compare_class_init(ObjectClass *oc, void *data)
+{
+ UserCreatableClass *ucc = USER_CREATABLE_CLASS(oc);
+
+ ucc->complete = colo_compare_complete;
+}
+
+static void colo_compare_init(Object *obj)
+{
+ object_property_add_str(obj, "primary_in",
+ compare_get_pri_indev, compare_set_pri_indev,
+ NULL);
+ object_property_add_str(obj, "secondary_in",
+ compare_get_sec_indev, compare_set_sec_indev,
+ NULL);
+ object_property_add_str(obj, "outdev",
+ compare_get_outdev, compare_set_outdev,
+ NULL);
+}
+
+static void colo_compare_finalize(Object *obj)
+{
+ CompareState *s = COLO_COMPARE(obj);
+
+ if (s->chr_pri_in) {
+ qemu_chr_add_handlers(s->chr_pri_in, NULL, NULL, NULL, NULL);
+ qemu_chr_fe_release(s->chr_pri_in);
+ }
+ if (s->chr_sec_in) {
+ qemu_chr_add_handlers(s->chr_sec_in, NULL, NULL, NULL, NULL);
+ qemu_chr_fe_release(s->chr_sec_in);
+ }
+ if (s->chr_out) {
+ qemu_chr_fe_release(s->chr_out);
+ }
+
+ g_free(s->pri_indev);
+ g_free(s->sec_indev);
+ g_free(s->outdev);
+}
+
+static const TypeInfo colo_compare_info = {
+ .name = TYPE_COLO_COMPARE,
+ .parent = TYPE_OBJECT,
+ .instance_size = sizeof(CompareState),
+ .instance_init = colo_compare_init,
+ .instance_finalize = colo_compare_finalize,
+ .class_size = sizeof(CompareClass),
+ .class_init = colo_compare_class_init,
+ .interfaces = (InterfaceInfo[]) {
+ { TYPE_USER_CREATABLE },
+ { }
+ }
+};
+
+static void register_types(void)
+{
+ type_register_static(&colo_compare_info);
+}
+
+type_init(register_types);
diff --git a/qemu-options.hx b/qemu-options.hx
index a71aaf8..87fbba3 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3887,6 +3887,45 @@ Dump the network traffic on netdev @var{dev} to the file specified by
The file format is libpcap, so it can be analyzed with tools such as tcpdump
or Wireshark.
+@item -object colo-compare,id=@var{id},primary_in=@var{chardevid},secondary_in=@var{chardevid},
+outdev=@var{chardevid}
+
+Colo-compare gets packet from primary_in@var{chardevid} and secondary_in@var{chardevid}, than compare primary packet with
+secondary packet. If the packets are same, we will output primary
+packet to outdev@var{chardevid}, else we will notify colo-frame
+do checkpoint and send primary packet to outdev@var{chardevid}.
+
+we must use it with the help of filter-mirror and filter-redirector.
+
+@example
+
+primary:
+-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown
+-device e1000,id=e0,netdev=hn0,mac=52:a4:00:12:78:66
+-chardev socket,id=mirror0,host=3.3.3.3,port=9003,server,nowait
+-chardev socket,id=compare1,host=3.3.3.3,port=9004,server,nowait
+-chardev socket,id=compare0,host=3.3.3.3,port=9001,server,nowait
+-chardev socket,id=compare0-0,host=3.3.3.3,port=9001
+-chardev socket,id=compare_out,host=3.3.3.3,port=9005,server,nowait
+-chardev socket,id=compare_out0,host=3.3.3.3,port=9005
+-object filter-mirror,id=m0,netdev=hn0,queue=tx,outdev=mirror0
+-object filter-redirector,netdev=hn0,id=redire0,queue=rx,indev=compare_out
+-object filter-redirector,netdev=hn0,id=redire1,queue=rx,outdev=compare0
+-object colo-compare,id=comp0,primary_in=compare0-0,secondary_in=compare1,outdev=compare_out0
+
+secondary:
+-netdev tap,id=hn0,vhost=off,script=/etc/qemu-ifup,down script=/etc/qemu-ifdown
+-device e1000,netdev=hn0,mac=52:a4:00:12:78:66
+-chardev socket,id=red0,host=3.3.3.3,port=9003
+-chardev socket,id=red1,host=3.3.3.3,port=9004
+-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
+-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
+
+@end example
+
+If you want to know the detail of above command line, you can read
+the colo-compare git log.
+
@item -object secret,id=@var{id},data=@var{string},format=@var{raw|base64}[,keyid=@var{secretid},iv=@var{string}]
@item -object secret,id=@var{id},file=@var{filename},format=@var{raw|base64}[,keyid=@var{secretid},iv=@var{string}]
diff --git a/vl.c b/vl.c
index b3c80d5..e73a1d1 100644
--- a/vl.c
+++ b/vl.c
@@ -2806,7 +2806,8 @@ static bool object_create_initial(const char *type)
if (g_str_equal(type, "filter-buffer") ||
g_str_equal(type, "filter-dump") ||
g_str_equal(type, "filter-mirror") ||
- g_str_equal(type, "filter-redirector")) {
+ g_str_equal(type, "filter-redirector") ||
+ g_str_equal(type, "colo-compare")) {
return false;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 04/12] net/colo.c: add colo.c to define and handle packet
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (2 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 03/12] colo-compare: introduce colo compare initialization Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 05/12] Jhash: add linux kernel jhashtable in qemu Zhang Chen
` (10 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
The net/colo.c is used by colo-compare and filter-rewriter.
this can share common data structure like net packet,
and other functions.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/Makefile.objs | 1 +
net/colo-compare.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++-
net/colo.c | 86 ++++++++++++++++++++++++++++++++++++++++
net/colo.h | 37 ++++++++++++++++++
trace-events | 6 +++
5 files changed, 241 insertions(+), 2 deletions(-)
create mode 100644 net/colo.c
create mode 100644 net/colo.h
diff --git a/net/Makefile.objs b/net/Makefile.objs
index ba92f73..beb504b 100644
--- a/net/Makefile.objs
+++ b/net/Makefile.objs
@@ -17,3 +17,4 @@ common-obj-y += filter.o
common-obj-y += filter-buffer.o
common-obj-y += filter-mirror.o
common-obj-y += colo-compare.o
+common-obj-y += colo.o
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 9b3b6ec..d642ad4 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -26,13 +26,38 @@
#include "sysemu/char.h"
#include "qemu/sockets.h"
#include "qapi-visit.h"
+#include "net/colo.h"
+#include "trace.h"
#define TYPE_COLO_COMPARE "colo-compare"
#define COLO_COMPARE(obj) \
OBJECT_CHECK(CompareState, (obj), TYPE_COLO_COMPARE)
#define COMPARE_READ_LEN_MAX NET_BUFSIZE
+#define MAX_QUEUE_SIZE 1024
+/*
+ + CompareState ++
+ | |
+ +---------------+ +---------------+ +---------------+
+ |conn list +--->conn +--------->conn |
+ +---------------+ +---------------+ +---------------+
+ | | | | | |
+ +---------------+ +---v----+ +---v----+ +---v----+ +---v----+
+ |primary | |secondary |primary | |secondary
+ |packet | |packet + |packet | |packet +
+ +--------+ +--------+ +--------+ +--------+
+ | | | |
+ +---v----+ +---v----+ +---v----+ +---v----+
+ |primary | |secondary |primary | |secondary
+ |packet | |packet + |packet | |packet +
+ +--------+ +--------+ +--------+ +--------+
+ | | | |
+ +---v----+ +---v----+ +---v----+ +---v----+
+ |primary | |secondary |primary | |secondary
+ |packet | |packet + |packet | |packet +
+ +--------+ +--------+ +--------+ +--------+
+*/
typedef struct CompareState {
Object parent;
@@ -44,6 +69,9 @@ typedef struct CompareState {
CharDriverState *chr_out;
SocketReadState pri_rs;
SocketReadState sec_rs;
+
+ /* hashtable to save connection */
+ GHashTable *connection_track_table;
} CompareState;
typedef struct CompareClass {
@@ -54,6 +82,76 @@ typedef struct CompareChardevProps {
bool is_socket;
} CompareChardevProps;
+enum {
+ PRIMARY_IN = 0,
+ SECONDARY_IN,
+};
+
+static int compare_chr_send(CharDriverState *out,
+ const uint8_t *buf,
+ uint32_t size);
+
+/*
+ * Return 0 on success, if return -1 means the pkt
+ * is unsupported(arp and ipv6) and will be sent later
+ */
+static int packet_enqueue(CompareState *s, int mode)
+{
+ Packet *pkt = NULL;
+
+ if (mode == PRIMARY_IN) {
+ pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len);
+ } else {
+ pkt = packet_new(s->sec_rs.buf, s->sec_rs.packet_len);
+ }
+
+ if (parse_packet_early(pkt)) {
+ packet_destroy(pkt, NULL);
+ pkt = NULL;
+ return -1;
+ }
+ /* TODO: get connection key from pkt */
+
+ /*
+ * TODO: use connection key get conn from
+ * connection_track_table
+ */
+
+ /*
+ * TODO: insert pkt to it's conn->primary_list
+ * or conn->secondary_list
+ */
+
+ return 0;
+}
+
+static int compare_chr_send(CharDriverState *out,
+ const uint8_t *buf,
+ uint32_t size)
+{
+ int ret = 0;
+ uint32_t len = htonl(size);
+
+ if (!size) {
+ return 0;
+ }
+
+ ret = qemu_chr_fe_write_all(out, (uint8_t *)&len, sizeof(len));
+ if (ret != sizeof(len)) {
+ goto err;
+ }
+
+ ret = qemu_chr_fe_write_all(out, (uint8_t *)buf, size);
+ if (ret != size) {
+ goto err;
+ }
+
+ return 0;
+
+err:
+ return ret < 0 ? ret : -EIO;
+}
+
static char *compare_get_pri_indev(Object *obj, Error **errp)
{
CompareState *s = COLO_COMPARE(obj);
@@ -101,12 +199,21 @@ static void compare_set_outdev(Object *obj, const char *value, Error **errp)
static void compare_pri_rs_finalize(SocketReadState *pri_rs)
{
- /* if packet_enqueue pri pkt failed we will send unsupported packet */
+ CompareState *s = container_of(pri_rs, CompareState, pri_rs);
+
+ if (packet_enqueue(s, PRIMARY_IN)) {
+ trace_colo_compare_main("primary: unsupported packet in");
+ compare_chr_send(s->chr_out, pri_rs->buf, pri_rs->packet_len);
+ }
}
static void compare_sec_rs_finalize(SocketReadState *sec_rs)
{
- /* if packet_enqueue sec pkt failed we will notify trace */
+ CompareState *s = container_of(sec_rs, CompareState, sec_rs);
+
+ if (packet_enqueue(s, SECONDARY_IN)) {
+ trace_colo_compare_main("secondary: unsupported packet in");
+ }
}
static int compare_chardev_opts(void *opaque,
@@ -202,6 +309,8 @@ static void colo_compare_complete(UserCreatable *uc, Error **errp)
net_socket_rs_init(&s->pri_rs, compare_pri_rs_finalize);
net_socket_rs_init(&s->sec_rs, compare_sec_rs_finalize);
+ /* use g_hash_table_new_full() to new a hashtable */
+
return;
}
diff --git a/net/colo.c b/net/colo.c
new file mode 100644
index 0000000..8582175
--- /dev/null
+++ b/net/colo.c
@@ -0,0 +1,86 @@
+/*
+ * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
+ * (a.k.a. Fault Tolerance or Continuous Replication)
+ *
+ * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
+ * Copyright (c) 2016 FUJITSU LIMITED
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "trace.h"
+#include "net/colo.h"
+
+int parse_packet_early(Packet *pkt)
+{
+ int network_length;
+ static const uint8_t vlan[] = {0x81, 0x00};
+ uint8_t *data = pkt->data;
+ uint16_t l3_proto;
+ ssize_t l2hdr_len = eth_get_l2_hdr_length(data);
+
+ if (pkt->size < ETH_HLEN) {
+ trace_colo_proxy_main("pkt->size < ETH_HLEN");
+ return 1;
+ }
+
+ /*
+ * TODO: support vlan.
+ */
+ if (!memcmp(&data[12], vlan, sizeof(vlan))) {
+ trace_colo_proxy_main("COLO-proxy don't support vlan");
+ return 1;
+ }
+
+ pkt->network_header = data + l2hdr_len;
+
+ const struct iovec l2vec = {
+ .iov_base = (void *) data,
+ .iov_len = l2hdr_len
+ };
+ l3_proto = eth_get_l3_proto(&l2vec, 1, l2hdr_len);
+
+ if (l3_proto != ETH_P_IP) {
+ return 1;
+ }
+
+ network_length = pkt->ip->ip_hl * 4;
+ if (pkt->size < l2hdr_len + network_length) {
+ trace_colo_proxy_main("pkt->size < network_header + network_length");
+ return 1;
+ }
+ pkt->transport_header = pkt->network_header + network_length;
+
+ return 0;
+}
+
+Packet *packet_new(const void *data, int size)
+{
+ Packet *pkt = g_slice_new(Packet);
+
+ pkt->data = g_memdup(data, size);
+ pkt->size = size;
+
+ return pkt;
+}
+
+void packet_destroy(void *opaque, void *user_data)
+{
+ Packet *pkt = opaque;
+
+ g_free(pkt->data);
+ g_slice_free(Packet, pkt);
+}
+
+/*
+ * Clear hashtable, stop this hash growing really huge
+ */
+void connection_hashtable_reset(GHashTable *connection_track_table)
+{
+ g_hash_table_remove_all(connection_track_table);
+}
diff --git a/net/colo.h b/net/colo.h
new file mode 100644
index 0000000..e211eda
--- /dev/null
+++ b/net/colo.h
@@ -0,0 +1,37 @@
+/*
+ * COarse-grain LOck-stepping Virtual Machines for Non-stop Service (COLO)
+ * (a.k.a. Fault Tolerance or Continuous Replication)
+ *
+ * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
+ * Copyright (c) 2016 FUJITSU LIMITED
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#ifndef QEMU_COLO_PROXY_H
+#define QEMU_COLO_PROXY_H
+
+#include "slirp/slirp.h"
+
+#define HASHTABLE_MAX_SIZE 16384
+
+typedef struct Packet {
+ void *data;
+ union {
+ uint8_t *network_header;
+ struct ip *ip;
+ };
+ uint8_t *transport_header;
+ int size;
+} Packet;
+
+int parse_packet_early(Packet *pkt);
+void connection_hashtable_reset(GHashTable *connection_track_table);
+Packet *packet_new(const void *data, int size);
+void packet_destroy(void *opaque, void *user_data);
+
+#endif /* QEMU_COLO_PROXY_H */
diff --git a/trace-events b/trace-events
index 616cc52..8df6220 100644
--- a/trace-events
+++ b/trace-events
@@ -140,6 +140,12 @@ memory_region_subpage_write(int cpu_index, void *mr, uint64_t offset, uint64_t v
memory_region_tb_read(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
memory_region_tb_write(int cpu_index, uint64_t addr, uint64_t value, unsigned size) "cpu %d addr %#"PRIx64" value %#"PRIx64" size %u"
+# net/colo.c
+colo_proxy_main(const char *chr) ": %s"
+
+# net/colo-compare.c
+colo_compare_main(const char *chr) ": %s"
+
### Guest events, keep at bottom
# @vaddr: Access' virtual address.
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 05/12] Jhash: add linux kernel jhashtable in qemu
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (3 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 04/12] net/colo.c: add colo.c to define and handle packet Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet Zhang Chen
` (9 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
Jhash will be used by colo-compare and filter-rewriter
to save and lookup net connection info
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
include/qemu/jhash.h | 59 ++++++++++++++++++++++++++++++++++++++++++++++++++++
net/colo.h | 1 +
2 files changed, 60 insertions(+)
create mode 100644 include/qemu/jhash.h
diff --git a/include/qemu/jhash.h b/include/qemu/jhash.h
new file mode 100644
index 0000000..7222242
--- /dev/null
+++ b/include/qemu/jhash.h
@@ -0,0 +1,59 @@
+/* jhash.h: Jenkins hash support.
+ *
+ * Copyright (C) 2006. Bob Jenkins (bob_jenkins@burtleburtle.net)
+ *
+ * http://burtleburtle.net/bob/hash/
+ *
+ * These are the credits from Bob's sources:
+ *
+ * lookup3.c, by Bob Jenkins, May 2006, Public Domain.
+ *
+ * These are functions for producing 32-bit hashes for hash table lookup.
+ * hashword(), hashlittle(), hashlittle2(), hashbig(), mix(), and final()
+ * are externally useful functions. Routines to test the hash are included
+ * if SELF_TEST is defined. You can use this free for any purpose. It's in
+ * the public domain. It has no warranty.
+ *
+ * Copyright (C) 2009-2010 Jozsef Kadlecsik (kadlec@blackhole.kfki.hu)
+ *
+ * I've modified Bob's hash to be useful in the Linux kernel, and
+ * any bugs present are my fault.
+ * Jozsef
+ */
+
+#ifndef QEMU_JHASH_H__
+#define QEMU_JHASH_H__
+
+#include "qemu/bitops.h"
+
+/*
+ * hashtable relation copy from linux kernel jhash
+ */
+
+/* __jhash_mix -- mix 3 32-bit values reversibly. */
+#define __jhash_mix(a, b, c) \
+{ \
+ a -= c; a ^= rol32(c, 4); c += b; \
+ b -= a; b ^= rol32(a, 6); a += c; \
+ c -= b; c ^= rol32(b, 8); b += a; \
+ a -= c; a ^= rol32(c, 16); c += b; \
+ b -= a; b ^= rol32(a, 19); a += c; \
+ c -= b; c ^= rol32(b, 4); b += a; \
+}
+
+/* __jhash_final - final mixing of 3 32-bit values (a,b,c) into c */
+#define __jhash_final(a, b, c) \
+{ \
+ c ^= b; c -= rol32(b, 14); \
+ a ^= c; a -= rol32(c, 11); \
+ b ^= a; b -= rol32(a, 25); \
+ c ^= b; c -= rol32(b, 16); \
+ a ^= c; a -= rol32(c, 4); \
+ b ^= a; b -= rol32(a, 14); \
+ c ^= b; c -= rol32(b, 24); \
+}
+
+/* An arbitrary initial parameter */
+#define JHASH_INITVAL 0xdeadbeef
+
+#endif /* QEMU_JHASH_H__ */
diff --git a/net/colo.h b/net/colo.h
index e211eda..05dc0b6 100644
--- a/net/colo.h
+++ b/net/colo.h
@@ -16,6 +16,7 @@
#define QEMU_COLO_PROXY_H
#include "slirp/slirp.h"
+#include "qemu/jhash.h"
#define HASHTABLE_MAX_SIZE 16384
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (4 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 05/12] Jhash: add linux kernel jhashtable in qemu Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-06 7:51 ` Jason Wang
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 07/12] colo-compare: introduce packet comparison thread Zhang Chen
` (8 subsequent siblings)
14 siblings, 1 reply; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
In this patch we use kernel jhash table to track
connection, and then enqueue net packet like this:
+ CompareState ++
| |
+---------------+ +---------------+ +---------------+
|conn list +--->conn +--------->conn |
+---------------+ +---------------+ +---------------+
| | | | | |
+---------------+ +---v----+ +---v----+ +---v----+ +---v----+
|primary | |secondary |primary | |secondary
|packet | |packet + |packet | |packet +
+--------+ +--------+ +--------+ +--------+
| | | |
+---v----+ +---v----+ +---v----+ +---v----+
|primary | |secondary |primary | |secondary
|packet | |packet + |packet | |packet +
+--------+ +--------+ +--------+ +--------+
| | | |
+---v----+ +---v----+ +---v----+ +---v----+
|primary | |secondary |primary | |secondary
|packet | |packet + |packet | |packet +
+--------+ +--------+ +--------+ +--------+
We use conn_list to record connection info.
When we want to enqueue a packet, firstly get the
connection from connection_track_table. then push
the packet to g_queue(pri/sec) in it's own conn.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/colo-compare.c | 51 ++++++++++++++++++++-----
net/colo.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
net/colo.h | 27 ++++++++++++++
3 files changed, 176 insertions(+), 10 deletions(-)
diff --git a/net/colo-compare.c b/net/colo-compare.c
index d642ad4..42fc354 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -70,6 +70,11 @@ typedef struct CompareState {
SocketReadState pri_rs;
SocketReadState sec_rs;
+ /* connection list: the connections belonged to this NIC could be found
+ * in this list.
+ * element type: Connection
+ */
+ GQueue conn_list;
/* hashtable to save connection */
GHashTable *connection_track_table;
} CompareState;
@@ -97,7 +102,9 @@ static int compare_chr_send(CharDriverState *out,
*/
static int packet_enqueue(CompareState *s, int mode)
{
+ ConnectionKey key = {{ 0 } };
Packet *pkt = NULL;
+ Connection *conn;
if (mode == PRIMARY_IN) {
pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len);
@@ -110,17 +117,34 @@ static int packet_enqueue(CompareState *s, int mode)
pkt = NULL;
return -1;
}
- /* TODO: get connection key from pkt */
+ fill_connection_key(pkt, &key);
- /*
- * TODO: use connection key get conn from
- * connection_track_table
- */
+ conn = connection_get(s->connection_track_table,
+ &key,
+ &s->conn_list);
- /*
- * TODO: insert pkt to it's conn->primary_list
- * or conn->secondary_list
- */
+ if (!conn->processing) {
+ g_queue_push_tail(&s->conn_list, conn);
+ conn->processing = true;
+ }
+
+ if (mode == PRIMARY_IN) {
+ if (g_queue_get_length(&conn->primary_list) <=
+ MAX_QUEUE_SIZE) {
+ g_queue_push_tail(&conn->primary_list, pkt);
+ } else {
+ error_report("colo compare primary queue size too big,"
+ "drop packet");
+ }
+ } else {
+ if (g_queue_get_length(&conn->secondary_list) <
+ MAX_QUEUE_SIZE) {
+ g_queue_push_tail(&conn->secondary_list, pkt);
+ } else {
+ error_report("colo compare secondary queue size too big,"
+ "drop packet");
+ }
+ }
return 0;
}
@@ -309,7 +333,12 @@ static void colo_compare_complete(UserCreatable *uc, Error **errp)
net_socket_rs_init(&s->pri_rs, compare_pri_rs_finalize);
net_socket_rs_init(&s->sec_rs, compare_sec_rs_finalize);
- /* use g_hash_table_new_full() to new a hashtable */
+ g_queue_init(&s->conn_list);
+
+ s->connection_track_table = g_hash_table_new_full(connection_key_hash,
+ connection_key_equal,
+ g_free,
+ connection_destroy);
return;
}
@@ -350,6 +379,8 @@ static void colo_compare_finalize(Object *obj)
qemu_chr_fe_release(s->chr_out);
}
+ g_queue_free(&s->conn_list);
+
g_free(s->pri_indev);
g_free(s->sec_indev);
g_free(s->outdev);
diff --git a/net/colo.c b/net/colo.c
index 8582175..4d58e0c 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -16,6 +16,29 @@
#include "trace.h"
#include "net/colo.h"
+uint32_t connection_key_hash(const void *opaque)
+{
+ const ConnectionKey *key = opaque;
+ uint32_t a, b, c;
+
+ /* Jenkins hash */
+ a = b = c = JHASH_INITVAL + sizeof(*key);
+ a += key->src.s_addr;
+ b += key->dst.s_addr;
+ c += (key->src_port | key->dst_port << 16);
+ __jhash_mix(a, b, c);
+
+ a += key->ip_proto;
+ __jhash_final(a, b, c);
+
+ return c;
+}
+
+int connection_key_equal(const void *key1, const void *key2)
+{
+ return memcmp(key1, key2, sizeof(ConnectionKey)) == 0;
+}
+
int parse_packet_early(Packet *pkt)
{
int network_length;
@@ -59,6 +82,62 @@ int parse_packet_early(Packet *pkt)
return 0;
}
+void fill_connection_key(Packet *pkt, ConnectionKey *key)
+{
+ uint32_t tmp_ports;
+
+ key->ip_proto = pkt->ip->ip_p;
+
+ switch (key->ip_proto) {
+ case IPPROTO_TCP:
+ case IPPROTO_UDP:
+ case IPPROTO_DCCP:
+ case IPPROTO_ESP:
+ case IPPROTO_SCTP:
+ case IPPROTO_UDPLITE:
+ tmp_ports = *(uint32_t *)(pkt->transport_header);
+ key->src = pkt->ip->ip_src;
+ key->dst = pkt->ip->ip_dst;
+ key->src_port = ntohs(tmp_ports & 0xffff);
+ key->dst_port = ntohs(tmp_ports >> 16);
+ break;
+ case IPPROTO_AH:
+ tmp_ports = *(uint32_t *)(pkt->transport_header + 4);
+ key->src = pkt->ip->ip_src;
+ key->dst = pkt->ip->ip_dst;
+ key->src_port = ntohs(tmp_ports & 0xffff);
+ key->dst_port = ntohs(tmp_ports >> 16);
+ break;
+ default:
+ key->src_port = 0;
+ key->dst_port = 0;
+ break;
+ }
+}
+
+Connection *connection_new(ConnectionKey *key)
+{
+ Connection *conn = g_slice_new(Connection);
+
+ conn->ip_proto = key->ip_proto;
+ conn->processing = false;
+ g_queue_init(&conn->primary_list);
+ g_queue_init(&conn->secondary_list);
+
+ return conn;
+}
+
+void connection_destroy(void *opaque)
+{
+ Connection *conn = opaque;
+
+ g_queue_foreach(&conn->primary_list, packet_destroy, NULL);
+ g_queue_free(&conn->primary_list);
+ g_queue_foreach(&conn->secondary_list, packet_destroy, NULL);
+ g_queue_free(&conn->secondary_list);
+ g_slice_free(Connection, conn);
+}
+
Packet *packet_new(const void *data, int size)
{
Packet *pkt = g_slice_new(Packet);
@@ -84,3 +163,32 @@ void connection_hashtable_reset(GHashTable *connection_track_table)
{
g_hash_table_remove_all(connection_track_table);
}
+
+/* if not found, create a new connection and add to hash table */
+Connection *connection_get(GHashTable *connection_track_table,
+ ConnectionKey *key,
+ GQueue *conn_list)
+{
+ Connection *conn = g_hash_table_lookup(connection_track_table, key);
+
+ if (conn == NULL) {
+ ConnectionKey *new_key = g_memdup(key, sizeof(*key));
+
+ conn = connection_new(key);
+
+ if (g_hash_table_size(connection_track_table) > HASHTABLE_MAX_SIZE) {
+ trace_colo_proxy_main("colo proxy connection hashtable full, clear it");
+ connection_hashtable_reset(connection_track_table);
+ /*
+ * clear the conn_list
+ */
+ while (!g_queue_is_empty(conn_list)) {
+ connection_destroy(g_queue_pop_head(conn_list));
+ }
+ }
+
+ g_hash_table_insert(connection_track_table, new_key, conn);
+ }
+
+ return conn;
+}
diff --git a/net/colo.h b/net/colo.h
index 05dc0b6..dd92cdb 100644
--- a/net/colo.h
+++ b/net/colo.h
@@ -30,7 +30,34 @@ typedef struct Packet {
int size;
} Packet;
+typedef struct ConnectionKey {
+ /* (src, dst) must be grouped, in the same way than in IP header */
+ struct in_addr src;
+ struct in_addr dst;
+ uint16_t src_port;
+ uint16_t dst_port;
+ uint8_t ip_proto;
+} QEMU_PACKED ConnectionKey;
+
+typedef struct Connection {
+ /* connection primary send queue: element type: Packet */
+ GQueue primary_list;
+ /* connection secondary send queue: element type: Packet */
+ GQueue secondary_list;
+ /* flag to enqueue unprocessed_connections */
+ bool processing;
+ uint8_t ip_proto;
+} Connection;
+
+uint32_t connection_key_hash(const void *opaque);
+int connection_key_equal(const void *opaque1, const void *opaque2);
int parse_packet_early(Packet *pkt);
+void fill_connection_key(Packet *pkt, ConnectionKey *key);
+Connection *connection_new(ConnectionKey *key);
+void connection_destroy(void *opaque);
+Connection *connection_get(GHashTable *connection_track_table,
+ ConnectionKey *key,
+ GQueue *conn_list);
void connection_hashtable_reset(GHashTable *connection_track_table);
Packet *packet_new(const void *data, int size);
void packet_destroy(void *opaque, void *user_data);
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 07/12] colo-compare: introduce packet comparison thread
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (5 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 08/12] colo-compare: add TCP, UDP, ICMP packet comparison Zhang Chen
` (7 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
If primary packet is same with secondary packet,
we will send primary packet and drop secondary
packet, otherwise notify COLO frame to do checkpoint.
If primary packet comes but secondary packet does not,
after REGULAR_PACKET_CHECK_MS milliseconds we set
the primary packet as old_packet,then do a checkpoint.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/colo-compare.c | 231 +++++++++++++++++++++++++++++++++++++++++++++++++++++
net/colo.c | 1 +
net/colo.h | 3 +
trace-events | 2 +
4 files changed, 237 insertions(+)
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 42fc354..78e0df4 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -35,6 +35,8 @@
#define COMPARE_READ_LEN_MAX NET_BUFSIZE
#define MAX_QUEUE_SIZE 1024
+/* TODO: Should be configurable */
+#define REGULAR_PACKET_CHECK_MS 3000
/*
+ CompareState ++
@@ -77,6 +79,11 @@ typedef struct CompareState {
GQueue conn_list;
/* hashtable to save connection */
GHashTable *connection_track_table;
+ /* compare thread, a thread for each NIC */
+ QemuThread thread;
+ /* Timer used on the primary to find packets that are never matched */
+ QEMUTimer *timer;
+ QemuMutex timer_check_lock;
} CompareState;
typedef struct CompareClass {
@@ -149,6 +156,118 @@ static int packet_enqueue(CompareState *s, int mode)
return 0;
}
+/*
+ * The IP packets sent by primary and secondary
+ * will be compared in here
+ * TODO support ip fragment, Out-Of-Order
+ * return: 0 means packet same
+ * > 0 || < 0 means packet different
+ */
+static int colo_packet_compare(Packet *ppkt, Packet *spkt)
+{
+ trace_colo_compare_ip_info(ppkt->size, inet_ntoa(ppkt->ip->ip_src),
+ inet_ntoa(ppkt->ip->ip_dst), spkt->size,
+ inet_ntoa(spkt->ip->ip_src),
+ inet_ntoa(spkt->ip->ip_dst));
+
+ if (ppkt->size == spkt->size) {
+ return memcmp(ppkt->data, spkt->data, spkt->size);
+ } else {
+ return -1;
+ }
+}
+
+static int colo_packet_compare_all(Packet *spkt, Packet *ppkt)
+{
+ trace_colo_compare_main("compare all");
+ return colo_packet_compare(ppkt, spkt);
+}
+
+static int colo_old_packet_check_one(Packet *pkt, int64_t *check_time)
+{
+ int64_t now = qemu_clock_get_ms(QEMU_CLOCK_HOST);
+
+ if ((now - pkt->creation_ms) > (*check_time)) {
+ trace_colo_old_packet_check_found(pkt->creation_ms);
+ return 0;
+ } else {
+ return 1;
+ }
+}
+
+static void colo_old_packet_check_one_conn(void *opaque,
+ void *user_data)
+{
+ Connection *conn = opaque;
+ GList *result = NULL;
+ int64_t check_time = REGULAR_PACKET_CHECK_MS;
+
+ result = g_queue_find_custom(&conn->primary_list,
+ &check_time,
+ (GCompareFunc)colo_old_packet_check_one);
+
+ if (result) {
+ /* do checkpoint will flush old packet */
+ /* TODO: colo_notify_checkpoint();*/
+ }
+}
+
+/*
+ * Look for old packets that the secondary hasn't matched,
+ * if we have some then we have to checkpoint to wake
+ * the secondary up.
+ */
+static void colo_old_packet_check(void *opaque)
+{
+ CompareState *s = opaque;
+
+ g_queue_foreach(&s->conn_list, colo_old_packet_check_one_conn, NULL);
+}
+
+/*
+ * Called from the compare thread on the primary
+ * for compare connection
+ */
+static void colo_compare_connection(void *opaque, void *user_data)
+{
+ CompareState *s = user_data;
+ Connection *conn = opaque;
+ Packet *pkt = NULL;
+ GList *result = NULL;
+ int ret;
+
+ while (!g_queue_is_empty(&conn->primary_list) &&
+ !g_queue_is_empty(&conn->secondary_list)) {
+ qemu_mutex_lock(&s->timer_check_lock);
+ pkt = g_queue_pop_tail(&conn->primary_list);
+ qemu_mutex_unlock(&s->timer_check_lock);
+ result = g_queue_find_custom(&conn->secondary_list,
+ pkt, (GCompareFunc)colo_packet_compare_all);
+
+ if (result) {
+ ret = compare_chr_send(s->chr_out, pkt->data, pkt->size);
+ if (ret < 0) {
+ error_report("colo_send_primary_packet failed");
+ }
+ trace_colo_compare_main("packet same and release packet");
+ g_queue_remove(&conn->secondary_list, result->data);
+ packet_destroy(pkt, NULL);
+ } else {
+ /*
+ * If one packet arrive late, the secondary_list or
+ * primary_list will be empty, so we can't compare it
+ * until next comparison.
+ */
+ trace_colo_compare_main("packet different");
+ qemu_mutex_lock(&s->timer_check_lock);
+ g_queue_push_tail(&conn->primary_list, pkt);
+ qemu_mutex_unlock(&s->timer_check_lock);
+ /* TODO: colo_notify_checkpoint();*/
+ break;
+ }
+ }
+}
+
static int compare_chr_send(CharDriverState *out,
const uint8_t *buf,
uint32_t size)
@@ -176,6 +295,65 @@ err:
return ret < 0 ? ret : -EIO;
}
+static int compare_chr_can_read(void *opaque)
+{
+ return COMPARE_READ_LEN_MAX;
+}
+
+/*
+ * Called from the main thread on the primary for packets
+ * arriving over the socket from the primary.
+ */
+static void compare_pri_chr_in(void *opaque, const uint8_t *buf, int size)
+{
+ CompareState *s = COLO_COMPARE(opaque);
+ int ret;
+
+ ret = net_fill_rstate(&s->pri_rs, buf, size);
+ if (ret == -1) {
+ qemu_chr_add_handlers(s->chr_pri_in, NULL, NULL, NULL, NULL);
+ error_report("colo-compare primary_in error");
+ }
+}
+
+/*
+ * Called from the main thread on the primary for packets
+ * arriving over the socket from the secondary.
+ */
+static void compare_sec_chr_in(void *opaque, const uint8_t *buf, int size)
+{
+ CompareState *s = COLO_COMPARE(opaque);
+ int ret;
+
+ ret = net_fill_rstate(&s->sec_rs, buf, size);
+ if (ret == -1) {
+ qemu_chr_add_handlers(s->chr_sec_in, NULL, NULL, NULL, NULL);
+ error_report("colo-compare secondary_in error");
+ }
+}
+
+static void *colo_compare_thread(void *opaque)
+{
+ GMainContext *worker_context;
+ GMainLoop *compare_loop;
+ CompareState *s = opaque;
+
+ worker_context = g_main_context_new();
+
+ qemu_chr_add_handlers_full(s->chr_pri_in, compare_chr_can_read,
+ compare_pri_chr_in, NULL, s, worker_context);
+ qemu_chr_add_handlers_full(s->chr_sec_in, compare_chr_can_read,
+ compare_sec_chr_in, NULL, s, worker_context);
+
+ compare_loop = g_main_loop_new(worker_context, FALSE);
+
+ g_main_loop_run(compare_loop);
+
+ g_main_loop_unref(compare_loop);
+ g_main_context_unref(worker_context);
+ return NULL;
+}
+
static char *compare_get_pri_indev(Object *obj, Error **errp)
{
CompareState *s = COLO_COMPARE(obj);
@@ -228,6 +406,9 @@ static void compare_pri_rs_finalize(SocketReadState *pri_rs)
if (packet_enqueue(s, PRIMARY_IN)) {
trace_colo_compare_main("primary: unsupported packet in");
compare_chr_send(s->chr_out, pri_rs->buf, pri_rs->packet_len);
+ } else {
+ /* compare connection */
+ g_queue_foreach(&s->conn_list, colo_compare_connection, s);
}
}
@@ -237,6 +418,9 @@ static void compare_sec_rs_finalize(SocketReadState *sec_rs)
if (packet_enqueue(s, SECONDARY_IN)) {
trace_colo_compare_main("secondary: unsupported packet in");
+ } else {
+ /* compare connection */
+ g_queue_foreach(&s->conn_list, colo_compare_connection, s);
}
}
@@ -293,12 +477,34 @@ static int find_and_check_chardev(CharDriverState **chr,
}
/*
+ * Check old packet regularly so it can watch for any packets
+ * that the secondary hasn't produced equivalents of.
+ */
+static void check_old_packet_regular(void *opaque)
+{
+ CompareState *s = opaque;
+
+ timer_mod(s->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) +
+ REGULAR_PACKET_CHECK_MS);
+ /* if have old packet we will notify checkpoint */
+ /*
+ * TODO: Make timer handler run in compare thread
+ * like qemu_chr_add_handlers_full.
+ */
+ qemu_mutex_lock(&s->timer_check_lock);
+ colo_old_packet_check(s);
+ qemu_mutex_unlock(&s->timer_check_lock);
+}
+
+/*
* Called from the main thread on the primary
* to setup colo-compare.
*/
static void colo_compare_complete(UserCreatable *uc, Error **errp)
{
CompareState *s = COLO_COMPARE(uc);
+ char thread_name[64];
+ static int compare_id;
if (!s->pri_indev || !s->sec_indev || !s->outdev) {
error_setg(errp, "colo compare needs 'primary_in' ,"
@@ -334,12 +540,25 @@ static void colo_compare_complete(UserCreatable *uc, Error **errp)
net_socket_rs_init(&s->sec_rs, compare_sec_rs_finalize);
g_queue_init(&s->conn_list);
+ qemu_mutex_init(&s->timer_check_lock);
s->connection_track_table = g_hash_table_new_full(connection_key_hash,
connection_key_equal,
g_free,
connection_destroy);
+ sprintf(thread_name, "colo-compare %d", compare_id);
+ qemu_thread_create(&s->thread, thread_name,
+ colo_compare_thread, s,
+ QEMU_THREAD_JOINABLE);
+ compare_id++;
+
+ /* A regular timer to kick any packets that the secondary doesn't match */
+ s->timer = timer_new_ms(QEMU_CLOCK_VIRTUAL, /* Only when guest runs */
+ check_old_packet_regular, s);
+ timer_mod(s->timer, qemu_clock_get_ms(QEMU_CLOCK_VIRTUAL) +
+ REGULAR_PACKET_CHECK_MS);
+
return;
}
@@ -381,6 +600,18 @@ static void colo_compare_finalize(Object *obj)
g_queue_free(&s->conn_list);
+ if (s->thread.thread) {
+ /* compare connection */
+ g_queue_foreach(&s->conn_list, colo_compare_connection, s);
+ qemu_thread_join(&s->thread);
+ }
+
+ if (s->timer) {
+ timer_del(s->timer);
+ }
+
+ qemu_mutex_destroy(&s->timer_check_lock);
+
g_free(s->pri_indev);
g_free(s->sec_indev);
g_free(s->outdev);
diff --git a/net/colo.c b/net/colo.c
index 4d58e0c..ee4dc80 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -144,6 +144,7 @@ Packet *packet_new(const void *data, int size)
pkt->data = g_memdup(data, size);
pkt->size = size;
+ pkt->creation_ms = qemu_clock_get_ms(QEMU_CLOCK_HOST);
return pkt;
}
diff --git a/net/colo.h b/net/colo.h
index dd92cdb..c23175c 100644
--- a/net/colo.h
+++ b/net/colo.h
@@ -17,6 +17,7 @@
#include "slirp/slirp.h"
#include "qemu/jhash.h"
+#include "qemu/timer.h"
#define HASHTABLE_MAX_SIZE 16384
@@ -28,6 +29,8 @@ typedef struct Packet {
};
uint8_t *transport_header;
int size;
+ /* Time of packet creation, in wall clock ms */
+ int64_t creation_ms;
} Packet;
typedef struct ConnectionKey {
diff --git a/trace-events b/trace-events
index 8df6220..2139bc5 100644
--- a/trace-events
+++ b/trace-events
@@ -145,6 +145,8 @@ colo_proxy_main(const char *chr) ": %s"
# net/colo-compare.c
colo_compare_main(const char *chr) ": %s"
+colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, const char *stc, const char *std) "ppkt size = %d, ip_src = %s, ip_dst = %s, spkt size = %d, ip_src = %s, ip_dst = %s"
+colo_old_packet_check_found(int64_t old_time) "%" PRId64
### Guest events, keep at bottom
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 08/12] colo-compare: add TCP, UDP, ICMP packet comparison
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (6 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 07/12] colo-compare: introduce packet comparison thread Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 09/12] filter-rewriter: introduce filter-rewriter initialization Zhang Chen
` (6 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
We add TCP,UDP,ICMP packet comparison to replace
IP packet comparison. This can increase the
accuracy of the package comparison.
Less checkpoint more efficiency.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/colo-compare.c | 145 +++++++++++++++++++++++++++++++++++++++++++++++++++--
trace-events | 3 ++
2 files changed, 144 insertions(+), 4 deletions(-)
diff --git a/net/colo-compare.c b/net/colo-compare.c
index 78e0df4..c04befc 100644
--- a/net/colo-compare.c
+++ b/net/colo-compare.c
@@ -18,6 +18,7 @@
#include "qapi/qmp/qerror.h"
#include "qapi/error.h"
#include "net/net.h"
+#include "net/eth.h"
#include "qom/object_interfaces.h"
#include "qemu/iov.h"
#include "qom/object.h"
@@ -177,9 +178,129 @@ static int colo_packet_compare(Packet *ppkt, Packet *spkt)
}
}
-static int colo_packet_compare_all(Packet *spkt, Packet *ppkt)
+/*
+ * Called from the compare thread on the primary
+ * for compare tcp packet
+ * compare_tcp copied from Dr. David Alan Gilbert's branch
+ */
+static int colo_packet_compare_tcp(Packet *spkt, Packet *ppkt)
+{
+ struct tcphdr *ptcp, *stcp;
+ int res;
+ char *sdebug, *ddebug;
+
+ trace_colo_compare_main("compare tcp");
+ if (ppkt->size != spkt->size) {
+ if (trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
+ trace_colo_compare_main("pkt size not same");
+ }
+ return -1;
+ }
+
+ ptcp = (struct tcphdr *)ppkt->transport_header;
+ stcp = (struct tcphdr *)spkt->transport_header;
+
+ /*
+ * The 'identification' field in the IP header is *very* random
+ * it almost never matches. Fudge this by ignoring differences in
+ * unfragmented packets; they'll normally sort themselves out if different
+ * anyway, and it should recover at the TCP level.
+ * An alternative would be to get both the primary and secondary to rewrite
+ * somehow; but that would need some sync traffic to sync the state
+ */
+ if (ntohs(ppkt->ip->ip_off) & IP_DF) {
+ spkt->ip->ip_id = ppkt->ip->ip_id;
+ /* and the sum will be different if the IDs were different */
+ spkt->ip->ip_sum = ppkt->ip->ip_sum;
+ }
+
+ res = memcmp(ppkt->data + ETH_HLEN, spkt->data + ETH_HLEN,
+ (spkt->size - ETH_HLEN));
+
+ if (res != 0 && trace_event_get_state(TRACE_COLO_COMPARE_MISCOMPARE)) {
+ sdebug = strdup(inet_ntoa(ppkt->ip->ip_src));
+ ddebug = strdup(inet_ntoa(ppkt->ip->ip_dst));
+ fprintf(stderr, "%s: src/dst: %s/%s p: seq/ack=%u/%u"
+ " s: seq/ack=%u/%u res=%d flags=%x/%x\n", __func__,
+ sdebug, ddebug,
+ ntohl(ptcp->th_seq), ntohl(ptcp->th_ack),
+ ntohl(stcp->th_seq), ntohl(stcp->th_ack),
+ res, ptcp->th_flags, stcp->th_flags);
+
+ fprintf(stderr, "Primary len = %d\n", ppkt->size);
+ qemu_hexdump((char *)ppkt->data, stderr, "colo-compare", ppkt->size);
+ fprintf(stderr, "Secondary len = %d\n", spkt->size);
+ qemu_hexdump((char *)spkt->data, stderr, "colo-compare", spkt->size);
+
+ g_free(sdebug);
+ g_free(ddebug);
+ }
+
+ return res;
+}
+
+/*
+ * Called from the compare thread on the primary
+ * for compare udp packet
+ */
+static int colo_packet_compare_udp(Packet *spkt, Packet *ppkt)
+{
+ int ret;
+
+ trace_colo_compare_main("compare udp");
+ ret = colo_packet_compare(ppkt, spkt);
+
+ if (ret) {
+ trace_colo_compare_udp_miscompare("primary pkt size", ppkt->size);
+ qemu_hexdump((char *)ppkt->data, stderr, "colo-compare", ppkt->size);
+ trace_colo_compare_udp_miscompare("Secondary pkt size", spkt->size);
+ qemu_hexdump((char *)spkt->data, stderr, "colo-compare", spkt->size);
+ }
+
+ return ret;
+}
+
+/*
+ * Called from the compare thread on the primary
+ * for compare icmp packet
+ */
+static int colo_packet_compare_icmp(Packet *spkt, Packet *ppkt)
{
- trace_colo_compare_main("compare all");
+ int network_length;
+
+ trace_colo_compare_main("compare icmp");
+ network_length = ppkt->ip->ip_hl * 4;
+ if (ppkt->size != spkt->size ||
+ ppkt->size < network_length + ETH_HLEN) {
+ return -1;
+ }
+
+ if (colo_packet_compare(ppkt, spkt)) {
+ trace_colo_compare_icmp_miscompare("primary pkt size",
+ ppkt->size);
+ qemu_hexdump((char *)ppkt->data, stderr, "colo-compare",
+ ppkt->size);
+ trace_colo_compare_icmp_miscompare("Secondary pkt size",
+ spkt->size);
+ qemu_hexdump((char *)spkt->data, stderr, "colo-compare",
+ spkt->size);
+ return -1;
+ } else {
+ return 0;
+ }
+}
+
+/*
+ * Called from the compare thread on the primary
+ * for compare other packet
+ */
+static int colo_packet_compare_other(Packet *spkt, Packet *ppkt)
+{
+ trace_colo_compare_main("compare other");
+ trace_colo_compare_ip_info(ppkt->size, inet_ntoa(ppkt->ip->ip_src),
+ inet_ntoa(ppkt->ip->ip_dst), spkt->size,
+ inet_ntoa(spkt->ip->ip_src),
+ inet_ntoa(spkt->ip->ip_dst));
return colo_packet_compare(ppkt, spkt);
}
@@ -241,8 +362,24 @@ static void colo_compare_connection(void *opaque, void *user_data)
qemu_mutex_lock(&s->timer_check_lock);
pkt = g_queue_pop_tail(&conn->primary_list);
qemu_mutex_unlock(&s->timer_check_lock);
- result = g_queue_find_custom(&conn->secondary_list,
- pkt, (GCompareFunc)colo_packet_compare_all);
+ switch (conn->ip_proto) {
+ case IPPROTO_TCP:
+ result = g_queue_find_custom(&conn->secondary_list,
+ pkt, (GCompareFunc)colo_packet_compare_tcp);
+ break;
+ case IPPROTO_UDP:
+ result = g_queue_find_custom(&conn->secondary_list,
+ pkt, (GCompareFunc)colo_packet_compare_udp);
+ break;
+ case IPPROTO_ICMP:
+ result = g_queue_find_custom(&conn->secondary_list,
+ pkt, (GCompareFunc)colo_packet_compare_icmp);
+ break;
+ default:
+ result = g_queue_find_custom(&conn->secondary_list,
+ pkt, (GCompareFunc)colo_packet_compare_other);
+ break;
+ }
if (result) {
ret = compare_chr_send(s->chr_out, pkt->data, pkt->size);
diff --git a/trace-events b/trace-events
index 2139bc5..4227b63 100644
--- a/trace-events
+++ b/trace-events
@@ -145,8 +145,11 @@ colo_proxy_main(const char *chr) ": %s"
# net/colo-compare.c
colo_compare_main(const char *chr) ": %s"
+colo_compare_udp_miscompare(const char *sta, int size) ": %s = %d"
+colo_compare_icmp_miscompare(const char *sta, int size) ": %s = %d"
colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, const char *stc, const char *std) "ppkt size = %d, ip_src = %s, ip_dst = %s, spkt size = %d, ip_src = %s, ip_dst = %s"
colo_old_packet_check_found(int64_t old_time) "%" PRId64
+colo_compare_miscompare(void) ""
### Guest events, keep at bottom
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 09/12] filter-rewriter: introduce filter-rewriter initialization
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (7 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 08/12] colo-compare: add TCP, UDP, ICMP packet comparison Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 10/12] filter-rewriter: track connection and parse packet Zhang Chen
` (5 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
Filter-rewriter is a part of COLO project.
It will rewrite some of secondary packet to make
secondary guest's tcp connection established successfully.
In this module we will rewrite tcp packet's ack to the secondary
from primary,and rewrite tcp packet's seq to the primary from
secondary.
usage:
colo secondary:
-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
-object filter-rewriter,id=rew0,netdev=hn0,queue=all
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/Makefile.objs | 1 +
net/filter-rewriter.c | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++
qemu-options.hx | 13 ++++++
vl.c | 3 +-
4 files changed, 126 insertions(+), 1 deletion(-)
create mode 100644 net/filter-rewriter.c
diff --git a/net/Makefile.objs b/net/Makefile.objs
index beb504b..2a80df5 100644
--- a/net/Makefile.objs
+++ b/net/Makefile.objs
@@ -18,3 +18,4 @@ common-obj-y += filter-buffer.o
common-obj-y += filter-mirror.o
common-obj-y += colo-compare.o
common-obj-y += colo.o
+common-obj-y += filter-rewriter.o
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
new file mode 100644
index 0000000..e23c21d
--- /dev/null
+++ b/net/filter-rewriter.c
@@ -0,0 +1,110 @@
+/*
+ * Copyright (c) 2016 HUAWEI TECHNOLOGIES CO., LTD.
+ * Copyright (c) 2016 FUJITSU LIMITED
+ * Copyright (c) 2016 Intel Corporation
+ *
+ * Author: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or
+ * later. See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "net/colo.h"
+#include "net/filter.h"
+#include "net/net.h"
+#include "qemu-common.h"
+#include "qapi/error.h"
+#include "qapi/qmp/qerror.h"
+#include "qapi-visit.h"
+#include "qom/object.h"
+#include "qemu/main-loop.h"
+#include "qemu/iov.h"
+#include "net/checksum.h"
+
+#define FILTER_COLO_REWRITER(obj) \
+ OBJECT_CHECK(RewriterState, (obj), TYPE_FILTER_REWRITER)
+
+#define TYPE_FILTER_REWRITER "filter-rewriter"
+
+enum {
+ PRIMARY = 0,
+ SECONDARY,
+};
+
+typedef struct RewriterState {
+ NetFilterState parent_obj;
+ NetQueue *incoming_queue;
+ /* hashtable to save connection */
+ GHashTable *connection_track_table;
+} RewriterState;
+
+static void filter_rewriter_flush(NetFilterState *nf)
+{
+ RewriterState *s = FILTER_COLO_REWRITER(nf);
+
+ if (!qemu_net_queue_flush(s->incoming_queue)) {
+ /* Unable to empty the queue, purge remaining packets */
+ qemu_net_queue_purge(s->incoming_queue, nf->netdev);
+ }
+}
+
+static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
+ NetClientState *sender,
+ unsigned flags,
+ const struct iovec *iov,
+ int iovcnt,
+ NetPacketSent *sent_cb)
+{
+ /*
+ * if we get tcp packet
+ * we will rewrite it to make secondary guest's
+ * connection established successfully
+ */
+ return 0;
+}
+
+static void colo_rewriter_cleanup(NetFilterState *nf)
+{
+ RewriterState *s = FILTER_COLO_REWRITER(nf);
+
+ /* flush packets */
+ if (s->incoming_queue) {
+ filter_rewriter_flush(nf);
+ g_free(s->incoming_queue);
+ }
+}
+
+static void colo_rewriter_setup(NetFilterState *nf, Error **errp)
+{
+ RewriterState *s = FILTER_COLO_REWRITER(nf);
+
+ s->connection_track_table = g_hash_table_new_full(connection_key_hash,
+ connection_key_equal,
+ g_free,
+ connection_destroy);
+ s->incoming_queue = qemu_new_net_queue(qemu_netfilter_pass_to_next, nf);
+}
+
+static void colo_rewriter_class_init(ObjectClass *oc, void *data)
+{
+ NetFilterClass *nfc = NETFILTER_CLASS(oc);
+
+ nfc->setup = colo_rewriter_setup;
+ nfc->cleanup = colo_rewriter_cleanup;
+ nfc->receive_iov = colo_rewriter_receive_iov;
+}
+
+static const TypeInfo colo_rewriter_info = {
+ .name = TYPE_FILTER_REWRITER,
+ .parent = TYPE_NETFILTER,
+ .class_init = colo_rewriter_class_init,
+ .instance_size = sizeof(RewriterState),
+};
+
+static void register_types(void)
+{
+ type_register_static(&colo_rewriter_info);
+}
+
+type_init(register_types);
diff --git a/qemu-options.hx b/qemu-options.hx
index 87fbba3..5cd50a8 100644
--- a/qemu-options.hx
+++ b/qemu-options.hx
@@ -3880,6 +3880,19 @@ Create a filter-redirector we need to differ outdev id from indev id, id can not
be the same. we can just use indev or outdev, but at least one of indev or outdev
need to be specified.
+@item -object filter-rewriter,id=@var{id},netdev=@var{netdevid},rewriter-mode=@var{mode}[,queue=@var{all|rx|tx}]
+
+Filter-rewriter is a part of COLO project.It will rewrite tcp packet to
+secondary from primary to keep secondary tcp connection,and rewrite
+tcp packet to primary from secondary make tcp packet can be handled by
+client.
+
+usage:
+colo secondary:
+-object filter-redirector,id=f1,netdev=hn0,queue=tx,indev=red0
+-object filter-redirector,id=f2,netdev=hn0,queue=rx,outdev=red1
+-object filter-rewriter,id=rew0,netdev=hn0,queue=all
+
@item -object filter-dump,id=@var{id},netdev=@var{dev},file=@var{filename}][,maxlen=@var{len}]
Dump the network traffic on netdev @var{dev} to the file specified by
diff --git a/vl.c b/vl.c
index e73a1d1..cda24ce 100644
--- a/vl.c
+++ b/vl.c
@@ -2807,7 +2807,8 @@ static bool object_create_initial(const char *type)
g_str_equal(type, "filter-dump") ||
g_str_equal(type, "filter-mirror") ||
g_str_equal(type, "filter-redirector") ||
- g_str_equal(type, "colo-compare")) {
+ g_str_equal(type, "colo-compare") ||
+ g_str_equal(type, "filter-rewriter")) {
return false;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 10/12] filter-rewriter: track connection and parse packet
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (8 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 09/12] filter-rewriter: introduce filter-rewriter initialization Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 11/12] filter-rewriter: rewrite tcp packet to keep secondary connection Zhang Chen
` (4 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
We use net/colo.h to track connection and parse packet
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/colo.c | 14 ++++++++++++++
net/colo.h | 1 +
net/filter-rewriter.c | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+)
diff --git a/net/colo.c b/net/colo.c
index ee4dc80..c74d78d 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -115,6 +115,20 @@ void fill_connection_key(Packet *pkt, ConnectionKey *key)
}
}
+void reverse_connection_key(ConnectionKey *key)
+{
+ struct in_addr tmp_ip;
+ uint16_t tmp_port;
+
+ tmp_ip = key->src;
+ key->src = key->dst;
+ key->dst = tmp_ip;
+
+ tmp_port = key->src_port;
+ key->src_port = key->dst_port;
+ key->dst_port = tmp_port;
+}
+
Connection *connection_new(ConnectionKey *key)
{
Connection *conn = g_slice_new(Connection);
diff --git a/net/colo.h b/net/colo.h
index c23175c..68ace6e 100644
--- a/net/colo.h
+++ b/net/colo.h
@@ -56,6 +56,7 @@ uint32_t connection_key_hash(const void *opaque);
int connection_key_equal(const void *opaque1, const void *opaque2);
int parse_packet_early(Packet *pkt);
void fill_connection_key(Packet *pkt, ConnectionKey *key);
+void reverse_connection_key(ConnectionKey *key);
Connection *connection_new(ConnectionKey *key);
void connection_destroy(void *opaque);
Connection *connection_get(GHashTable *connection_track_table,
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
index e23c21d..0cb3cef 100644
--- a/net/filter-rewriter.c
+++ b/net/filter-rewriter.c
@@ -49,6 +49,20 @@ static void filter_rewriter_flush(NetFilterState *nf)
}
}
+/*
+ * Return 1 on success, if return 0 means the pkt
+ * is not TCP packet
+ */
+static int is_tcp_packet(Packet *pkt)
+{
+ if (!parse_packet_early(pkt) &&
+ pkt->ip->ip_p == IPPROTO_TCP) {
+ return 1;
+ } else {
+ return 0;
+ }
+}
+
static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
NetClientState *sender,
unsigned flags,
@@ -56,11 +70,47 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
int iovcnt,
NetPacketSent *sent_cb)
{
+ RewriterState *s = FILTER_COLO_REWRITER(nf);
+ Connection *conn;
+ ConnectionKey key = {{ 0 } };
+ Packet *pkt;
+ ssize_t size = iov_size(iov, iovcnt);
+ char *buf = g_malloc0(size);
+
+ iov_to_buf(iov, iovcnt, 0, buf, size);
+ pkt = packet_new(buf, size);
+
/*
* if we get tcp packet
* we will rewrite it to make secondary guest's
* connection established successfully
*/
+ if (pkt && is_tcp_packet(pkt)) {
+
+ fill_connection_key(pkt, &key);
+
+ if (sender == nf->netdev) {
+ /*
+ * We need make tcp TX and RX packet
+ * into one connection.
+ */
+ reverse_connection_key(&key);
+ }
+ conn = connection_get(s->connection_track_table,
+ &key,
+ NULL);
+
+ if (sender == nf->netdev) {
+ /* NET_FILTER_DIRECTION_TX */
+ /* handle_primary_tcp_pkt */
+ } else {
+ /* NET_FILTER_DIRECTION_RX */
+ /* handle_secondary_tcp_pkt */
+ }
+ }
+
+ packet_destroy(pkt, NULL);
+ pkt = NULL;
return 0;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 11/12] filter-rewriter: rewrite tcp packet to keep secondary connection
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (9 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 10/12] filter-rewriter: track connection and parse packet Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 12/12] MAINTAINERS: add maintainer for COLO-proxy Zhang Chen
` (3 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
We will rewrite tcp packet secondary received and sent.
When colo guest is a tcp server.
Firstly, client start a tcp handshake. the packet's seq=client_seq,
ack=0,flag=SYN. COLO primary guest get this pkt and mirror(filter-mirror)
to secondary guest, secondary get it use filter-redirector.
Then,primary guest response pkt
(seq=primary_seq,ack=client_seq+1,flag=ACK|SYN).
secondary guest response pkt
(seq=secondary_seq,ack=client_seq+1,flag=ACK|SYN).
In here,we use filter-rewriter save the secondary_seq to it's tcp connection.
Finally handshake,client send pkt
(seq=client_seq+1,ack=primary_seq+1,flag=ACK).
Here,filter-rewriter can get primary_seq, and rewrite ack from primary_seq+1
to secondary_seq+1, recalculate checksum. So the secondary tcp connection
kept good.
When we send/recv packet.
client send pkt(seq=client_seq+1+data_len,ack=primary_seq+1,flag=ACK|PSH).
filter-rewriter rewrite ack and send to secondary guest.
primary guest response pkt
(seq=primary_seq+1,ack=client_seq+1+data_len,flag=ACK)
secondary guest response pkt
(seq=secondary_seq+1,ack=client_seq+1+data_len,flag=ACK)
we rewrite secondary guest seq from secondary_seq+1 to primary_seq+1.
So tcp connection kept good.
In code We use offset( = secondary_seq - primary_seq )
to rewrite seq or ack.
handle_primary_tcp_pkt: tcp_pkt->th_ack += offset;
handle_secondary_tcp_pkt: tcp_pkt->th_seq -= offset;
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
net/colo.c | 2 +
net/colo.h | 7 ++++
net/filter-rewriter.c | 112 +++++++++++++++++++++++++++++++++++++++++++++++++-
trace-events | 5 +++
4 files changed, 124 insertions(+), 2 deletions(-)
diff --git a/net/colo.c b/net/colo.c
index c74d78d..17921c2 100644
--- a/net/colo.c
+++ b/net/colo.c
@@ -135,6 +135,8 @@ Connection *connection_new(ConnectionKey *key)
conn->ip_proto = key->ip_proto;
conn->processing = false;
+ conn->offset = 0;
+ conn->syn_flag = 0;
g_queue_init(&conn->primary_list);
g_queue_init(&conn->secondary_list);
diff --git a/net/colo.h b/net/colo.h
index 68ace6e..158ff55 100644
--- a/net/colo.h
+++ b/net/colo.h
@@ -50,6 +50,13 @@ typedef struct Connection {
/* flag to enqueue unprocessed_connections */
bool processing;
uint8_t ip_proto;
+ /* offset = secondary_seq - primary_seq */
+ tcp_seq offset;
+ /*
+ * we use this flag update offset func
+ * run once in independent tcp connection
+ */
+ int syn_flag;
} Connection;
uint32_t connection_key_hash(const void *opaque);
diff --git a/net/filter-rewriter.c b/net/filter-rewriter.c
index 0cb3cef..c1cb7b2 100644
--- a/net/filter-rewriter.c
+++ b/net/filter-rewriter.c
@@ -21,6 +21,7 @@
#include "qemu/main-loop.h"
#include "qemu/iov.h"
#include "net/checksum.h"
+#include "trace.h"
#define FILTER_COLO_REWRITER(obj) \
OBJECT_CHECK(RewriterState, (obj), TYPE_FILTER_REWRITER)
@@ -63,6 +64,93 @@ static int is_tcp_packet(Packet *pkt)
}
}
+/* handle tcp packet from primary guest */
+static int handle_primary_tcp_pkt(NetFilterState *nf,
+ Connection *conn,
+ Packet *pkt)
+{
+ struct tcphdr *tcp_pkt;
+
+ tcp_pkt = (struct tcphdr *)pkt->transport_header;
+ if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
+ char *sdebug, *ddebug;
+ sdebug = strdup(inet_ntoa(pkt->ip->ip_src));
+ ddebug = strdup(inet_ntoa(pkt->ip->ip_dst));
+ trace_colo_filter_rewriter_pkt_info(__func__, sdebug, ddebug,
+ ntohl(tcp_pkt->th_seq), ntohl(tcp_pkt->th_ack),
+ tcp_pkt->th_flags);
+ trace_colo_filter_rewriter_conn_offset(conn->offset);
+ g_free(sdebug);
+ g_free(ddebug);
+ }
+
+ if (((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == TH_SYN)) {
+ /*
+ * we use this flag update offset func
+ * run once in independent tcp connection
+ */
+ conn->syn_flag = 1;
+ }
+
+ if (((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == TH_ACK)) {
+ if (conn->syn_flag) {
+ /*
+ * offset = secondary_seq - primary seq
+ * ack packet sent by guest from primary node,
+ * so we use th_ack - 1 get primary_seq
+ */
+ conn->offset -= (ntohl(tcp_pkt->th_ack) - 1);
+ conn->syn_flag = 0;
+ }
+ /* handle packets to the secondary from the primary */
+ tcp_pkt->th_ack = htonl(ntohl(tcp_pkt->th_ack) + conn->offset);
+
+ net_checksum_calculate((uint8_t *)pkt->data, pkt->size);
+ }
+
+ return 0;
+}
+
+/* handle tcp packet from secondary guest */
+static int handle_secondary_tcp_pkt(NetFilterState *nf,
+ Connection *conn,
+ Packet *pkt)
+{
+ struct tcphdr *tcp_pkt;
+
+ tcp_pkt = (struct tcphdr *)pkt->transport_header;
+
+ if (trace_event_get_state(TRACE_COLO_FILTER_REWRITER_DEBUG)) {
+ char *sdebug, *ddebug;
+ sdebug = strdup(inet_ntoa(pkt->ip->ip_src));
+ ddebug = strdup(inet_ntoa(pkt->ip->ip_dst));
+ trace_colo_filter_rewriter_pkt_info(__func__, sdebug, ddebug,
+ ntohl(tcp_pkt->th_seq), ntohl(tcp_pkt->th_ack),
+ tcp_pkt->th_flags);
+ trace_colo_filter_rewriter_conn_offset(conn->offset);
+ g_free(sdebug);
+ g_free(ddebug);
+ }
+
+ if (((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == (TH_ACK | TH_SYN))) {
+ /*
+ * save offset = secondary_seq and then
+ * in handle_primary_tcp_pkt make offset
+ * = secondary_seq - primary_seq
+ */
+ conn->offset = ntohl(tcp_pkt->th_seq);
+ }
+
+ if ((tcp_pkt->th_flags & (TH_ACK | TH_SYN)) == TH_ACK) {
+ /* handle packets to the primary from the secondary*/
+ tcp_pkt->th_seq = htonl(ntohl(tcp_pkt->th_seq) - conn->offset);
+
+ net_checksum_calculate((uint8_t *)pkt->data, pkt->size);
+ }
+
+ return 0;
+}
+
static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
NetClientState *sender,
unsigned flags,
@@ -102,10 +190,30 @@ static ssize_t colo_rewriter_receive_iov(NetFilterState *nf,
if (sender == nf->netdev) {
/* NET_FILTER_DIRECTION_TX */
- /* handle_primary_tcp_pkt */
+ if (!handle_primary_tcp_pkt(nf, conn, pkt)) {
+ qemu_net_queue_send(s->incoming_queue, sender, 0,
+ (const uint8_t *)pkt->data, pkt->size, NULL);
+ packet_destroy(pkt, NULL);
+ pkt = NULL;
+ /*
+ * We block the packet here,after rewrite pkt
+ * and will send it
+ */
+ return 1;
+ }
} else {
/* NET_FILTER_DIRECTION_RX */
- /* handle_secondary_tcp_pkt */
+ if (!handle_secondary_tcp_pkt(nf, conn, pkt)) {
+ qemu_net_queue_send(s->incoming_queue, sender, 0,
+ (const uint8_t *)pkt->data, pkt->size, NULL);
+ packet_destroy(pkt, NULL);
+ pkt = NULL;
+ /*
+ * We block the packet here,after rewrite pkt
+ * and will send it
+ */
+ return 1;
+ }
}
}
diff --git a/trace-events b/trace-events
index 4227b63..812c5c1 100644
--- a/trace-events
+++ b/trace-events
@@ -151,6 +151,11 @@ colo_compare_ip_info(int psize, const char *sta, const char *stb, int ssize, con
colo_old_packet_check_found(int64_t old_time) "%" PRId64
colo_compare_miscompare(void) ""
+# net/filter-rewriter.c
+colo_filter_rewriter_debug(void) ""
+colo_filter_rewriter_pkt_info(const char *func, const char *src, const char *dst, uint32_t seq, uint32_t ack, uint32_t flag) "%s: src/dst: %s/%s p: seq/ack=%u/%u flags=%x\n"
+colo_filter_rewriter_conn_offset(uint32_t offset) ": offset=%u\n"
+
### Guest events, keep at bottom
# @vaddr: Access' virtual address.
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* [Qemu-devel] [PATCH V13 12/12] MAINTAINERS: add maintainer for COLO-proxy
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (10 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 11/12] filter-rewriter: rewrite tcp packet to keep secondary connection Zhang Chen
@ 2016-09-05 9:37 ` Zhang Chen
2016-09-05 10:25 ` [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy no-reply
` (2 subsequent siblings)
14 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-05 9:37 UTC (permalink / raw)
To: qemu devel, Jason Wang
Cc: Zhang Chen, Li Zhijian, Wen Congyang, zhanghailiang,
eddie . dong, Dr . David Alan Gilbert
add Zhang Chen and Li zhijian as co-maintainers of COLO-proxy.
Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
---
MAINTAINERS | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index b6fb84e..4781f9f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -1330,6 +1330,15 @@ F: include/qemu/throttle.h
F: util/throttle.c
L: qemu-block@nongnu.org
+COLO Proxy
+M: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
+M: Li Zhijian <lizhijian@cn.fujitsu.com>
+S: Supported
+F: docs/colo-proxy.txt
+F: net/colo*
+F: net/filter-rewriter.c
+F: net/filter-mirror.c
+
Usermode Emulation
------------------
Overall
--
2.7.4
^ permalink raw reply related [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (11 preceding siblings ...)
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 12/12] MAINTAINERS: add maintainer for COLO-proxy Zhang Chen
@ 2016-09-05 10:25 ` no-reply
2016-09-05 10:35 ` no-reply
2016-09-06 8:02 ` Jason Wang
14 siblings, 0 replies; 19+ messages in thread
From: no-reply @ 2016-09-05 10:25 UTC (permalink / raw)
To: zhangchen.fnst
Cc: famz, qemu-devel, jasowang, lizhijian, eddie.dong, dgilbert,
zhang.zhanghailiang
Hi,
Your series seems to have some coding style problems. See output below for
more information:
Subject: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
Type: series
Message-id: 1473068248-11146-1-git-send-email-zhangchen.fnst@cn.fujitsu.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
BASE=base
n=1
total=$(git log --oneline $BASE.. | wc -l)
failed=0
# Useful git options
git config --local diff.renamelimit 0
git config --local diff.renames True
commits="$(git log --format=%H --reverse $BASE..)"
for c in $commits; do
echo "Checking PATCH $n/$total: $(git show --no-patch --format=%s $c)..."
if ! git show $c --format=email | ./scripts/checkpatch.pl --mailback -; then
failed=1
echo
fi
n=$((n+1))
done
exit $failed
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
From https://github.com/patchew-project/qemu
* [new tag] patchew/1473068248-11146-1-git-send-email-zhangchen.fnst@cn.fujitsu.com -> patchew/1473068248-11146-1-git-send-email-zhangchen.fnst@cn.fujitsu.com
Switched to a new branch 'test'
e6702f3 MAINTAINERS: add maintainer for COLO-proxy
f18685f filter-rewriter: rewrite tcp packet to keep secondary connection
890ddae filter-rewriter: track connection and parse packet
4c1b3da filter-rewriter: introduce filter-rewriter initialization
783910b colo-compare: add TCP, UDP, ICMP packet comparison
f40c0ce colo-compare: introduce packet comparison thread
e7f20bb colo-compare: track connection and enqueue packet
74df843 Jhash: add linux kernel jhashtable in qemu
ca61df9 net/colo.c: add colo.c to define and handle packet
259c094 colo-compare: introduce colo compare initialization
c499262 qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
9788260 docs: Add documentation for COLO-proxy
=== OUTPUT BEGIN ===
Checking PATCH 1/12: docs: Add documentation for COLO-proxy...
Checking PATCH 2/12: qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext...
Checking PATCH 3/12: colo-compare: introduce colo compare initialization...
ERROR: suspect code indent for conditional statements (4, 4)
#216: FILE: net/colo-compare.c:120:
+ } else if (strcmp(name, "host") == 0) {
+ } else if (strcmp(name, "port") == 0) {
ERROR: suspect code indent for conditional statements (4, 4)
#217: FILE: net/colo-compare.c:121:
+ } else if (strcmp(name, "port") == 0) {
+ } else if (strcmp(name, "server") == 0) {
ERROR: suspect code indent for conditional statements (4, 4)
#218: FILE: net/colo-compare.c:122:
+ } else if (strcmp(name, "server") == 0) {
+ } else if (strcmp(name, "wait") == 0) {
ERROR: suspect code indent for conditional statements (4, 4)
#219: FILE: net/colo-compare.c:123:
+ } else if (strcmp(name, "wait") == 0) {
+ } else if (strcmp(name, "path") == 0) {
ERROR: suspect code indent for conditional statements (4, 4)
#220: FILE: net/colo-compare.c:124:
+ } else if (strcmp(name, "path") == 0) {
+ }else {
ERROR: space required after that close brace '}'
#221: FILE: net/colo-compare.c:125:
+ }else {
ERROR: space required after that ',' (ctx:VxV)
#280: FILE: net/colo-compare.c:184:
+ if(find_and_check_chardev(&s->chr_pri_in, s->pri_indev,errp)) {
^
ERROR: space required before the open parenthesis '('
#280: FILE: net/colo-compare.c:184:
+ if(find_and_check_chardev(&s->chr_pri_in, s->pri_indev,errp)) {
ERROR: space required after that ',' (ctx:VxV)
#284: FILE: net/colo-compare.c:188:
+ if(find_and_check_chardev(&s->chr_sec_in, s->sec_indev,errp)) {
^
ERROR: space required before the open parenthesis '('
#284: FILE: net/colo-compare.c:188:
+ if(find_and_check_chardev(&s->chr_sec_in, s->sec_indev,errp)) {
ERROR: space required after that ',' (ctx:VxV)
#288: FILE: net/colo-compare.c:192:
+ if(find_and_check_chardev(&s->chr_out, s->outdev,errp)) {
^
ERROR: space required before the open parenthesis '('
#288: FILE: net/colo-compare.c:192:
+ if(find_and_check_chardev(&s->chr_out, s->outdev,errp)) {
total: 12 errors, 0 warnings, 326 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 4/12: net/colo.c: add colo.c to define and handle packet...
Checking PATCH 5/12: Jhash: add linux kernel jhashtable in qemu...
Checking PATCH 6/12: colo-compare: track connection and enqueue packet...
WARNING: line over 80 characters
#248: FILE: net/colo.c:180:
+ trace_colo_proxy_main("colo proxy connection hashtable full, clear it");
total: 0 errors, 1 warnings, 241 lines checked
Your patch has style problems, please review. If any of these errors
are false positives report them to the maintainer, see
CHECKPATCH in MAINTAINERS.
Checking PATCH 7/12: colo-compare: introduce packet comparison thread...
Checking PATCH 8/12: colo-compare: add TCP, UDP, ICMP packet comparison...
Checking PATCH 9/12: filter-rewriter: introduce filter-rewriter initialization...
Checking PATCH 10/12: filter-rewriter: track connection and parse packet...
Checking PATCH 11/12: filter-rewriter: rewrite tcp packet to keep secondary connection...
Checking PATCH 12/12: MAINTAINERS: add maintainer for COLO-proxy...
=== OUTPUT END ===
Test command exited with code: 1
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (12 preceding siblings ...)
2016-09-05 10:25 ` [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy no-reply
@ 2016-09-05 10:35 ` no-reply
2016-09-06 8:02 ` Jason Wang
14 siblings, 0 replies; 19+ messages in thread
From: no-reply @ 2016-09-05 10:35 UTC (permalink / raw)
To: zhangchen.fnst
Cc: famz, qemu-devel, jasowang, lizhijian, eddie.dong, dgilbert,
zhang.zhanghailiang
Hi,
Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.
Subject: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
Type: series
Message-id: 1473068248-11146-1-git-send-email-zhangchen.fnst@cn.fujitsu.com
=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
make J=8 docker-test-quick@centos6
make J=8 docker-test-mingw@fedora
=== TEST SCRIPT END ===
Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
e6702f3 MAINTAINERS: add maintainer for COLO-proxy
f18685f filter-rewriter: rewrite tcp packet to keep secondary connection
890ddae filter-rewriter: track connection and parse packet
4c1b3da filter-rewriter: introduce filter-rewriter initialization
783910b colo-compare: add TCP, UDP, ICMP packet comparison
f40c0ce colo-compare: introduce packet comparison thread
e7f20bb colo-compare: track connection and enqueue packet
74df843 Jhash: add linux kernel jhashtable in qemu
ca61df9 net/colo.c: add colo.c to define and handle packet
259c094 colo-compare: introduce colo compare initialization
c499262 qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
9788260 docs: Add documentation for COLO-proxy
=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
Cloning into 'dtc'...
Submodule path 'dtc': checked out '65cc4d2748a2c2e6f27f1cf39e07a5dbabd80ebf'
BUILD centos6
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
COPY RUNNER
RUN test-quick in centos6
No C++ compiler available; disabling C++ specific optional code
Install prefix /tmp/qemu-test/src/tests/docker/install
BIOS directory /tmp/qemu-test/src/tests/docker/install/share/qemu
binary directory /tmp/qemu-test/src/tests/docker/install/bin
library directory /tmp/qemu-test/src/tests/docker/install/lib
module directory /tmp/qemu-test/src/tests/docker/install/lib/qemu
libexec directory /tmp/qemu-test/src/tests/docker/install/libexec
include directory /tmp/qemu-test/src/tests/docker/install/include
config directory /tmp/qemu-test/src/tests/docker/install/etc
local state directory /tmp/qemu-test/src/tests/docker/install/var
Manual directory /tmp/qemu-test/src/tests/docker/install/share/man
ELF interp prefix /usr/gnemul/qemu-%M
Source path /tmp/qemu-test/src
C compiler cc
Host C compiler cc
C++ compiler
Objective-C compiler cc
ARFLAGS rv
CFLAGS -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -pthread -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -g
QEMU_CFLAGS -I/usr/include/pixman-1 -fPIE -DPIE -m64 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-all
LDFLAGS -Wl,--warn-common -Wl,-z,relro -Wl,-z,now -pie -m64 -g
make make
install install
python python -B
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list x86_64-softmmu aarch64-softmmu
tcg debug enabled no
gprof enabled no
sparse enabled no
strip binaries yes
profiler no
static build no
pixman system
SDL support yes (1.2.14)
GTK support no
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support no
GNUTLS rnd no
libgcrypt no
libgcrypt kdf no
nettle no
nettle kdf no
libtasn1 no
curses support no
virgl support no
curl support no
mingw32 support no
Audio drivers oss
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
VNC support yes
VNC SASL support no
VNC JPEG support no
VNC PNG support no
xen support no
brlapi support no
bluez support no
Documentation no
PIE yes
vde support no
netmap support no
Linux AIO support no
ATTR/XATTR support yes
Install blobs yes
KVM support yes
RDMA support no
TCG interpreter no
fdt support yes
preadv support yes
fdatasync yes
madvise yes
posix_madvise yes
uuid support no
libcap-ng support no
vhost-net support yes
vhost-scsi support yes
Trace backends log
spice support no
rbd support no
xfsctl support no
smartcard support no
libusb no
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info no
QGA MSI support no
seccomp support no
coroutine backend ucontext
coroutine pool yes
GlusterFS support no
Archipelago support no
gcov gcov
gcov enabled no
TPM support yes
libssh2 support no
TPM passthrough yes
QOM debugging yes
vhdx no
lzo support no
snappy support no
bzip2 support no
NUMA host support no
tcmalloc support no
jemalloc support no
avx2 optimization no
GEN x86_64-softmmu/config-devices.mak.tmp
GEN aarch64-softmmu/config-devices.mak.tmp
GEN config-host.h
GEN qemu-options.def
GEN qapi-types.h
GEN qmp-commands.h
GEN qapi-visit.h
GEN qapi-event.h
GEN x86_64-softmmu/config-devices.mak
GEN aarch64-softmmu/config-devices.mak
GEN qmp-introspect.h
GEN tests/test-qapi-types.h
GEN tests/test-qapi-visit.h
GEN tests/test-qmp-commands.h
GEN tests/test-qapi-event.h
GEN tests/test-qmp-introspect.h
GEN config-all-devices.mak
GEN trace/generated-events.h
GEN trace/generated-tracers.h
GEN trace/generated-tcg-tracers.h
GEN trace/generated-helpers-wrappers.h
GEN trace/generated-helpers.h
CC tests/qemu-iotests/socket_scm_helper.o
GEN qga/qapi-generated/qga-qapi-types.h
GEN qga/qapi-generated/qga-qapi-visit.h
GEN qga/qapi-generated/qga-qmp-commands.h
GEN qga/qapi-generated/qga-qapi-types.c
GEN qga/qapi-generated/qga-qapi-visit.c
GEN qga/qapi-generated/qga-qmp-marshal.c
GEN qmp-introspect.c
GEN qapi-types.c
GEN qapi-visit.c
GEN qapi-event.c
CC qapi/qapi-visit-core.o
CC qapi/qapi-dealloc-visitor.o
CC qapi/qmp-input-visitor.o
CC qapi/qmp-output-visitor.o
CC qapi/qmp-registry.o
CC qapi/qmp-dispatch.o
CC qapi/string-input-visitor.o
CC qapi/string-output-visitor.o
CC qapi/opts-visitor.o
CC qapi/qapi-clone-visitor.o
CC qapi/qmp-event.o
CC qapi/qapi-util.o
CC qobject/qnull.o
CC qobject/qint.o
CC qobject/qstring.o
CC qobject/qdict.o
CC qobject/qlist.o
CC qobject/qfloat.o
CC qobject/qbool.o
CC qobject/qjson.o
CC qobject/qobject.o
CC qobject/json-lexer.o
CC qobject/json-streamer.o
CC qobject/json-parser.o
GEN trace/generated-events.c
CC trace/control.o
CC trace/qmp.o
CC util/osdep.o
CC util/cutils.o
CC util/unicode.o
CC util/qemu-timer-common.o
CC util/compatfd.o
CC util/event_notifier-posix.o
CC util/mmap-alloc.o
CC util/oslib-posix.o
CC util/qemu-openpty.o
CC util/qemu-thread-posix.o
CC util/memfd.o
CC util/envlist.o
CC util/path.o
CC util/module.o
CC util/bitmap.o
CC util/bitops.o
CC util/hbitmap.o
CC util/fifo8.o
CC util/acl.o
CC util/error.o
CC util/qemu-error.o
CC util/id.o
CC util/iov.o
CC util/qemu-config.o
CC util/qemu-sockets.o
CC util/uri.o
CC util/notify.o
CC util/qemu-option.o
CC util/qemu-progress.o
CC util/hexdump.o
CC util/crc32c.o
CC util/throttle.o
CC util/getauxval.o
CC util/readline.o
CC util/rfifolock.o
CC util/rcu.o
CC util/qemu-coroutine.o
CC util/qemu-coroutine-lock.o
CC util/qemu-coroutine-io.o
CC util/qemu-coroutine-sleep.o
CC util/coroutine-ucontext.o
CC util/buffer.o
CC util/timed-average.o
CC util/base64.o
CC util/log.o
CC util/qdist.o
CC util/qht.o
CC util/range.o
/tmp/qemu-test/src/util/qht.c: In function ‘qht_reset_size’:
/tmp/qemu-test/src/util/qht.c:413: warning: ‘new’ may be used uninitialized in this function
CC crypto/pbkdf-stub.o
CC stubs/arch-query-cpu-def.o
CC stubs/bdrv-next-monitor-owned.o
CC stubs/blk-commit-all.o
CC stubs/blockdev-close-all-bdrv-states.o
CC stubs/clock-warp.o
CC stubs/cpu-get-clock.o
CC stubs/cpu-get-icount.o
CC stubs/dump.o
CC stubs/fdset-add-fd.o
CC stubs/fdset-find-fd.o
CC stubs/fdset-get-fd.o
CC stubs/fdset-remove-fd.o
CC stubs/gdbstub.o
CC stubs/get-fd.o
CC stubs/get-next-serial.o
CC stubs/get-vm-name.o
CC stubs/iothread-lock.o
CC stubs/is-daemonized.o
CC stubs/machine-init-done.o
CC stubs/migr-blocker.o
CC stubs/mon-is-qmp.o
CC stubs/mon-printf.o
CC stubs/monitor-init.o
CC stubs/notify-event.o
CC stubs/qtest.o
CC stubs/replay.o
CC stubs/replay-user.o
CC stubs/reset.o
CC stubs/runstate-check.o
CC stubs/set-fd-handler.o
CC stubs/slirp.o
CC stubs/sysbus.o
CC stubs/trace-control.o
CC stubs/uuid.o
CC stubs/vm-stop.o
CC stubs/vmstate.o
CC stubs/cpus.o
CC stubs/kvm.o
CC stubs/qmp_pc_dimm_device_list.o
CC stubs/target-monitor-defs.o
CC stubs/target-get-monitor-def.o
CC stubs/vhost.o
CC stubs/iohandler.o
CC stubs/smbios_type_38.o
CC stubs/ipmi.o
CC stubs/pc_madt_cpu_entry.o
CC contrib/ivshmem-client/ivshmem-client.o
CC contrib/ivshmem-client/main.o
CC contrib/ivshmem-server/ivshmem-server.o
CC contrib/ivshmem-server/main.o
CC qemu-nbd.o
CC async.o
CC thread-pool.o
CC block.o
CC blockjob.o
CC main-loop.o
CC iohandler.o
CC qemu-timer.o
CC aio-posix.o
CC qemu-io-cmds.o
CC block/raw_bsd.o
CC block/qcow.o
CC block/vdi.o
CC block/vmdk.o
CC block/cloop.o
CC block/bochs.o
CC block/vpc.o
CC block/vvfat.o
CC block/qcow2.o
CC block/qcow2-refcount.o
CC block/qcow2-cluster.o
CC block/qcow2-snapshot.o
CC block/qcow2-cache.o
CC block/qed.o
CC block/qed-gencb.o
CC block/qed-l2-cache.o
CC block/qed-table.o
CC block/qed-cluster.o
CC block/qed-check.o
CC block/quorum.o
CC block/parallels.o
CC block/blkdebug.o
CC block/blkverify.o
CC block/blkreplay.o
CC block/block-backend.o
CC block/snapshot.o
CC block/qapi.o
CC block/raw-posix.o
CC block/null.o
CC block/mirror.o
CC block/commit.o
CC block/io.o
CC block/throttle-groups.o
CC block/nbd.o
CC block/nbd-client.o
CC block/sheepdog.o
CC block/accounting.o
CC block/dirty-bitmap.o
CC block/write-threshold.o
CC block/crypto.o
CC nbd/server.o
CC nbd/client.o
CC nbd/common.o
CC block/dmg.o
CC crypto/init.o
CC crypto/hash.o
CC crypto/hash-glib.o
CC crypto/aes.o
CC crypto/desrfb.o
CC crypto/cipher.o
CC crypto/tlscreds.o
CC crypto/tlscredsanon.o
CC crypto/tlscredsx509.o
CC crypto/tlssession.o
CC crypto/secret.o
CC crypto/random-platform.o
CC crypto/pbkdf.o
CC crypto/ivgen.o
CC crypto/ivgen-essiv.o
CC crypto/ivgen-plain.o
CC crypto/ivgen-plain64.o
CC crypto/afsplit.o
CC crypto/xts.o
CC crypto/block.o
CC crypto/block-qcow.o
CC crypto/block-luks.o
CC io/channel.o
CC io/channel-buffer.o
CC io/channel-command.o
CC io/channel-file.o
CC io/channel-socket.o
CC io/channel-tls.o
CC io/channel-watch.o
CC io/channel-websock.o
CC io/channel-util.o
CC io/task.o
CC qom/object.o
CC qom/container.o
CC qom/qom-qobject.o
CC qom/object_interfaces.o
GEN qemu-img-cmds.h
CC qemu-io.o
CC qemu-bridge-helper.o
CC blockdev.o
CC blockdev-nbd.o
CC iothread.o
CC qdev-monitor.o
CC device-hotplug.o
CC os-posix.o
CC qemu-char.o
CC page_cache.o
CC accel.o
CC bt-host.o
CC bt-vhci.o
CC dma-helpers.o
CC vl.o
CC tpm.o
CC device_tree.o
GEN qmp-marshal.c
CC qmp.o
CC hmp.o
CC tcg-runtime.o
CC audio/audio.o
CC audio/noaudio.o
CC audio/wavaudio.o
CC audio/mixeng.o
CC audio/sdlaudio.o
CC audio/ossaudio.o
CC audio/wavcapture.o
CC backends/rng.o
CC backends/rng-egd.o
CC backends/rng-random.o
CC backends/msmouse.o
CC backends/testdev.o
CC backends/tpm.o
CC backends/hostmem.o
CC backends/hostmem-ram.o
CC backends/hostmem-file.o
CC block/stream.o
CC block/backup.o
CC disas/arm.o
CC disas/i386.o
CC fsdev/qemu-fsdev-dummy.o
CC fsdev/qemu-fsdev-opts.o
CC hw/acpi/core.o
CC hw/acpi/piix4.o
CC hw/acpi/pcihp.o
CC hw/acpi/ich9.o
CC hw/acpi/tco.o
CC hw/acpi/cpu_hotplug.o
CC hw/acpi/memory_hotplug.o
CC hw/acpi/memory_hotplug_acpi_table.o
CC hw/acpi/cpu.o
CC hw/acpi/acpi_interface.o
CC hw/acpi/bios-linker-loader.o
CC hw/acpi/aml-build.o
CC hw/acpi/ipmi.o
CC hw/audio/sb16.o
CC hw/audio/es1370.o
CC hw/audio/ac97.o
CC hw/audio/fmopl.o
CC hw/audio/adlib.o
CC hw/audio/gus.o
CC hw/audio/gusemu_hal.o
CC hw/audio/gusemu_mixer.o
CC hw/audio/cs4231a.o
CC hw/audio/intel-hda.o
CC hw/audio/hda-codec.o
CC hw/audio/pcspk.o
CC hw/audio/wm8750.o
CC hw/audio/pl041.o
CC hw/audio/lm4549.o
CC hw/audio/marvell_88w8618.o
CC hw/block/block.o
CC hw/block/cdrom.o
CC hw/block/hd-geometry.o
CC hw/block/fdc.o
CC hw/block/m25p80.o
CC hw/block/nand.o
CC hw/block/pflash_cfi01.o
CC hw/block/pflash_cfi02.o
CC hw/block/ecc.o
CC hw/block/onenand.o
CC hw/block/nvme.o
CC hw/bt/core.o
CC hw/bt/l2cap.o
CC hw/bt/sdp.o
CC hw/bt/hci.o
CC hw/bt/hid.o
CC hw/bt/hci-csr.o
CC hw/char/ipoctal232.o
CC hw/char/parallel.o
CC hw/char/pl011.o
CC hw/char/serial.o
CC hw/char/serial-isa.o
CC hw/char/serial-pci.o
CC hw/char/virtio-console.o
CC hw/char/cadence_uart.o
CC hw/char/debugcon.o
CC hw/char/imx_serial.o
CC hw/core/qdev.o
CC hw/core/qdev-properties.o
CC hw/core/bus.o
CC hw/core/fw-path-provider.o
CC hw/core/irq.o
CC hw/core/hotplug.o
CC hw/core/ptimer.o
CC hw/core/machine.o
CC hw/core/sysbus.o
CC hw/core/null-machine.o
CC hw/core/loader.o
CC hw/core/qdev-properties-system.o
CC hw/core/register.o
CC hw/core/platform-bus.o
CC hw/display/ads7846.o
CC hw/display/cirrus_vga.o
CC hw/display/pl110.o
CC hw/display/ssd0303.o
CC hw/display/ssd0323.o
CC hw/display/vga-pci.o
CC hw/display/vga-isa.o
CC hw/display/vmware_vga.o
CC hw/display/blizzard.o
CC hw/display/exynos4210_fimd.o
CC hw/display/framebuffer.o
CC hw/display/tc6393xb.o
CC hw/dma/pl080.o
CC hw/dma/pl330.o
CC hw/dma/i8257.o
CC hw/dma/xlnx-zynq-devcfg.o
CC hw/gpio/max7310.o
CC hw/gpio/pl061.o
CC hw/gpio/zaurus.o
CC hw/gpio/gpio_key.o
CC hw/i2c/core.o
CC hw/i2c/smbus.o
CC hw/i2c/smbus_eeprom.o
CC hw/i2c/i2c-ddc.o
CC hw/i2c/versatile_i2c.o
CC hw/i2c/smbus_ich9.o
CC hw/i2c/pm_smbus.o
CC hw/i2c/bitbang_i2c.o
CC hw/i2c/exynos4210_i2c.o
CC hw/i2c/imx_i2c.o
CC hw/i2c/aspeed_i2c.o
CC hw/ide/core.o
CC hw/ide/atapi.o
CC hw/ide/qdev.o
CC hw/ide/pci.o
CC hw/ide/isa.o
CC hw/ide/piix.o
CC hw/ide/microdrive.o
CC hw/ide/ahci.o
CC hw/ide/ich.o
CC hw/input/hid.o
CC hw/input/lm832x.o
CC hw/input/pckbd.o
CC hw/input/pl050.o
CC hw/input/ps2.o
CC hw/input/stellaris_input.o
CC hw/input/tsc2005.o
CC hw/input/vmmouse.o
CC hw/input/virtio-input.o
CC hw/input/virtio-input-hid.o
CC hw/input/virtio-input-host.o
CC hw/intc/i8259_common.o
CC hw/intc/i8259.o
CC hw/intc/pl190.o
CC hw/intc/imx_avic.o
CC hw/intc/realview_gic.o
CC hw/intc/ioapic_common.o
CC hw/intc/arm_gic_common.o
CC hw/intc/arm_gic.o
CC hw/intc/arm_gicv2m.o
CC hw/intc/arm_gicv3_common.o
CC hw/intc/arm_gicv3.o
CC hw/intc/arm_gicv3_dist.o
CC hw/intc/arm_gicv3_redist.o
CC hw/ipack/ipack.o
CC hw/ipack/tpci200.o
CC hw/ipmi/ipmi.o
CC hw/ipmi/ipmi_bmc_sim.o
CC hw/ipmi/ipmi_bmc_extern.o
CC hw/ipmi/isa_ipmi_kcs.o
CC hw/ipmi/isa_ipmi_bt.o
CC hw/isa/isa-bus.o
CC hw/isa/apm.o
CC hw/mem/pc-dimm.o
CC hw/mem/nvdimm.o
CC hw/misc/applesmc.o
CC hw/misc/max111x.o
CC hw/misc/tmp105.o
CC hw/misc/sga.o
CC hw/misc/debugexit.o
CC hw/misc/pc-testdev.o
CC hw/misc/pci-testdev.o
CC hw/misc/arm_l2x0.o
CC hw/misc/arm_integrator_debug.o
CC hw/misc/a9scu.o
CC hw/misc/arm11scu.o
CC hw/net/ne2000.o
CC hw/net/eepro100.o
CC hw/net/pcnet-pci.o
CC hw/net/pcnet.o
CC hw/net/e1000.o
CC hw/net/e1000x_common.o
CC hw/net/net_tx_pkt.o
CC hw/net/net_rx_pkt.o
CC hw/net/e1000e.o
CC hw/net/e1000e_core.o
CC hw/net/rtl8139.o
CC hw/net/vmxnet3.o
CC hw/net/smc91c111.o
CC hw/net/lan9118.o
CC hw/net/ne2000-isa.o
CC hw/net/xgmac.o
CC hw/net/allwinner_emac.o
CC hw/net/imx_fec.o
CC hw/net/cadence_gem.o
CC hw/net/stellaris_enet.o
CC hw/net/rocker/rocker.o
CC hw/net/rocker/rocker_fp.o
CC hw/net/rocker/rocker_desc.o
CC hw/net/rocker/rocker_world.o
CC hw/net/rocker/rocker_of_dpa.o
CC hw/nvram/eeprom93xx.o
CC hw/nvram/fw_cfg.o
CC hw/pci-bridge/pci_bridge_dev.o
CC hw/pci-bridge/pci_expander_bridge.o
CC hw/pci-bridge/xio3130_upstream.o
CC hw/pci-bridge/xio3130_downstream.o
CC hw/pci-bridge/ioh3420.o
CC hw/pci-bridge/i82801b11.o
CC hw/pci-host/pam.o
CC hw/pci-host/versatile.o
CC hw/pci-host/piix.o
CC hw/pci-host/q35.o
CC hw/pci-host/gpex.o
CC hw/pci/pci.o
CC hw/pci/pci_bridge.o
CC hw/pci/msix.o
CC hw/pci/shpc.o
CC hw/pci/msi.o
CC hw/pci/slotid_cap.o
CC hw/pci/pci_host.o
CC hw/pci/pcie_host.o
CC hw/pci/pcie.o
CC hw/pci/pcie_aer.o
CC hw/pci/pcie_port.o
CC hw/pci/pci-stub.o
CC hw/pcmcia/pcmcia.o
CC hw/scsi/scsi-disk.o
CC hw/scsi/scsi-generic.o
CC hw/scsi/scsi-bus.o
CC hw/scsi/lsi53c895a.o
CC hw/scsi/mptsas.o
CC hw/scsi/mptconfig.o
/tmp/qemu-test/src/hw/nvram/fw_cfg.c: In function ‘fw_cfg_dma_transfer’:
/tmp/qemu-test/src/hw/nvram/fw_cfg.c:330: warning: ‘read’ may be used uninitialized in this function
CC hw/scsi/mptendian.o
CC hw/scsi/megasas.o
CC hw/scsi/vmw_pvscsi.o
CC hw/scsi/esp.o
CC hw/scsi/esp-pci.o
CC hw/sd/pl181.o
CC hw/sd/ssi-sd.o
CC hw/sd/sd.o
CC hw/sd/core.o
CC hw/sd/sdhci.o
CC hw/smbios/smbios.o
CC hw/smbios/smbios_type_38.o
CC hw/ssi/pl022.o
CC hw/ssi/ssi.o
CC hw/ssi/xilinx_spips.o
CC hw/ssi/aspeed_smc.o
CC hw/timer/arm_timer.o
CC hw/timer/arm_mptimer.o
CC hw/timer/a9gtimer.o
CC hw/timer/cadence_ttc.o
CC hw/timer/ds1338.o
CC hw/timer/hpet.o
CC hw/timer/i8254_common.o
CC hw/timer/i8254.o
CC hw/timer/pl031.o
CC hw/timer/twl92230.o
CC hw/timer/imx_epit.o
CC hw/timer/imx_gpt.o
CC hw/timer/stm32f2xx_timer.o
CC hw/timer/aspeed_timer.o
CC hw/tpm/tpm_tis.o
CC hw/tpm/tpm_passthrough.o
CC hw/tpm/tpm_util.o
CC hw/usb/core.o
CC hw/usb/combined-packet.o
CC hw/usb/bus.o
CC hw/usb/libhw.o
CC hw/usb/desc.o
CC hw/usb/desc-msos.o
CC hw/usb/hcd-uhci.o
CC hw/usb/hcd-ohci.o
CC hw/usb/hcd-ehci.o
CC hw/usb/hcd-ehci-pci.o
CC hw/usb/hcd-ehci-sysbus.o
CC hw/usb/hcd-xhci.o
CC hw/usb/hcd-musb.o
CC hw/usb/dev-hub.o
CC hw/usb/dev-hid.o
CC hw/usb/dev-wacom.o
CC hw/usb/dev-storage.o
CC hw/usb/dev-uas.o
CC hw/usb/dev-audio.o
CC hw/usb/dev-serial.o
CC hw/usb/dev-network.o
CC hw/usb/dev-bluetooth.o
CC hw/usb/dev-smartcard-reader.o
CC hw/usb/dev-mtp.o
CC hw/usb/host-stub.o
CC hw/virtio/virtio-rng.o
CC hw/virtio/virtio-pci.o
CC hw/virtio/virtio-bus.o
CC hw/virtio/virtio-mmio.o
CC hw/watchdog/watchdog.o
CC hw/watchdog/wdt_i6300esb.o
CC hw/watchdog/wdt_ib700.o
CC migration/migration.o
CC migration/socket.o
CC migration/fd.o
CC migration/exec.o
CC migration/tls.o
CC migration/vmstate.o
CC migration/qemu-file.o
CC migration/qemu-file-channel.o
CC migration/xbzrle.o
CC migration/postcopy-ram.o
CC migration/qjson.o
CC migration/block.o
CC net/net.o
CC net/queue.o
CC net/checksum.o
CC net/util.o
CC net/hub.o
CC net/socket.o
CC net/dump.o
CC net/eth.o
CC net/l2tpv3.o
CC net/tap.o
CC net/vhost-user.o
CC net/tap-linux.o
CC net/slirp.o
CC net/filter.o
CC net/filter-buffer.o
CC net/colo-compare.o
CC net/filter-mirror.o
CC net/colo.o
CC net/filter-rewriter.o
CC qom/cpu.o
CC replay/replay.o
CC replay/replay-internal.o
/tmp/qemu-test/src/replay/replay-internal.c: In function ‘replay_put_array’:
/tmp/qemu-test/src/replay/replay-internal.c:68: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC replay/replay-events.o
CC replay/replay-time.o
CC replay/replay-input.o
CC replay/replay-char.o
CC slirp/cksum.o
CC slirp/if.o
CC slirp/ip_icmp.o
CC slirp/ip6_icmp.o
CC slirp/ip6_input.o
CC slirp/ip6_output.o
CC slirp/ip_input.o
CC slirp/ip_output.o
CC slirp/dnssearch.o
CC slirp/dhcpv6.o
CC slirp/slirp.o
CC slirp/mbuf.o
CC slirp/misc.o
CC slirp/socket.o
CC slirp/sbuf.o
CC slirp/tcp_input.o
CC slirp/tcp_output.o
CC slirp/tcp_subr.o
CC slirp/tcp_timer.o
CC slirp/udp.o
/tmp/qemu-test/src/slirp/tcp_input.c: In function ‘tcp_input’:
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_p’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_len’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_tos’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_id’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_off’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_ttl’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_sum’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_src.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:219: warning: ‘save_ip.ip_dst.s_addr’ may be used uninitialized in this function
/tmp/qemu-test/src/slirp/tcp_input.c:220: warning: ‘save_ip6.ip_nh’ may be used uninitialized in this function
CC slirp/udp6.o
CC slirp/bootp.o
CC slirp/tftp.o
CC slirp/arp_table.o
CC slirp/ndp_table.o
CC ui/keymaps.o
CC ui/console.o
CC ui/cursor.o
CC ui/qemu-pixman.o
CC ui/input.o
CC ui/input-keymap.o
CC ui/input-legacy.o
CC ui/input-linux.o
CC ui/sdl.o
CC ui/sdl_zoom.o
CC ui/x_keymap.o
CC ui/vnc.o
CC ui/vnc-enc-zlib.o
CC ui/vnc-enc-hextile.o
CC ui/vnc-enc-tight.o
CC ui/vnc-palette.o
CC ui/vnc-enc-zrle.o
CC ui/vnc-auth-vencrypt.o
CC ui/vnc-ws.o
CC ui/vnc-jobs.o
LINK tests/qemu-iotests/socket_scm_helper
CC qga/commands.o
CC qga/guest-agent-command-state.o
CC qga/main.o
CC qga/commands-posix.o
CC qga/channel-posix.o
CC qga/qapi-generated/qga-qapi-types.o
CC qga/qapi-generated/qga-qapi-visit.o
AS optionrom/multiboot.o
AS optionrom/linuxboot.o
CC optionrom/linuxboot_dma.o
cc: unrecognized option '-no-integrated-as'
cc: unrecognized option '-no-integrated-as'
AS optionrom/kvmvapic.o
CC qga/qapi-generated/qga-qmp-marshal.o
CC qmp-introspect.o
Building optionrom/multiboot.img
Building optionrom/linuxboot.img
Building optionrom/linuxboot_dma.img
CC qapi-types.o
Building optionrom/multiboot.raw
Building optionrom/linuxboot.raw
Building optionrom/linuxboot_dma.raw
CC qapi-visit.o
Building optionrom/kvmvapic.img
CC qapi-event.o
Signing optionrom/multiboot.bin
Signing optionrom/linuxboot.bin
Signing optionrom/linuxboot_dma.bin
AR libqemustub.a
CC qemu-img.o
Building optionrom/kvmvapic.raw
CC qmp-marshal.o
Signing optionrom/kvmvapic.bin
CC trace/generated-events.o
AR libqemuutil.a
LINK qemu-ga
LINK ivshmem-client
LINK ivshmem-server
LINK qemu-nbd
LINK qemu-io
LINK qemu-bridge-helper
LINK qemu-img
GEN x86_64-softmmu/hmp-commands.h
GEN x86_64-softmmu/hmp-commands-info.h
GEN x86_64-softmmu/qmp-commands-old.h
GEN x86_64-softmmu/config-target.h
GEN aarch64-softmmu/qmp-commands-old.h
GEN aarch64-softmmu/hmp-commands.h
GEN aarch64-softmmu/hmp-commands-info.h
GEN aarch64-softmmu/config-target.h
CC x86_64-softmmu/exec.o
CC x86_64-softmmu/translate-all.o
CC x86_64-softmmu/cpu-exec.o
CC x86_64-softmmu/translate-common.o
CC x86_64-softmmu/cpu-exec-common.o
CC x86_64-softmmu/tcg/tcg.o
CC x86_64-softmmu/tcg/tcg-op.o
CC aarch64-softmmu/exec.o
CC x86_64-softmmu/tcg/optimize.o
CC x86_64-softmmu/tcg/tcg-common.o
CC x86_64-softmmu/fpu/softfloat.o
CC x86_64-softmmu/disas.o
CC x86_64-softmmu/arch_init.o
CC x86_64-softmmu/cpus.o
CC x86_64-softmmu/monitor.o
CC aarch64-softmmu/translate-all.o
CC x86_64-softmmu/gdbstub.o
CC x86_64-softmmu/balloon.o
CC x86_64-softmmu/ioport.o
CC x86_64-softmmu/numa.o
CC x86_64-softmmu/qtest.o
CC aarch64-softmmu/cpu-exec.o
CC aarch64-softmmu/translate-common.o
CC x86_64-softmmu/bootdevice.o
CC aarch64-softmmu/cpu-exec-common.o
CC x86_64-softmmu/kvm-all.o
CC x86_64-softmmu/memory.o
CC x86_64-softmmu/cputlb.o
CC aarch64-softmmu/tcg/tcg.o
CC aarch64-softmmu/tcg/tcg-op.o
CC aarch64-softmmu/tcg/optimize.o
CC aarch64-softmmu/tcg/tcg-common.o
CC x86_64-softmmu/memory_mapping.o
CC aarch64-softmmu/fpu/softfloat.o
CC x86_64-softmmu/dump.o
CC aarch64-softmmu/disas.o
GEN aarch64-softmmu/gdbstub-xml.c
CC aarch64-softmmu/kvm-stub.o
CC x86_64-softmmu/migration/ram.o
CC x86_64-softmmu/migration/savevm.o
CC x86_64-softmmu/xen-common-stub.o
CC x86_64-softmmu/xen-hvm-stub.o
CC aarch64-softmmu/arch_init.o
CC x86_64-softmmu/hw/acpi/nvdimm.o
CC x86_64-softmmu/hw/block/virtio-blk.o
CC aarch64-softmmu/cpus.o
CC x86_64-softmmu/hw/block/dataplane/virtio-blk.o
CC aarch64-softmmu/monitor.o
CC aarch64-softmmu/gdbstub.o
CC x86_64-softmmu/hw/char/virtio-serial-bus.o
CC x86_64-softmmu/hw/core/nmi.o
CC x86_64-softmmu/hw/cpu/core.o
CC x86_64-softmmu/hw/display/vga.o
CC x86_64-softmmu/hw/display/virtio-gpu.o
CC x86_64-softmmu/hw/display/virtio-gpu-3d.o
CC x86_64-softmmu/hw/display/virtio-gpu-pci.o
CC aarch64-softmmu/balloon.o
CC x86_64-softmmu/hw/display/virtio-vga.o
CC x86_64-softmmu/hw/intc/apic.o
CC aarch64-softmmu/ioport.o
CC x86_64-softmmu/hw/intc/apic_common.o
CC aarch64-softmmu/numa.o
CC x86_64-softmmu/hw/intc/ioapic.o
CC x86_64-softmmu/hw/isa/lpc_ich9.o
CC aarch64-softmmu/qtest.o
CC aarch64-softmmu/bootdevice.o
CC aarch64-softmmu/memory.o
CC x86_64-softmmu/hw/misc/vmport.o
CC x86_64-softmmu/hw/misc/ivshmem.o
CC x86_64-softmmu/hw/misc/pvpanic.o
CC aarch64-softmmu/cputlb.o
CC x86_64-softmmu/hw/misc/edu.o
CC x86_64-softmmu/hw/misc/hyperv_testdev.o
CC x86_64-softmmu/hw/net/virtio-net.o
CC x86_64-softmmu/hw/net/vhost_net.o
CC x86_64-softmmu/hw/scsi/virtio-scsi.o
CC x86_64-softmmu/hw/scsi/virtio-scsi-dataplane.o
CC x86_64-softmmu/hw/scsi/vhost-scsi.o
CC x86_64-softmmu/hw/timer/mc146818rtc.o
CC x86_64-softmmu/hw/vfio/common.o
CC x86_64-softmmu/hw/vfio/pci.o
CC x86_64-softmmu/hw/vfio/pci-quirks.o
CC aarch64-softmmu/memory_mapping.o
CC aarch64-softmmu/dump.o
CC x86_64-softmmu/hw/vfio/platform.o
CC x86_64-softmmu/hw/vfio/calxeda-xgmac.o
CC x86_64-softmmu/hw/vfio/amd-xgbe.o
CC aarch64-softmmu/migration/ram.o
CC aarch64-softmmu/migration/savevm.o
CC aarch64-softmmu/xen-common-stub.o
CC x86_64-softmmu/hw/vfio/spapr.o
CC aarch64-softmmu/xen-hvm-stub.o
CC aarch64-softmmu/hw/block/virtio-blk.o
CC x86_64-softmmu/hw/virtio/virtio.o
CC aarch64-softmmu/hw/block/dataplane/virtio-blk.o
CC aarch64-softmmu/hw/char/exynos4210_uart.o
CC x86_64-softmmu/hw/virtio/virtio-balloon.o
CC aarch64-softmmu/hw/char/omap_uart.o
CC aarch64-softmmu/hw/char/digic-uart.o
CC aarch64-softmmu/hw/char/stm32f2xx_usart.o
CC aarch64-softmmu/hw/char/bcm2835_aux.o
CC x86_64-softmmu/hw/virtio/vhost.o
CC x86_64-softmmu/hw/virtio/vhost-backend.o
CC x86_64-softmmu/hw/virtio/vhost-user.o
CC x86_64-softmmu/hw/i386/multiboot.o
CC aarch64-softmmu/hw/char/virtio-serial-bus.o
CC aarch64-softmmu/hw/core/nmi.o
CC aarch64-softmmu/hw/cpu/arm11mpcore.o
CC x86_64-softmmu/hw/i386/pc.o
CC aarch64-softmmu/hw/cpu/realview_mpcore.o
CC x86_64-softmmu/hw/i386/pc_piix.o
CC aarch64-softmmu/hw/cpu/a9mpcore.o
CC aarch64-softmmu/hw/cpu/a15mpcore.o
CC aarch64-softmmu/hw/cpu/core.o
CC x86_64-softmmu/hw/i386/pc_q35.o
CC x86_64-softmmu/hw/i386/pc_sysfw.o
CC aarch64-softmmu/hw/display/omap_dss.o
CC aarch64-softmmu/hw/display/omap_lcdc.o
CC aarch64-softmmu/hw/display/pxa2xx_lcd.o
CC x86_64-softmmu/hw/i386/x86-iommu.o
CC x86_64-softmmu/hw/i386/intel_iommu.o
/tmp/qemu-test/src/hw/i386/pc_piix.c: In function ‘igd_passthrough_isa_bridge_create’:
/tmp/qemu-test/src/hw/i386/pc_piix.c:1037: warning: ‘pch_rev_id’ may be used uninitialized in this function
CC x86_64-softmmu/hw/i386/kvmvapic.o
CC aarch64-softmmu/hw/display/bcm2835_fb.o
CC x86_64-softmmu/hw/i386/acpi-build.o
CC aarch64-softmmu/hw/display/vga.o
CC x86_64-softmmu/hw/i386/pci-assign-load-rom.o
CC x86_64-softmmu/hw/i386/kvm/clock.o
CC aarch64-softmmu/hw/display/virtio-gpu.o
CC x86_64-softmmu/hw/i386/kvm/apic.o
CC aarch64-softmmu/hw/display/virtio-gpu-3d.o
CC x86_64-softmmu/hw/i386/kvm/i8259.o
CC aarch64-softmmu/hw/display/virtio-gpu-pci.o
CC aarch64-softmmu/hw/display/dpcd.o
CC aarch64-softmmu/hw/display/xlnx_dp.o
CC x86_64-softmmu/hw/i386/kvm/ioapic.o
CC aarch64-softmmu/hw/dma/xlnx_dpdma.o
CC x86_64-softmmu/hw/i386/kvm/i8254.o
CC x86_64-softmmu/hw/i386/kvm/pci-assign.o
CC x86_64-softmmu/target-i386/translate.o
CC x86_64-softmmu/target-i386/helper.o
CC x86_64-softmmu/target-i386/cpu.o
CC x86_64-softmmu/target-i386/bpt_helper.o
/tmp/qemu-test/src/hw/i386/acpi-build.c: In function ‘build_append_pci_bus_devices’:
/tmp/qemu-test/src/hw/i386/acpi-build.c:471: warning: ‘notify_method’ may be used uninitialized in this function
CC x86_64-softmmu/target-i386/excp_helper.o
CC x86_64-softmmu/target-i386/fpu_helper.o
CC aarch64-softmmu/hw/dma/omap_dma.o
CC x86_64-softmmu/target-i386/cc_helper.o
CC x86_64-softmmu/target-i386/int_helper.o
CC aarch64-softmmu/hw/dma/soc_dma.o
CC x86_64-softmmu/target-i386/svm_helper.o
CC x86_64-softmmu/target-i386/smm_helper.o
CC x86_64-softmmu/target-i386/misc_helper.o
CC aarch64-softmmu/hw/dma/pxa2xx_dma.o
CC aarch64-softmmu/hw/dma/bcm2835_dma.o
CC aarch64-softmmu/hw/gpio/omap_gpio.o
CC aarch64-softmmu/hw/gpio/imx_gpio.o
CC aarch64-softmmu/hw/i2c/omap_i2c.o
CC x86_64-softmmu/target-i386/mem_helper.o
CC x86_64-softmmu/target-i386/seg_helper.o
CC aarch64-softmmu/hw/input/pxa2xx_keypad.o
CC aarch64-softmmu/hw/input/tsc210x.o
CC aarch64-softmmu/hw/intc/armv7m_nvic.o
CC aarch64-softmmu/hw/intc/exynos4210_gic.o
CC aarch64-softmmu/hw/intc/exynos4210_combiner.o
CC x86_64-softmmu/target-i386/mpx_helper.o
CC aarch64-softmmu/hw/intc/omap_intc.o
CC x86_64-softmmu/target-i386/gdbstub.o
CC x86_64-softmmu/target-i386/machine.o
CC aarch64-softmmu/hw/intc/bcm2835_ic.o
CC x86_64-softmmu/target-i386/arch_memory_mapping.o
CC aarch64-softmmu/hw/intc/bcm2836_control.o
CC aarch64-softmmu/hw/intc/allwinner-a10-pic.o
CC aarch64-softmmu/hw/intc/aspeed_vic.o
CC aarch64-softmmu/hw/intc/arm_gicv3_cpuif.o
CC x86_64-softmmu/target-i386/arch_dump.o
CC x86_64-softmmu/target-i386/monitor.o
CC x86_64-softmmu/target-i386/kvm.o
CC x86_64-softmmu/target-i386/hyperv.o
GEN trace/generated-helpers.c
CC x86_64-softmmu/trace/control-target.o
CC aarch64-softmmu/hw/misc/ivshmem.o
CC aarch64-softmmu/hw/misc/arm_sysctl.o
CC aarch64-softmmu/hw/misc/cbus.o
CC aarch64-softmmu/hw/misc/exynos4210_pmu.o
CC aarch64-softmmu/hw/misc/imx_ccm.o
CC aarch64-softmmu/hw/misc/imx31_ccm.o
CC aarch64-softmmu/hw/misc/imx25_ccm.o
CC aarch64-softmmu/hw/misc/imx6_ccm.o
CC aarch64-softmmu/hw/misc/imx6_src.o
CC aarch64-softmmu/hw/misc/mst_fpga.o
CC aarch64-softmmu/hw/misc/omap_clk.o
CC aarch64-softmmu/hw/misc/omap_gpmc.o
CC x86_64-softmmu/trace/generated-helpers.o
CC aarch64-softmmu/hw/misc/omap_l4.o
CC aarch64-softmmu/hw/misc/omap_sdrc.o
CC aarch64-softmmu/hw/misc/omap_tap.o
CC aarch64-softmmu/hw/misc/bcm2835_mbox.o
CC aarch64-softmmu/hw/misc/bcm2835_property.o
CC aarch64-softmmu/hw/misc/zynq_slcr.o
CC aarch64-softmmu/hw/misc/zynq-xadc.o
CC aarch64-softmmu/hw/misc/stm32f2xx_syscfg.o
CC aarch64-softmmu/hw/misc/edu.o
CC aarch64-softmmu/hw/misc/auxbus.o
CC aarch64-softmmu/hw/misc/aspeed_scu.o
CC aarch64-softmmu/hw/net/virtio-net.o
CC aarch64-softmmu/hw/net/vhost_net.o
CC aarch64-softmmu/hw/pcmcia/pxa2xx.o
CC aarch64-softmmu/hw/scsi/virtio-scsi.o
CC aarch64-softmmu/hw/scsi/virtio-scsi-dataplane.o
CC aarch64-softmmu/hw/scsi/vhost-scsi.o
CC aarch64-softmmu/hw/sd/omap_mmc.o
CC aarch64-softmmu/hw/sd/pxa2xx_mmci.o
CC aarch64-softmmu/hw/ssi/omap_spi.o
CC aarch64-softmmu/hw/ssi/imx_spi.o
CC aarch64-softmmu/hw/timer/exynos4210_mct.o
CC aarch64-softmmu/hw/timer/exynos4210_pwm.o
LINK x86_64-softmmu/qemu-system-x86_64
CC aarch64-softmmu/hw/timer/exynos4210_rtc.o
CC aarch64-softmmu/hw/timer/omap_gptimer.o
CC aarch64-softmmu/hw/timer/omap_synctimer.o
CC aarch64-softmmu/hw/timer/pxa2xx_timer.o
CC aarch64-softmmu/hw/timer/digic-timer.o
CC aarch64-softmmu/hw/timer/allwinner-a10-pit.o
CC aarch64-softmmu/hw/usb/tusb6010.o
CC aarch64-softmmu/hw/vfio/common.o
CC aarch64-softmmu/hw/vfio/pci.o
CC aarch64-softmmu/hw/vfio/pci-quirks.o
CC aarch64-softmmu/hw/vfio/platform.o
CC aarch64-softmmu/hw/vfio/calxeda-xgmac.o
CC aarch64-softmmu/hw/vfio/amd-xgbe.o
CC aarch64-softmmu/hw/vfio/spapr.o
CC aarch64-softmmu/hw/virtio/virtio.o
CC aarch64-softmmu/hw/virtio/virtio-balloon.o
CC aarch64-softmmu/hw/virtio/vhost.o
CC aarch64-softmmu/hw/virtio/vhost-backend.o
CC aarch64-softmmu/hw/virtio/vhost-user.o
CC aarch64-softmmu/hw/arm/boot.o
CC aarch64-softmmu/hw/arm/collie.o
CC aarch64-softmmu/hw/arm/exynos4_boards.o
CC aarch64-softmmu/hw/arm/gumstix.o
CC aarch64-softmmu/hw/arm/highbank.o
CC aarch64-softmmu/hw/arm/digic_boards.o
CC aarch64-softmmu/hw/arm/integratorcp.o
CC aarch64-softmmu/hw/arm/mainstone.o
CC aarch64-softmmu/hw/arm/musicpal.o
CC aarch64-softmmu/hw/arm/nseries.o
CC aarch64-softmmu/hw/arm/omap_sx1.o
CC aarch64-softmmu/hw/arm/palm.o
CC aarch64-softmmu/hw/arm/realview.o
CC aarch64-softmmu/hw/arm/spitz.o
CC aarch64-softmmu/hw/arm/stellaris.o
CC aarch64-softmmu/hw/arm/tosa.o
CC aarch64-softmmu/hw/arm/versatilepb.o
CC aarch64-softmmu/hw/arm/vexpress.o
CC aarch64-softmmu/hw/arm/virt.o
CC aarch64-softmmu/hw/arm/xilinx_zynq.o
CC aarch64-softmmu/hw/arm/z2.o
CC aarch64-softmmu/hw/arm/virt-acpi-build.o
CC aarch64-softmmu/hw/arm/netduino2.o
CC aarch64-softmmu/hw/arm/sysbus-fdt.o
CC aarch64-softmmu/hw/arm/armv7m.o
CC aarch64-softmmu/hw/arm/exynos4210.o
CC aarch64-softmmu/hw/arm/pxa2xx.o
CC aarch64-softmmu/hw/arm/pxa2xx_gpio.o
CC aarch64-softmmu/hw/arm/pxa2xx_pic.o
CC aarch64-softmmu/hw/arm/digic.o
CC aarch64-softmmu/hw/arm/omap1.o
CC aarch64-softmmu/hw/arm/omap2.o
CC aarch64-softmmu/hw/arm/strongarm.o
CC aarch64-softmmu/hw/arm/allwinner-a10.o
CC aarch64-softmmu/hw/arm/cubieboard.o
CC aarch64-softmmu/hw/arm/bcm2835_peripherals.o
CC aarch64-softmmu/hw/arm/bcm2836.o
CC aarch64-softmmu/hw/arm/raspi.o
CC aarch64-softmmu/hw/arm/stm32f205_soc.o
CC aarch64-softmmu/hw/arm/xlnx-zynqmp.o
CC aarch64-softmmu/hw/arm/xlnx-ep108.o
CC aarch64-softmmu/hw/arm/fsl-imx25.o
CC aarch64-softmmu/hw/arm/imx25_pdk.o
CC aarch64-softmmu/hw/arm/fsl-imx31.o
CC aarch64-softmmu/hw/arm/kzm.o
CC aarch64-softmmu/hw/arm/fsl-imx6.o
CC aarch64-softmmu/hw/arm/sabrelite.o
CC aarch64-softmmu/hw/arm/ast2400.o
CC aarch64-softmmu/hw/arm/palmetto-bmc.o
CC aarch64-softmmu/target-arm/arm-semi.o
CC aarch64-softmmu/target-arm/machine.o
CC aarch64-softmmu/target-arm/psci.o
CC aarch64-softmmu/target-arm/arch_dump.o
CC aarch64-softmmu/target-arm/monitor.o
CC aarch64-softmmu/target-arm/kvm-stub.o
CC aarch64-softmmu/target-arm/translate.o
CC aarch64-softmmu/target-arm/op_helper.o
CC aarch64-softmmu/target-arm/helper.o
CC aarch64-softmmu/target-arm/cpu.o
CC aarch64-softmmu/target-arm/neon_helper.o
CC aarch64-softmmu/target-arm/iwmmxt_helper.o
CC aarch64-softmmu/target-arm/gdbstub.o
CC aarch64-softmmu/target-arm/cpu64.o
CC aarch64-softmmu/target-arm/translate-a64.o
CC aarch64-softmmu/target-arm/helper-a64.o
CC aarch64-softmmu/target-arm/gdbstub64.o
CC aarch64-softmmu/target-arm/crypto_helper.o
CC aarch64-softmmu/target-arm/arm-powerctl.o
GEN trace/generated-helpers.c
CC aarch64-softmmu/trace/control-target.o
CC aarch64-softmmu/gdbstub-xml.o
CC aarch64-softmmu/trace/generated-helpers.o
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘handle_shri_with_rndacc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:6308: warning: ‘tcg_src_hi’ may be used uninitialized in this function
/tmp/qemu-test/src/target-arm/translate-a64.c: In function ‘disas_simd_scalar_two_reg_misc’:
/tmp/qemu-test/src/target-arm/translate-a64.c:8035: warning: ‘rmode’ may be used uninitialized in this function
LINK aarch64-softmmu/qemu-system-aarch64
TEST tests/qapi-schema/alternate-any.out
TEST tests/qapi-schema/alternate-array.out
TEST tests/qapi-schema/alternate-base.out
TEST tests/qapi-schema/alternate-clash.out
TEST tests/qapi-schema/alternate-conflict-dict.out
TEST tests/qapi-schema/alternate-conflict-string.out
TEST tests/qapi-schema/alternate-empty.out
TEST tests/qapi-schema/alternate-nested.out
TEST tests/qapi-schema/alternate-unknown.out
TEST tests/qapi-schema/args-alternate.out
TEST tests/qapi-schema/args-any.out
TEST tests/qapi-schema/args-array-empty.out
TEST tests/qapi-schema/args-array-unknown.out
TEST tests/qapi-schema/args-bad-boxed.out
TEST tests/qapi-schema/args-boxed-anon.out
TEST tests/qapi-schema/args-boxed-empty.out
TEST tests/qapi-schema/args-boxed-string.out
TEST tests/qapi-schema/args-int.out
TEST tests/qapi-schema/args-invalid.out
TEST tests/qapi-schema/args-member-array-bad.out
TEST tests/qapi-schema/args-member-case.out
TEST tests/qapi-schema/args-member-unknown.out
TEST tests/qapi-schema/args-name-clash.out
TEST tests/qapi-schema/args-union.out
TEST tests/qapi-schema/args-unknown.out
TEST tests/qapi-schema/bad-base.out
TEST tests/qapi-schema/bad-data.out
TEST tests/qapi-schema/bad-ident.out
TEST tests/qapi-schema/bad-type-bool.out
TEST tests/qapi-schema/bad-type-dict.out
TEST tests/qapi-schema/bad-type-int.out
TEST tests/qapi-schema/base-cycle-direct.out
TEST tests/qapi-schema/base-cycle-indirect.out
TEST tests/qapi-schema/command-int.out
TEST tests/qapi-schema/comments.out
TEST tests/qapi-schema/double-data.out
TEST tests/qapi-schema/double-type.out
TEST tests/qapi-schema/duplicate-key.out
TEST tests/qapi-schema/empty.out
TEST tests/qapi-schema/enum-bad-name.out
TEST tests/qapi-schema/enum-bad-prefix.out
TEST tests/qapi-schema/enum-clash-member.out
TEST tests/qapi-schema/enum-dict-member.out
TEST tests/qapi-schema/enum-int-member.out
TEST tests/qapi-schema/enum-member-case.out
TEST tests/qapi-schema/enum-missing-data.out
TEST tests/qapi-schema/enum-wrong-data.out
TEST tests/qapi-schema/escape-outside-string.out
TEST tests/qapi-schema/escape-too-big.out
TEST tests/qapi-schema/escape-too-short.out
TEST tests/qapi-schema/event-boxed-empty.out
TEST tests/qapi-schema/event-case.out
TEST tests/qapi-schema/event-nest-struct.out
TEST tests/qapi-schema/flat-union-array-branch.out
TEST tests/qapi-schema/flat-union-bad-base.out
TEST tests/qapi-schema/flat-union-bad-discriminator.out
TEST tests/qapi-schema/flat-union-base-any.out
TEST tests/qapi-schema/flat-union-base-union.out
TEST tests/qapi-schema/flat-union-clash-member.out
TEST tests/qapi-schema/flat-union-empty.out
TEST tests/qapi-schema/flat-union-incomplete-branch.out
TEST tests/qapi-schema/flat-union-inline.out
TEST tests/qapi-schema/flat-union-int-branch.out
TEST tests/qapi-schema/flat-union-invalid-branch-key.out
TEST tests/qapi-schema/flat-union-invalid-discriminator.out
TEST tests/qapi-schema/flat-union-no-base.out
TEST tests/qapi-schema/flat-union-optional-discriminator.out
TEST tests/qapi-schema/flat-union-string-discriminator.out
TEST tests/qapi-schema/funny-char.out
TEST tests/qapi-schema/ident-with-escape.out
TEST tests/qapi-schema/include-before-err.out
TEST tests/qapi-schema/include-cycle.out
TEST tests/qapi-schema/include-format-err.out
TEST tests/qapi-schema/include-nested-err.out
TEST tests/qapi-schema/include-no-file.out
TEST tests/qapi-schema/include-non-file.out
TEST tests/qapi-schema/include-relpath.out
TEST tests/qapi-schema/include-repetition.out
TEST tests/qapi-schema/include-self-cycle.out
TEST tests/qapi-schema/include-simple.out
TEST tests/qapi-schema/indented-expr.out
TEST tests/qapi-schema/leading-comma-list.out
TEST tests/qapi-schema/leading-comma-object.out
TEST tests/qapi-schema/missing-colon.out
TEST tests/qapi-schema/missing-comma-list.out
TEST tests/qapi-schema/missing-comma-object.out
TEST tests/qapi-schema/missing-type.out
TEST tests/qapi-schema/nested-struct-data.out
TEST tests/qapi-schema/non-objects.out
TEST tests/qapi-schema/qapi-schema-test.out
TEST tests/qapi-schema/quoted-structural-chars.out
TEST tests/qapi-schema/redefined-builtin.out
TEST tests/qapi-schema/redefined-command.out
TEST tests/qapi-schema/redefined-event.out
TEST tests/qapi-schema/redefined-type.out
TEST tests/qapi-schema/reserved-command-q.out
TEST tests/qapi-schema/reserved-enum-q.out
TEST tests/qapi-schema/reserved-member-has.out
TEST tests/qapi-schema/reserved-member-q.out
TEST tests/qapi-schema/reserved-member-u.out
TEST tests/qapi-schema/reserved-member-underscore.out
TEST tests/qapi-schema/reserved-type-kind.out
TEST tests/qapi-schema/reserved-type-list.out
TEST tests/qapi-schema/returns-alternate.out
TEST tests/qapi-schema/returns-array-bad.out
TEST tests/qapi-schema/returns-dict.out
TEST tests/qapi-schema/returns-unknown.out
TEST tests/qapi-schema/returns-whitelist.out
TEST tests/qapi-schema/struct-base-clash-deep.out
TEST tests/qapi-schema/struct-base-clash.out
TEST tests/qapi-schema/struct-data-invalid.out
TEST tests/qapi-schema/struct-member-invalid.out
TEST tests/qapi-schema/trailing-comma-list.out
TEST tests/qapi-schema/trailing-comma-object.out
TEST tests/qapi-schema/type-bypass-bad-gen.out
TEST tests/qapi-schema/unclosed-list.out
TEST tests/qapi-schema/unclosed-object.out
TEST tests/qapi-schema/unclosed-string.out
TEST tests/qapi-schema/unicode-str.out
TEST tests/qapi-schema/union-base-no-discriminator.out
TEST tests/qapi-schema/union-branch-case.out
TEST tests/qapi-schema/union-clash-branches.out
TEST tests/qapi-schema/union-empty.out
TEST tests/qapi-schema/union-invalid-base.out
TEST tests/qapi-schema/union-optional-branch.out
TEST tests/qapi-schema/union-unknown.out
TEST tests/qapi-schema/unknown-escape.out
TEST tests/qapi-schema/unknown-expr-key.out
CC tests/check-qdict.o
CC tests/check-qfloat.o
CC tests/check-qint.o
CC tests/check-qstring.o
CC tests/check-qlist.o
CC tests/check-qnull.o
CC tests/check-qjson.o
CC tests/test-qmp-output-visitor.o
GEN tests/test-qapi-visit.c
GEN tests/test-qapi-types.c
GEN tests/test-qapi-event.c
GEN tests/test-qmp-introspect.c
CC tests/test-clone-visitor.o
CC tests/test-qmp-input-visitor.o
CC tests/test-qmp-input-strict.o
CC tests/test-qmp-commands.o
GEN tests/test-qmp-marshal.c
CC tests/test-string-input-visitor.o
CC tests/test-string-output-visitor.o
CC tests/test-qmp-event.o
CC tests/test-opts-visitor.o
CC tests/test-coroutine.o
CC tests/test-visitor-serialization.o
CC tests/test-iov.o
CC tests/test-aio.o
CC tests/test-rfifolock.o
CC tests/test-throttle.o
CC tests/test-thread-pool.o
CC tests/test-hbitmap.o
CC tests/test-blockjob.o
CC tests/test-blockjob-txn.o
CC tests/test-x86-cpuid.o
CC tests/test-xbzrle.o
CC tests/test-vmstate.o
CC tests/test-cutils.o
CC tests/test-mul64.o
CC tests/test-int128.o
CC tests/rcutorture.o
CC tests/test-rcu-list.o
CC tests/test-qdist.o
/tmp/qemu-test/src/tests/test-int128.c:180: warning: ‘__noclone__’ attribute directive ignored
CC tests/test-qht.o
CC tests/test-qht-par.o
CC tests/qht-bench.o
CC tests/test-bitops.o
CC tests/check-qom-interface.o
CC tests/check-qom-proplist.o
CC tests/test-qemu-opts.o
CC tests/test-write-threshold.o
CC tests/test-crypto-hash.o
CC tests/test-crypto-cipher.o
CC tests/test-crypto-secret.o
CC tests/test-qga.o
CC tests/libqtest.o
CC tests/test-timed-average.o
CC tests/test-io-task.o
CC tests/test-io-channel-socket.o
CC tests/io-channel-helpers.o
CC tests/test-io-channel-file.o
CC tests/test-io-channel-command.o
CC tests/test-io-channel-buffer.o
CC tests/test-base64.o
CC tests/test-crypto-ivgen.o
CC tests/test-crypto-afsplit.o
CC tests/test-crypto-xts.o
CC tests/test-crypto-block.o
CC tests/test-logging.o
CC tests/vhost-user-test.o
CC tests/endianness-test.o
CC tests/fdc-test.o
CC tests/ide-test.o
CC tests/libqos/pci.o
CC tests/libqos/fw_cfg.o
CC tests/libqos/malloc.o
CC tests/libqos/i2c.o
CC tests/libqos/libqos.o
/tmp/qemu-test/src/tests/ide-test.c: In function ‘cdrom_pio_impl’:
/tmp/qemu-test/src/tests/ide-test.c:739: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
/tmp/qemu-test/src/tests/ide-test.c: In function ‘test_cdrom_dma’:
/tmp/qemu-test/src/tests/ide-test.c:832: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC tests/libqos/pci-pc.o
CC tests/libqos/malloc-pc.o
CC tests/libqos/libqos-pc.o
CC tests/libqos/ahci.o
CC tests/ahci-test.o
CC tests/hd-geo-test.o
CC tests/boot-order-test.o
CC tests/bios-tables-test.o
CC tests/boot-sector.o
CC tests/pxe-test.o
CC tests/rtc-test.o
CC tests/ipmi-kcs-test.o
CC tests/ipmi-bt-test.o
CC tests/i440fx-test.o
/tmp/qemu-test/src/tests/boot-sector.c: In function ‘boot_sector_init’:
/tmp/qemu-test/src/tests/boot-sector.c:80: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result
CC tests/fw_cfg-test.o
CC tests/drive_del-test.o
CC tests/wdt_ib700-test.o
CC tests/tco-test.o
CC tests/e1000-test.o
CC tests/e1000e-test.o
CC tests/rtl8139-test.o
CC tests/pcnet-test.o
CC tests/eepro100-test.o
CC tests/ne2000-test.o
CC tests/nvme-test.o
CC tests/ac97-test.o
CC tests/es1370-test.o
CC tests/virtio-net-test.o
CC tests/libqos/virtio.o
CC tests/libqos/virtio-pci.o
CC tests/libqos/virtio-mmio.o
CC tests/libqos/malloc-generic.o
CC tests/virtio-balloon-test.o
CC tests/virtio-blk-test.o
CC tests/virtio-rng-test.o
CC tests/virtio-scsi-test.o
CC tests/virtio-serial-test.o
CC tests/virtio-console-test.o
CC tests/tpci200-test.o
CC tests/ipoctal232-test.o
CC tests/display-vga-test.o
CC tests/intel-hda-test.o
CC tests/ivshmem-test.o
CC tests/vmxnet3-test.o
CC tests/pvpanic-test.o
CC tests/i82801b11-test.o
CC tests/ioh3420-test.o
CC tests/usb-hcd-ohci-test.o
CC tests/libqos/usb.o
CC tests/usb-hcd-uhci-test.o
CC tests/usb-hcd-ehci-test.o
CC tests/usb-hcd-xhci-test.o
CC tests/pc-cpu-test.o
CC tests/q35-test.o
CC tests/test-netfilter.o
CC tests/test-filter-mirror.o
CC tests/test-filter-redirector.o
CC tests/postcopy-test.o
CC tests/device-introspect-test.o
CC tests/qom-test.o
LINK tests/check-qdict
LINK tests/check-qfloat
LINK tests/check-qint
LINK tests/check-qstring
LINK tests/check-qlist
LINK tests/check-qnull
LINK tests/check-qjson
CC tests/test-qapi-visit.o
CC tests/test-qapi-types.o
CC tests/test-qapi-event.o
CC tests/test-qmp-marshal.o
CC tests/test-qmp-introspect.o
LINK tests/test-coroutine
LINK tests/test-iov
LINK tests/test-aio
LINK tests/test-rfifolock
LINK tests/test-throttle
LINK tests/test-thread-pool
LINK tests/test-hbitmap
LINK tests/test-blockjob
LINK tests/test-blockjob-txn
LINK tests/test-x86-cpuid
LINK tests/test-xbzrle
LINK tests/test-vmstate
LINK tests/test-cutils
LINK tests/test-mul64
LINK tests/test-int128
LINK tests/rcutorture
LINK tests/test-rcu-list
LINK tests/test-qdist
LINK tests/test-qht
LINK tests/qht-bench
LINK tests/test-bitops
LINK tests/check-qom-interface
LINK tests/check-qom-proplist
LINK tests/test-qemu-opts
LINK tests/test-write-threshold
LINK tests/test-crypto-hash
LINK tests/test-crypto-cipher
LINK tests/test-crypto-secret
LINK tests/test-qga
LINK tests/test-timed-average
LINK tests/test-io-task
LINK tests/test-io-channel-socket
LINK tests/test-io-channel-file
LINK tests/test-io-channel-command
LINK tests/test-io-channel-buffer
LINK tests/test-base64
LINK tests/test-crypto-ivgen
LINK tests/test-crypto-afsplit
LINK tests/test-crypto-xts
LINK tests/test-crypto-block
LINK tests/test-logging
LINK tests/vhost-user-test
LINK tests/endianness-test
LINK tests/fdc-test
LINK tests/ide-test
LINK tests/ahci-test
LINK tests/hd-geo-test
LINK tests/boot-order-test
LINK tests/bios-tables-test
LINK tests/pxe-test
LINK tests/rtc-test
LINK tests/ipmi-kcs-test
LINK tests/ipmi-bt-test
LINK tests/i440fx-test
LINK tests/fw_cfg-test
LINK tests/drive_del-test
LINK tests/wdt_ib700-test
LINK tests/tco-test
LINK tests/e1000-test
LINK tests/e1000e-test
LINK tests/rtl8139-test
LINK tests/pcnet-test
LINK tests/eepro100-test
LINK tests/ne2000-test
LINK tests/nvme-test
LINK tests/ac97-test
LINK tests/es1370-test
LINK tests/virtio-net-test
LINK tests/virtio-balloon-test
LINK tests/virtio-blk-test
LINK tests/virtio-rng-test
LINK tests/virtio-scsi-test
LINK tests/virtio-serial-test
LINK tests/virtio-console-test
LINK tests/tpci200-test
LINK tests/ipoctal232-test
LINK tests/display-vga-test
LINK tests/intel-hda-test
LINK tests/ivshmem-test
LINK tests/vmxnet3-test
LINK tests/pvpanic-test
LINK tests/i82801b11-test
LINK tests/ioh3420-test
LINK tests/usb-hcd-ohci-test
LINK tests/usb-hcd-uhci-test
LINK tests/usb-hcd-ehci-test
LINK tests/usb-hcd-xhci-test
LINK tests/pc-cpu-test
LINK tests/q35-test
LINK tests/test-netfilter
LINK tests/test-filter-mirror
LINK tests/test-filter-redirector
LINK tests/postcopy-test
LINK tests/device-introspect-test
LINK tests/qom-test
GTESTER tests/check-qdict
GTESTER tests/check-qfloat
GTESTER tests/check-qint
GTESTER tests/check-qstring
GTESTER tests/check-qlist
GTESTER tests/check-qnull
GTESTER tests/check-qjson
LINK tests/test-qmp-output-visitor
LINK tests/test-clone-visitor
LINK tests/test-qmp-input-visitor
LINK tests/test-qmp-input-strict
LINK tests/test-qmp-commands
LINK tests/test-string-input-visitor
LINK tests/test-string-output-visitor
LINK tests/test-qmp-event
LINK tests/test-opts-visitor
GTESTER tests/test-coroutine
LINK tests/test-visitor-serialization
GTESTER tests/test-iov
GTESTER tests/test-aio
GTESTER tests/test-rfifolock
GTESTER tests/test-throttle
GTESTER tests/test-thread-pool
GTESTER tests/test-hbitmap
GTESTER tests/test-blockjob
GTESTER tests/test-blockjob-txn
GTESTER tests/test-x86-cpuid
GTESTER tests/test-xbzrle
GTESTER tests/test-vmstate
GTESTER tests/test-cutils
GTESTER tests/test-mul64
GTESTER tests/test-int128
GTESTER tests/rcutorture
GTESTER tests/test-rcu-list
GTESTER tests/test-qdist
GTESTER tests/test-qht
LINK tests/test-qht-par
GTESTER tests/test-bitops
GTESTER tests/check-qom-interface
GTESTER tests/check-qom-proplist
GTESTER tests/test-qemu-opts
GTESTER tests/test-write-threshold
GTESTER tests/test-crypto-hash
GTESTER tests/test-crypto-cipher
GTESTER tests/test-crypto-secret
GTESTER tests/test-qga
GTESTER tests/test-timed-average
GTESTER tests/test-io-task
GTESTER tests/test-io-channel-socket
GTESTER tests/test-io-channel-file
GTESTER tests/test-io-channel-command
GTESTER tests/test-io-channel-buffer
GTESTER tests/test-base64
GTESTER tests/test-crypto-ivgen
GTESTER tests/test-crypto-afsplit
GTESTER tests/test-crypto-xts
GTESTER tests/test-crypto-block
GTESTER tests/test-logging
GTESTER check-qtest-x86_64
GTESTER check-qtest-aarch64
GTESTER tests/test-qmp-output-visitor
GTESTER tests/test-clone-visitor
GTESTER tests/test-qmp-input-visitor
GTESTER tests/test-qmp-input-strict
GTESTER tests/test-qmp-commands
GTESTER tests/test-string-input-visitor
GTESTER tests/test-string-output-visitor
GTESTER tests/test-qmp-event
GTESTER tests/test-opts-visitor
GTESTER tests/test-visitor-serialization
GTESTER tests/test-qht-par
BUILD fedora
ARCHIVE qemu.tgz
ARCHIVE dtc.tgz
COPY RUNNER
RUN test-mingw in fedora
Install prefix /tmp/qemu-test/src/tests/docker/install
BIOS directory /tmp/qemu-test/src/tests/docker/install
binary directory /tmp/qemu-test/src/tests/docker/install
library directory /tmp/qemu-test/src/tests/docker/install/lib
module directory /tmp/qemu-test/src/tests/docker/install/lib
libexec directory /tmp/qemu-test/src/tests/docker/install/libexec
include directory /tmp/qemu-test/src/tests/docker/install/include
config directory /tmp/qemu-test/src/tests/docker/install
local state directory queried at runtime
Windows SDK no
Source path /tmp/qemu-test/src
C compiler x86_64-w64-mingw32-gcc
Host C compiler cc
C++ compiler x86_64-w64-mingw32-g++
Objective-C compiler clang
ARFLAGS rv
CFLAGS -mms-bitfields -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/glib-2.0 -I/usr/x86_64-w64-mingw32/sys-root/mingw/lib/glib-2.0/include -g
QEMU_CFLAGS -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/pixman-1 -I$(SRC_PATH)/dtc/libfdt -Werror -m64 -mthreads -D__USE_MINGW_ANSI_STDIO=1 -DWIN32_LEAN_AND_MEAN -DWINVER=0x501 -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -Wstrict-prototypes -Wredundant-decls -Wall -Wundef -Wwrite-strings -Wmissing-prototypes -fno-strict-aliasing -fno-common -Wendif-labels -Wmissing-include-dirs -Wempty-body -Wnested-externs -Wformat-security -Wformat-y2k -Winit-self -Wignored-qualifiers -Wold-style-declaration -Wold-style-definition -Wtype-limits -fstack-protector-strong -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/p11-kit-1 -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include -I/usr/x86_64-w64-mingw32/sys-root/mingw/include/libpng16
LDFLAGS -Wl,--nxcompat -Wl,--no-seh -Wl,--dynamicbase -Wl,--warn-common -m64 -g
make make
install install
python python -B
smbd /usr/sbin/smbd
module support no
host CPU x86_64
host big endian no
target list x86_64-softmmu aarch64-softmmu
tcg debug enabled yes
gprof enabled no
sparse enabled no
strip binaries no
profiler no
static build no
pixman system
SDL support yes (1.2.15)
GTK support yes (2.24.30)
GTK GL support no
VTE support no
TLS priority NORMAL
GNUTLS support yes
GNUTLS rnd yes
libgcrypt no
libgcrypt kdf no
nettle yes (3.2)
nettle kdf yes
libtasn1 yes
curses support no
virgl support no
curl support yes
mingw32 support yes
Audio drivers dsound
Block whitelist (rw)
Block whitelist (ro)
VirtFS support no
VNC support yes
VNC SASL support no
VNC JPEG support yes
VNC PNG support yes
xen support no
brlapi support no
bluez support no
Documentation no
PIE no
vde support no
netmap support no
Linux AIO support no
ATTR/XATTR support no
Install blobs yes
KVM support no
RDMA support no
TCG interpreter no
fdt support yes
preadv support no
fdatasync no
madvise no
posix_madvise no
uuid support no
libcap-ng support no
vhost-net support no
vhost-scsi support no
Trace backends simple
Trace output file trace-<pid>
spice support no
rbd support no
xfsctl support no
smartcard support no
libusb no
usb net redir no
OpenGL support no
OpenGL dmabufs no
libiscsi support no
libnfs support no
build guest agent yes
QGA VSS support no
QGA w32 disk info yes
QGA MSI support no
seccomp support no
coroutine backend win32
coroutine pool yes
GlusterFS support no
Archipelago support no
gcov gcov
gcov enabled no
TPM support yes
libssh2 support yes
TPM passthrough no
QOM debugging yes
vhdx no
lzo support no
snappy support no
bzip2 support yes
NUMA host support no
tcmalloc support no
jemalloc support no
avx2 optimization no
mkdir -p dtc/libfdt
GEN x86_64-softmmu/config-devices.mak.tmp
mkdir -p dtc/tests
GEN aarch64-softmmu/config-devices.mak.tmp
GEN config-host.h
GEN qemu-options.def
GEN qmp-commands.h
GEN qapi-types.h
GEN qapi-visit.h
GEN qapi-event.h
GEN qmp-introspect.h
GEN x86_64-softmmu/config-devices.mak
GEN aarch64-softmmu/config-devices.mak
GEN tests/test-qapi-types.h
GEN tests/test-qapi-visit.h
GEN tests/test-qmp-commands.h
GEN tests/test-qapi-event.h
GEN tests/test-qmp-introspect.h
GEN config-all-devices.mak
DEP /tmp/qemu-test/src/dtc/tests/dumptrees.c
DEP /tmp/qemu-test/src/dtc/tests/trees.S
DEP /tmp/qemu-test/src/dtc/tests/testutils.c
GEN trace/generated-events.h
DEP /tmp/qemu-test/src/dtc/tests/value-labels.c
DEP /tmp/qemu-test/src/dtc/tests/asm_tree_dump.c
GEN trace/generated-tracers.h
DEP /tmp/qemu-test/src/dtc/tests/truncated_property.c
DEP /tmp/qemu-test/src/dtc/tests/subnode_iterate.c
GEN trace/generated-tcg-tracers.h
DEP /tmp/qemu-test/src/dtc/tests/integer-expressions.c
GEN trace/generated-helpers-wrappers.h
GEN trace/generated-helpers.h
DEP /tmp/qemu-test/src/dtc/tests/utilfdt_test.c
DEP /tmp/qemu-test/src/dtc/tests/path_offset_aliases.c
DEP /tmp/qemu-test/src/dtc/tests/add_subnode_with_nops.c
DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_unordered.c
DEP /tmp/qemu-test/src/dtc/tests/dtb_reverse.c
DEP /tmp/qemu-test/src/dtc/tests/dtbs_equal_ordered.c
DEP /tmp/qemu-test/src/dtc/tests/extra-terminating-null.c
DEP /tmp/qemu-test/src/dtc/tests/incbin.c
DEP /tmp/qemu-test/src/dtc/tests/boot-cpuid.c
DEP /tmp/qemu-test/src/dtc/tests/phandle_format.c
DEP /tmp/qemu-test/src/dtc/tests/path-references.c
DEP /tmp/qemu-test/src/dtc/tests/references.c
DEP /tmp/qemu-test/src/dtc/tests/string_escapes.c
DEP /tmp/qemu-test/src/dtc/tests/propname_escapes.c
DEP /tmp/qemu-test/src/dtc/tests/appendprop2.c
DEP /tmp/qemu-test/src/dtc/tests/appendprop1.c
DEP /tmp/qemu-test/src/dtc/tests/del_node.c
DEP /tmp/qemu-test/src/dtc/tests/del_property.c
DEP /tmp/qemu-test/src/dtc/tests/setprop.c
DEP /tmp/qemu-test/src/dtc/tests/set_name.c
DEP /tmp/qemu-test/src/dtc/tests/rw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/open_pack.c
DEP /tmp/qemu-test/src/dtc/tests/nopulate.c
DEP /tmp/qemu-test/src/dtc/tests/mangle-layout.c
DEP /tmp/qemu-test/src/dtc/tests/move_and_save.c
DEP /tmp/qemu-test/src/dtc/tests/sw_tree1.c
DEP /tmp/qemu-test/src/dtc/tests/nop_node.c
DEP /tmp/qemu-test/src/dtc/tests/nop_property.c
DEP /tmp/qemu-test/src/dtc/tests/setprop_inplace.c
DEP /tmp/qemu-test/src/dtc/tests/notfound.c
DEP /tmp/qemu-test/src/dtc/tests/sized_cells.c
DEP /tmp/qemu-test/src/dtc/tests/char_literal.c
DEP /tmp/qemu-test/src/dtc/tests/get_alias.c
DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_compatible.c
DEP /tmp/qemu-test/src/dtc/tests/node_check_compatible.c
DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_phandle.c
DEP /tmp/qemu-test/src/dtc/tests/node_offset_by_prop_value.c
DEP /tmp/qemu-test/src/dtc/tests/parent_offset.c
DEP /tmp/qemu-test/src/dtc/tests/supernode_atdepth_offset.c
DEP /tmp/qemu-test/src/dtc/tests/get_path.c
DEP /tmp/qemu-test/src/dtc/tests/get_phandle.c
DEP /tmp/qemu-test/src/dtc/tests/getprop.c
DEP /tmp/qemu-test/src/dtc/tests/get_name.c
DEP /tmp/qemu-test/src/dtc/tests/path_offset.c
DEP /tmp/qemu-test/src/dtc/tests/subnode_offset.c
DEP /tmp/qemu-test/src/dtc/tests/find_property.c
DEP /tmp/qemu-test/src/dtc/tests/root_node.c
DEP /tmp/qemu-test/src/dtc/tests/get_mem_rsv.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_empty_tree.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_strerror.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_rw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_sw.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_wip.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt_ro.c
DEP /tmp/qemu-test/src/dtc/libfdt/fdt.c
DEP /tmp/qemu-test/src/dtc/util.c
DEP /tmp/qemu-test/src/dtc/fdtput.c
DEP /tmp/qemu-test/src/dtc/fdtget.c
DEP /tmp/qemu-test/src/dtc/fdtdump.c
LEX convert-dtsv0-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/srcpos.c
BISON dtc-parser.tab.c
LEX dtc-lexer.lex.c
DEP /tmp/qemu-test/src/dtc/treesource.c
DEP /tmp/qemu-test/src/dtc/livetree.c
DEP /tmp/qemu-test/src/dtc/fstree.c
DEP /tmp/qemu-test/src/dtc/flattree.c
DEP /tmp/qemu-test/src/dtc/data.c
DEP /tmp/qemu-test/src/dtc/dtc.c
DEP /tmp/qemu-test/src/dtc/checks.c
DEP convert-dtsv0-lexer.lex.c
DEP dtc-parser.tab.c
DEP dtc-lexer.lex.c
CHK version_gen.h
UPD version_gen.h
DEP /tmp/qemu-test/src/dtc/util.c
CC libfdt/fdt.o
CC libfdt/fdt_wip.o
CC libfdt/fdt_ro.o
CC libfdt/fdt_sw.o
CC libfdt/fdt_rw.o
CC libfdt/fdt_strerror.o
CC libfdt/fdt_empty_tree.o
AR libfdt/libfdt.a
x86_64-w64-mingw32-ar: creating libfdt/libfdt.a
a - libfdt/fdt.o
a - libfdt/fdt_ro.o
a - libfdt/fdt_wip.o
a - libfdt/fdt_sw.o
a - libfdt/fdt_rw.o
a - libfdt/fdt_strerror.o
a - libfdt/fdt_empty_tree.o
RC version.lo
RC version.o
GEN qga/qapi-generated/qga-qapi-types.h
GEN qga/qapi-generated/qga-qapi-visit.h
GEN qga/qapi-generated/qga-qmp-commands.h
GEN qga/qapi-generated/qga-qapi-types.c
GEN qga/qapi-generated/qga-qapi-visit.c
GEN qga/qapi-generated/qga-qmp-marshal.c
GEN qmp-introspect.c
GEN qapi-types.c
GEN qapi-visit.c
GEN qapi-event.c
CC qapi/qapi-visit-core.o
CC qapi/qapi-dealloc-visitor.o
CC qapi/qmp-input-visitor.o
CC qapi/qmp-output-visitor.o
CC qapi/qmp-registry.o
CC qapi/qmp-dispatch.o
CC qapi/string-input-visitor.o
CC qapi/string-output-visitor.o
CC qapi/opts-visitor.o
CC qapi/qapi-clone-visitor.o
CC qapi/qmp-event.o
CC qapi/qapi-util.o
CC qobject/qnull.o
CC qobject/qint.o
CC qobject/qstring.o
CC qobject/qdict.o
CC qobject/qlist.o
CC qobject/qfloat.o
CC qobject/qbool.o
CC qobject/qjson.o
CC qobject/qobject.o
CC qobject/json-lexer.o
CC qobject/json-streamer.o
CC qobject/json-parser.o
GEN trace/generated-events.c
CC trace/simple.o
GEN trace/generated-tracers.c
CC trace/control.o
CC trace/qmp.o
CC util/osdep.o
CC util/cutils.o
CC util/unicode.o
CC util/qemu-timer-common.o
CC util/event_notifier-win32.o
CC util/oslib-win32.o
CC util/qemu-thread-win32.o
CC util/envlist.o
CC util/path.o
CC util/module.o
CC util/bitmap.o
CC util/bitops.o
CC util/hbitmap.o
CC util/fifo8.o
CC util/acl.o
CC util/error.o
CC util/qemu-error.o
CC util/id.o
CC util/iov.o
CC util/qemu-config.o
CC util/qemu-sockets.o
CC util/uri.o
CC util/notify.o
CC util/qemu-option.o
CC util/qemu-progress.o
CC util/hexdump.o
CC util/crc32c.o
CC util/throttle.o
CC util/getauxval.o
CC util/readline.o
CC util/rfifolock.o
CC util/rcu.o
CC util/qemu-coroutine.o
CC util/qemu-coroutine-lock.o
CC util/qemu-coroutine-io.o
CC util/qemu-coroutine-sleep.o
CC util/coroutine-win32.o
CC util/buffer.o
CC util/timed-average.o
CC util/base64.o
CC util/log.o
CC util/qdist.o
CC util/qht.o
CC util/range.o
CC crypto/pbkdf-stub.o
CC stubs/arch-query-cpu-def.o
CC stubs/bdrv-next-monitor-owned.o
CC stubs/blk-commit-all.o
CC stubs/blockdev-close-all-bdrv-states.o
CC stubs/clock-warp.o
CC stubs/cpu-get-clock.o
CC stubs/cpu-get-icount.o
CC stubs/dump.o
CC stubs/fdset-add-fd.o
CC stubs/fdset-find-fd.o
CC stubs/fdset-get-fd.o
CC stubs/fdset-remove-fd.o
CC stubs/gdbstub.o
CC stubs/get-fd.o
CC stubs/get-next-serial.o
CC stubs/get-vm-name.o
CC stubs/iothread-lock.o
CC stubs/is-daemonized.o
CC stubs/machine-init-done.o
CC stubs/migr-blocker.o
CC stubs/mon-is-qmp.o
CC stubs/mon-printf.o
CC stubs/monitor-init.o
CC stubs/notify-event.o
CC stubs/qtest.o
CC stubs/replay.o
CC stubs/replay-user.o
CC stubs/reset.o
CC stubs/runstate-check.o
CC stubs/set-fd-handler.o
CC stubs/slirp.o
CC stubs/sysbus.o
CC stubs/trace-control.o
CC stubs/uuid.o
CC stubs/vm-stop.o
CC stubs/vmstate.o
CC stubs/fd-register.o
CC stubs/cpus.o
CC stubs/kvm.o
CC stubs/qmp_pc_dimm_device_list.o
CC stubs/target-monitor-defs.o
CC stubs/target-get-monitor-def.o
CC stubs/vhost.o
CC stubs/iohandler.o
CC stubs/smbios_type_38.o
CC stubs/ipmi.o
CC stubs/pc_madt_cpu_entry.o
GEN qemu-img-cmds.h
CC async.o
CC thread-pool.o
CC block.o
CC blockjob.o
CC main-loop.o
CC iohandler.o
CC qemu-timer.o
CC aio-win32.o
CC qemu-io-cmds.o
CC block/raw_bsd.o
CC block/qcow.o
CC block/vdi.o
CC block/vmdk.o
CC block/cloop.o
CC block/bochs.o
CC block/vpc.o
CC block/vvfat.o
CC block/qcow2.o
CC block/qcow2-refcount.o
CC block/qcow2-cluster.o
CC block/qcow2-snapshot.o
CC block/qcow2-cache.o
CC block/qed.o
CC block/qed-gencb.o
CC block/qed-l2-cache.o
CC block/qed-table.o
CC block/qed-cluster.o
CC block/qed-check.o
CC block/quorum.o
CC block/parallels.o
CC block/blkdebug.o
CC block/blkverify.o
CC block/blkreplay.o
CC block/block-backend.o
CC block/snapshot.o
CC block/qapi.o
CC block/raw-win32.o
CC block/win32-aio.o
CC block/null.o
CC block/mirror.o
CC block/commit.o
CC block/io.o
CC block/throttle-groups.o
CC block/nbd.o
CC block/nbd-client.o
CC block/sheepdog.o
CC block/accounting.o
CC block/dirty-bitmap.o
CC block/write-threshold.o
CC block/crypto.o
CC nbd/server.o
CC nbd/client.o
CC nbd/common.o
CC block/curl.o
CC block/ssh.o
CC block/dmg.o
CC crypto/init.o
CC crypto/hash.o
CC crypto/hash-nettle.o
CC crypto/aes.o
CC crypto/desrfb.o
CC crypto/cipher.o
CC crypto/tlscreds.o
CC crypto/tlscredsanon.o
CC crypto/tlscredsx509.o
CC crypto/tlssession.o
CC crypto/secret.o
CC crypto/random-gnutls.o
CC crypto/pbkdf.o
CC crypto/pbkdf-nettle.o
CC crypto/ivgen.o
CC crypto/ivgen-essiv.o
CC crypto/ivgen-plain.o
CC crypto/ivgen-plain64.o
CC crypto/afsplit.o
CC crypto/xts.o
CC crypto/block.o
CC crypto/block-qcow.o
CC crypto/block-luks.o
CC io/channel.o
CC io/channel-buffer.o
CC io/channel-command.o
CC io/channel-file.o
CC io/channel-socket.o
CC io/channel-tls.o
CC io/channel-websock.o
CC io/channel-watch.o
CC io/channel-util.o
CC io/task.o
CC qom/object.o
CC qom/container.o
CC qom/qom-qobject.o
CC qom/object_interfaces.o
CC qemu-io.o
CC blockdev.o
CC blockdev-nbd.o
CC iothread.o
CC qdev-monitor.o
CC device-hotplug.o
CC os-win32.o
CC qemu-char.o
CC page_cache.o
CC accel.o
CC bt-host.o
CC bt-vhci.o
CC dma-helpers.o
CC vl.o
CC tpm.o
CC device_tree.o
GEN qmp-marshal.c
CC qmp.o
CC hmp.o
CC tcg-runtime.o
CC audio/audio.o
CC audio/noaudio.o
CC audio/wavaudio.o
CC audio/mixeng.o
CC audio/sdlaudio.o
CC audio/dsoundaudio.o
CC audio/audio_win_int.o
CC audio/wavcapture.o
CC backends/rng.o
CC backends/msmouse.o
CC backends/rng-egd.o
CC backends/testdev.o
CC backends/tpm.o
CC backends/hostmem.o
CC backends/hostmem-ram.o
CC block/stream.o
CC block/backup.o
CC disas/arm.o
CXX disas/arm-a64.o
CC disas/i386.o
CXX disas/libvixl/vixl/utils.o
CXX disas/libvixl/vixl/a64/instructions-a64.o
CXX disas/libvixl/vixl/compiler-intrinsics.o
CXX disas/libvixl/vixl/a64/decoder-a64.o
CXX disas/libvixl/vixl/a64/disasm-a64.o
CC hw/acpi/core.o
CC hw/acpi/piix4.o
CC hw/acpi/pcihp.o
CC hw/acpi/ich9.o
CC hw/acpi/tco.o
CC hw/acpi/cpu_hotplug.o
CC hw/acpi/memory_hotplug.o
CC hw/acpi/memory_hotplug_acpi_table.o
CC hw/acpi/cpu.o
CC hw/acpi/acpi_interface.o
CC hw/acpi/bios-linker-loader.o
CC hw/acpi/aml-build.o
CC hw/acpi/ipmi.o
CC hw/audio/sb16.o
CC hw/audio/es1370.o
CC hw/audio/ac97.o
CC hw/audio/fmopl.o
CC hw/audio/adlib.o
CC hw/audio/gus.o
CC hw/audio/gusemu_hal.o
CC hw/audio/gusemu_mixer.o
CC hw/audio/cs4231a.o
CC hw/audio/intel-hda.o
CC hw/audio/hda-codec.o
CC hw/audio/pcspk.o
CC hw/audio/wm8750.o
CC hw/audio/pl041.o
CC hw/audio/lm4549.o
CC hw/audio/marvell_88w8618.o
CC hw/block/block.o
CC hw/block/cdrom.o
CC hw/block/hd-geometry.o
CC hw/block/fdc.o
CC hw/block/m25p80.o
CC hw/block/nand.o
CC hw/block/pflash_cfi01.o
CC hw/block/pflash_cfi02.o
CC hw/block/ecc.o
CC hw/block/onenand.o
CC hw/block/nvme.o
CC hw/bt/core.o
CC hw/bt/l2cap.o
CC hw/bt/sdp.o
CC hw/bt/hci.o
CC hw/bt/hid.o
CC hw/bt/hci-csr.o
CC hw/char/ipoctal232.o
CC hw/char/parallel.o
CC hw/char/pl011.o
CC hw/char/serial.o
CC hw/char/serial-isa.o
CC hw/char/serial-pci.o
CC hw/char/virtio-console.o
CC hw/char/cadence_uart.o
CC hw/char/debugcon.o
CC hw/char/imx_serial.o
CC hw/core/qdev.o
CC hw/core/qdev-properties.o
CC hw/core/bus.o
CC hw/core/fw-path-provider.o
CC hw/core/irq.o
CC hw/core/hotplug.o
CC hw/core/ptimer.o
CC hw/core/sysbus.o
CC hw/core/machine.o
CC hw/core/null-machine.o
CC hw/core/loader.o
CC hw/core/qdev-properties-system.o
CC hw/core/register.o
CC hw/core/platform-bus.o
CC hw/display/ads7846.o
CC hw/display/cirrus_vga.o
CC hw/display/pl110.o
CC hw/display/ssd0303.o
CC hw/display/ssd0323.o
CC hw/display/vga-pci.o
CC hw/display/vga-isa.o
CC hw/display/vmware_vga.o
CC hw/display/blizzard.o
CC hw/display/exynos4210_fimd.o
CC hw/display/framebuffer.o
CC hw/display/tc6393xb.o
CC hw/dma/pl080.o
CC hw/dma/pl330.o
CC hw/dma/i8257.o
CC hw/dma/xlnx-zynq-devcfg.o
CC hw/gpio/max7310.o
CC hw/gpio/pl061.o
CC hw/gpio/zaurus.o
CC hw/gpio/gpio_key.o
CC hw/i2c/core.o
CC hw/i2c/smbus.o
CC hw/i2c/smbus_eeprom.o
CC hw/i2c/i2c-ddc.o
CC hw/i2c/versatile_i2c.o
CC hw/i2c/smbus_ich9.o
CC hw/i2c/pm_smbus.o
CC hw/i2c/bitbang_i2c.o
CC hw/i2c/exynos4210_i2c.o
CC hw/i2c/imx_i2c.o
CC hw/i2c/aspeed_i2c.o
CC hw/ide/core.o
CC hw/ide/atapi.o
CC hw/ide/qdev.o
CC hw/ide/pci.o
CC hw/ide/isa.o
CC hw/ide/piix.o
CC hw/ide/microdrive.o
CC hw/ide/ahci.o
CC hw/ide/ich.o
CC hw/input/hid.o
CC hw/input/lm832x.o
CC hw/input/pckbd.o
CC hw/input/pl050.o
CC hw/input/ps2.o
CC hw/input/stellaris_input.o
CC hw/input/tsc2005.o
CC hw/input/vmmouse.o
CC hw/input/virtio-input.o
CC hw/input/virtio-input-hid.o
CC hw/intc/i8259_common.o
CC hw/intc/i8259.o
CC hw/intc/pl190.o
CC hw/intc/imx_avic.o
CC hw/intc/realview_gic.o
CC hw/intc/ioapic_common.o
CC hw/intc/arm_gic_common.o
CC hw/intc/arm_gic.o
CC hw/intc/arm_gicv2m.o
CC hw/intc/arm_gicv3_common.o
CC hw/intc/arm_gicv3.o
CC hw/intc/arm_gicv3_dist.o
CC hw/intc/arm_gicv3_redist.o
CC hw/ipack/ipack.o
CC hw/ipack/tpci200.o
CC hw/ipmi/ipmi.o
CC hw/ipmi/ipmi_bmc_sim.o
CC hw/ipmi/ipmi_bmc_extern.o
CC hw/ipmi/isa_ipmi_kcs.o
CC hw/ipmi/isa_ipmi_bt.o
CC hw/isa/isa-bus.o
CC hw/isa/apm.o
CC hw/mem/pc-dimm.o
CC hw/mem/nvdimm.o
CC hw/misc/applesmc.o
CC hw/misc/max111x.o
CC hw/misc/tmp105.o
CC hw/misc/sga.o
CC hw/misc/debugexit.o
CC hw/misc/pc-testdev.o
CC hw/misc/pci-testdev.o
CC hw/misc/arm_l2x0.o
CC hw/misc/arm_integrator_debug.o
CC hw/misc/a9scu.o
CC hw/misc/arm11scu.o
CC hw/net/ne2000.o
CC hw/net/eepro100.o
CC hw/net/pcnet-pci.o
CC hw/net/pcnet.o
CC hw/net/e1000.o
CC hw/net/e1000x_common.o
CC hw/net/net_tx_pkt.o
CC hw/net/net_rx_pkt.o
CC hw/net/e1000e.o
CC hw/net/e1000e_core.o
CC hw/net/rtl8139.o
CC hw/net/vmxnet3.o
CC hw/net/smc91c111.o
CC hw/net/lan9118.o
CC hw/net/ne2000-isa.o
CC hw/net/xgmac.o
CC hw/net/allwinner_emac.o
CC hw/net/imx_fec.o
CC hw/net/cadence_gem.o
CC hw/net/stellaris_enet.o
CC hw/net/rocker/rocker.o
CC hw/net/rocker/rocker_fp.o
CC hw/net/rocker/rocker_desc.o
CC hw/net/rocker/rocker_world.o
CC hw/net/rocker/rocker_of_dpa.o
CC hw/nvram/eeprom93xx.o
CC hw/nvram/fw_cfg.o
CC hw/pci-bridge/pci_bridge_dev.o
CC hw/pci-bridge/pci_expander_bridge.o
CC hw/pci-bridge/xio3130_upstream.o
CC hw/pci-bridge/xio3130_downstream.o
CC hw/pci-bridge/ioh3420.o
CC hw/pci-bridge/i82801b11.o
CC hw/pci-host/pam.o
CC hw/pci-host/versatile.o
CC hw/pci-host/piix.o
CC hw/pci-host/q35.o
CC hw/pci-host/gpex.o
CC hw/pci/pci.o
CC hw/pci/pci_bridge.o
CC hw/pci/msix.o
CC hw/pci/msi.o
CC hw/pci/shpc.o
CC hw/pci/slotid_cap.o
CC hw/pci/pci_host.o
CC hw/pci/pcie_host.o
CC hw/pci/pcie.o
CC hw/pci/pcie_aer.o
CC hw/pci/pcie_port.o
CC hw/pci/pci-stub.o
CC hw/pcmcia/pcmcia.o
CC hw/scsi/scsi-disk.o
CC hw/scsi/scsi-generic.o
CC hw/scsi/scsi-bus.o
CC hw/scsi/lsi53c895a.o
CC hw/scsi/mptsas.o
CC hw/scsi/mptconfig.o
CC hw/scsi/mptendian.o
CC hw/scsi/megasas.o
CC hw/scsi/vmw_pvscsi.o
CC hw/scsi/esp.o
CC hw/scsi/esp-pci.o
CC hw/sd/pl181.o
CC hw/sd/ssi-sd.o
CC hw/sd/sd.o
CC hw/sd/core.o
CC hw/sd/sdhci.o
CC hw/smbios/smbios.o
CC hw/smbios/smbios_type_38.o
CC hw/ssi/pl022.o
CC hw/ssi/ssi.o
CC hw/ssi/xilinx_spips.o
CC hw/ssi/aspeed_smc.o
CC hw/timer/arm_timer.o
CC hw/timer/arm_mptimer.o
CC hw/timer/a9gtimer.o
CC hw/timer/cadence_ttc.o
CC hw/timer/ds1338.o
CC hw/timer/hpet.o
CC hw/timer/i8254_common.o
CC hw/timer/i8254.o
CC hw/timer/pl031.o
CC hw/timer/twl92230.o
CC hw/timer/imx_epit.o
CC hw/timer/imx_gpt.o
CC hw/timer/stm32f2xx_timer.o
CC hw/timer/aspeed_timer.o
CC hw/tpm/tpm_tis.o
CC hw/usb/core.o
CC hw/usb/combined-packet.o
CC hw/usb/bus.o
CC hw/usb/libhw.o
CC hw/usb/desc.o
CC hw/usb/desc-msos.o
CC hw/usb/hcd-uhci.o
CC hw/usb/hcd-ohci.o
CC hw/usb/hcd-ehci.o
CC hw/usb/hcd-ehci-pci.o
CC hw/usb/hcd-ehci-sysbus.o
CC hw/usb/hcd-xhci.o
CC hw/usb/hcd-musb.o
CC hw/usb/dev-hub.o
CC hw/usb/dev-hid.o
CC hw/usb/dev-wacom.o
CC hw/usb/dev-storage.o
CC hw/usb/dev-uas.o
CC hw/usb/dev-audio.o
CC hw/usb/dev-serial.o
CC hw/usb/dev-network.o
CC hw/usb/dev-bluetooth.o
CC hw/usb/dev-smartcard-reader.o
CC hw/usb/host-stub.o
CC hw/virtio/virtio-rng.o
CC hw/virtio/virtio-pci.o
CC hw/virtio/virtio-bus.o
CC hw/virtio/virtio-mmio.o
CC hw/watchdog/watchdog.o
CC hw/watchdog/wdt_i6300esb.o
CC hw/watchdog/wdt_ib700.o
CC migration/migration.o
CC migration/socket.o
CC migration/fd.o
CC migration/exec.o
CC migration/tls.o
CC migration/vmstate.o
CC migration/qemu-file.o
CC migration/qemu-file-channel.o
CC migration/xbzrle.o
CC migration/postcopy-ram.o
CC migration/qjson.o
CC migration/block.o
CC net/net.o
CC net/queue.o
CC net/checksum.o
CC net/util.o
CC net/hub.o
CC net/socket.o
CC net/dump.o
CC net/eth.o
CC net/tap-win32.o
CC net/slirp.o
CC net/filter.o
CC net/filter-buffer.o
CC net/filter-mirror.o
CC net/colo-compare.o
CC net/colo.o
CC net/filter-rewriter.o
CC qom/cpu.o
CC replay/replay.o
CC replay/replay-internal.o
CC replay/replay-events.o
CC replay/replay-time.o
CC replay/replay-input.o
CC replay/replay-char.o
CC slirp/cksum.o
CC slirp/if.o
CC slirp/ip_icmp.o
CC slirp/ip6_icmp.o
CC slirp/ip6_input.o
CC slirp/ip6_output.o
CC slirp/ip_input.o
CC slirp/ip_output.o
CC slirp/dnssearch.o
CC slirp/dhcpv6.o
CC slirp/slirp.o
CC slirp/mbuf.o
CC slirp/misc.o
CC slirp/sbuf.o
CC slirp/socket.o
CC slirp/tcp_input.o
/tmp/qemu-test/src/net/colo.c: In function 'fill_connection_key':
/tmp/qemu-test/src/net/colo.c:94:10: error: 'IPPROTO_DCCP' undeclared (first use in this function)
case IPPROTO_DCCP:
^
/tmp/qemu-test/src/net/colo.c:94:10: note: each undeclared identifier is reported only once for each function it appears in
/tmp/qemu-test/src/net/colo.c:96:10: error: 'IPPROTO_SCTP' undeclared (first use in this function)
case IPPROTO_SCTP:
^
/tmp/qemu-test/src/net/colo.c:97:10: error: 'IPPROTO_UDPLITE' undeclared (first use in this function)
case IPPROTO_UDPLITE:
^
/tmp/qemu-test/src/rules.mak:59: recipe for target 'net/colo.o' failed
make: *** [net/colo.o] Error 1
make: *** Waiting for unfinished jobs....
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1104:74: error: expected '{' before ')' token
void _simple_trace_usb_host_attach_kernel(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1104:65: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_attach_kernel(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1108:74: error: expected '{' before ',' token
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1108:65: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1110:78: error: expected '{' before ')' token
void _simple_trace_usb_host_release_interface(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1110:69: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_release_interface(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9517:80: error: expected '{' before ')' token
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9517:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_attach_kernel':
./trace/generated-tracers.h:9517:80: error: parameter name omitted
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9524:80: error: expected '{' before ')' token
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9524:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_detach_kernel':
./trace/generated-tracers.h:9524:80: error: parameter name omitted
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9527:9: error: implicit declaration of function '_simple_trace_usb_host_detach_kernel' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_detach_kernel(bus, addr, interface);
^
./trace/generated-tracers.h:9527:9: error: nested extern declaration of '_simple_trace_usb_host_detach_kernel' [-Werror=nested-externs]
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9545:80: error: expected '{' before ',' token
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9545:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_set_interface':
./trace/generated-tracers.h:9545:80: error: parameter name omitted
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9548:9: error: too few arguments to function '_simple_trace_usb_host_set_interface'
_simple_trace_usb_host_set_interface(bus, addr, interface, alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:1108:6: note: declared here
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9552:94: error: expected '{' before ')' token
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9552:85: error: two or more data types in declaration specifiers
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_claim_interface':
./trace/generated-tracers.h:9552:94: error: parameter name omitted
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9555:9: error: implicit declaration of function '_simple_trace_usb_host_claim_interface' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_claim_interface(bus, addr, config, interface);
^
./trace/generated-tracers.h:9555:9: error: nested extern declaration of '_simple_trace_usb_host_claim_interface' [-Werror=nested-externs]
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9559:84: error: expected '{' before ')' token
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h:9559:75: error: two or more data types in declaration specifiers
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_release_interface':
./trace/generated-tracers.h:9559:84: error: parameter name omitted
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/colo-compare.c:31:
./trace/generated-tracers.h: In function 'trace_usb_host_req_control':
./trace/generated-tracers.h:9569:9: error: implicit declaration of function '_simple_trace_usb_host_req_control' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_req_control(bus, addr, p, req, value, index);
^
./trace/generated-tracers.h:9569:9: error: nested extern declaration of '_simple_trace_usb_host_req_control' [-Werror=nested-externs]
/tmp/qemu-test/src/net/colo-compare.c: In function 'packet_enqueue':
/tmp/qemu-test/src/net/colo-compare.c:113:25: error: missing braces around initializer [-Werror=missing-braces]
ConnectionKey key = {{ 0 } };
^
/tmp/qemu-test/src/net/colo-compare.c:113:25: note: (near initialization for 'key')
/tmp/qemu-test/src/net/colo-compare.c: In function 'colo_packet_compare_tcp':
/tmp/qemu-test/src/net/colo-compare.c:223:24: error: format '%u' expects argument of type 'unsigned int', but argument 6 has type 'u_long {aka long unsigned int}' [-Werror=format=]
fprintf(stderr, "%s: src/dst: %s/%s p: seq/ack=%u/%u"
^
/tmp/qemu-test/src/net/colo-compare.c:223:24: error: format '%u' expects argument of type 'unsigned int', but argument 7 has type 'u_long {aka long unsigned int}' [-Werror=format=]
/tmp/qemu-test/src/net/colo-compare.c:223:24: error: format '%u' expects argument of type 'unsigned int', but argument 8 has type 'u_long {aka long unsigned int}' [-Werror=format=]
/tmp/qemu-test/src/net/colo-compare.c:223:24: error: format '%u' expects argument of type 'unsigned int', but argument 9 has type 'u_long {aka long unsigned int}' [-Werror=format=]
/tmp/qemu-test/src/net/colo-compare.c: In function 'colo_compare_finalize':
/tmp/qemu-test/src/net/colo-compare.c:740:18: error: 'QemuThread {aka struct QemuThread}' has no member named 'thread'
if (s->thread.thread) {
^
cc1: all warnings being treated as errors
/tmp/qemu-test/src/rules.mak:59: recipe for target 'net/colo-compare.o' failed
make: *** [net/colo-compare.o] Error 1
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1104:74: error: expected '{' before ')' token
void _simple_trace_usb_host_attach_kernel(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1104:65: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_attach_kernel(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1108:74: error: expected '{' before ',' token
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1108:65: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1110:78: error: expected '{' before ')' token
void _simple_trace_usb_host_release_interface(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1110:69: error: two or more data types in declaration specifiers
void _simple_trace_usb_host_release_interface(int bus, int addr, int interface);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9517:80: error: expected '{' before ')' token
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9517:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_attach_kernel':
./trace/generated-tracers.h:9517:80: error: parameter name omitted
static inline void trace_usb_host_attach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9524:80: error: expected '{' before ')' token
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9524:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_detach_kernel':
./trace/generated-tracers.h:9524:80: error: parameter name omitted
static inline void trace_usb_host_detach_kernel(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9527:9: error: implicit declaration of function '_simple_trace_usb_host_detach_kernel' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_detach_kernel(bus, addr, interface);
^
./trace/generated-tracers.h:9527:9: error: nested extern declaration of '_simple_trace_usb_host_detach_kernel' [-Werror=nested-externs]
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9545:80: error: expected '{' before ',' token
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9545:71: error: two or more data types in declaration specifiers
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_set_interface':
./trace/generated-tracers.h:9545:80: error: parameter name omitted
static inline void trace_usb_host_set_interface(int bus, int addr, int interface, int alt)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9548:9: error: too few arguments to function '_simple_trace_usb_host_set_interface'
_simple_trace_usb_host_set_interface(bus, addr, interface, alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:1108:6: note: declared here
void _simple_trace_usb_host_set_interface(int bus, int addr, int interface, int alt);
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9552:94: error: expected '{' before ')' token
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9552:85: error: two or more data types in declaration specifiers
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_claim_interface':
./trace/generated-tracers.h:9552:94: error: parameter name omitted
static inline void trace_usb_host_claim_interface(int bus, int addr, int config, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9555:9: error: implicit declaration of function '_simple_trace_usb_host_claim_interface' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_claim_interface(bus, addr, config, interface);
^
./trace/generated-tracers.h:9555:9: error: nested extern declaration of '_simple_trace_usb_host_claim_interface' [-Werror=nested-externs]
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: At top level:
./trace/generated-tracers.h:9559:84: error: expected '{' before ')' token
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h:9559:75: error: two or more data types in declaration specifiers
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_release_interface':
./trace/generated-tracers.h:9559:84: error: parameter name omitted
static inline void trace_usb_host_release_interface(int bus, int addr, int interface)
^
In file included from /tmp/qemu-test/src/include/trace.h:4:0,
from /tmp/qemu-test/src/net/filter-rewriter.c:24:
./trace/generated-tracers.h: In function 'trace_usb_host_req_control':
./trace/generated-tracers.h:9569:9: error: implicit declaration of function '_simple_trace_usb_host_req_control' [-Werror=implicit-function-declaration]
_simple_trace_usb_host_req_control(bus, addr, p, req, value, index);
^
./trace/generated-tracers.h:9569:9: error: nested extern declaration of '_simple_trace_usb_host_req_control' [-Werror=nested-externs]
/tmp/qemu-test/src/net/filter-rewriter.c: In function 'colo_rewriter_receive_iov':
/tmp/qemu-test/src/net/filter-rewriter.c:163:25: error: missing braces around initializer [-Werror=missing-braces]
ConnectionKey key = {{ 0 } };
^
/tmp/qemu-test/src/net/filter-rewriter.c:163:25: note: (near initialization for 'key')
cc1: all warnings being treated as errors
/tmp/qemu-test/src/rules.mak:59: recipe for target 'net/filter-rewriter.o' failed
make: *** [net/filter-rewriter.o] Error 1
tests/docker/Makefile.include:104: recipe for target 'docker-run-test-mingw@fedora' failed
make: *** [docker-run-test-mingw@fedora] Error 1
=== OUTPUT END ===
Test command exited with code: 2
---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet Zhang Chen
@ 2016-09-06 7:51 ` Jason Wang
2016-09-06 7:55 ` Zhang Chen
0 siblings, 1 reply; 19+ messages in thread
From: Jason Wang @ 2016-09-06 7:51 UTC (permalink / raw)
To: Zhang Chen, qemu devel
Cc: Li Zhijian, Wen Congyang, zhanghailiang, eddie . dong,
Dr . David Alan Gilbert
On 2016年09月05日 17:37, Zhang Chen wrote:
> In this patch we use kernel jhash table to track
> connection, and then enqueue net packet like this:
>
> + CompareState ++
> | |
> +---------------+ +---------------+ +---------------+
> |conn list +--->conn +--------->conn |
> +---------------+ +---------------+ +---------------+
> | | | | | |
> +---------------+ +---v----+ +---v----+ +---v----+ +---v----+
> |primary | |secondary |primary | |secondary
> |packet | |packet + |packet | |packet +
> +--------+ +--------+ +--------+ +--------+
> | | | |
> +---v----+ +---v----+ +---v----+ +---v----+
> |primary | |secondary |primary | |secondary
> |packet | |packet + |packet | |packet +
> +--------+ +--------+ +--------+ +--------+
> | | | |
> +---v----+ +---v----+ +---v----+ +---v----+
> |primary | |secondary |primary | |secondary
> |packet | |packet + |packet | |packet +
> +--------+ +--------+ +--------+ +--------+
>
> We use conn_list to record connection info.
> When we want to enqueue a packet, firstly get the
> connection from connection_track_table. then push
> the packet to g_queue(pri/sec) in it's own conn.
>
> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
> ---
> net/colo-compare.c | 51 ++++++++++++++++++++-----
> net/colo.c | 108 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> net/colo.h | 27 ++++++++++++++
> 3 files changed, 176 insertions(+), 10 deletions(-)
>
> diff --git a/net/colo-compare.c b/net/colo-compare.c
> index d642ad4..42fc354 100644
> --- a/net/colo-compare.c
> +++ b/net/colo-compare.c
> @@ -70,6 +70,11 @@ typedef struct CompareState {
> SocketReadState pri_rs;
> SocketReadState sec_rs;
>
> + /* connection list: the connections belonged to this NIC could be found
> + * in this list.
> + * element type: Connection
> + */
> + GQueue conn_list;
> /* hashtable to save connection */
> GHashTable *connection_track_table;
> } CompareState;
> @@ -97,7 +102,9 @@ static int compare_chr_send(CharDriverState *out,
> */
> static int packet_enqueue(CompareState *s, int mode)
> {
> + ConnectionKey key = {{ 0 } };
> Packet *pkt = NULL;
> + Connection *conn;
>
> if (mode == PRIMARY_IN) {
> pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len);
> @@ -110,17 +117,34 @@ static int packet_enqueue(CompareState *s, int mode)
> pkt = NULL;
> return -1;
> }
> - /* TODO: get connection key from pkt */
> + fill_connection_key(pkt, &key);
>
> - /*
> - * TODO: use connection key get conn from
> - * connection_track_table
> - */
> + conn = connection_get(s->connection_track_table,
> + &key,
> + &s->conn_list);
>
> - /*
> - * TODO: insert pkt to it's conn->primary_list
> - * or conn->secondary_list
> - */
> + if (!conn->processing) {
> + g_queue_push_tail(&s->conn_list, conn);
> + conn->processing = true;
> + }
> +
> + if (mode == PRIMARY_IN) {
> + if (g_queue_get_length(&conn->primary_list) <=
> + MAX_QUEUE_SIZE) {
> + g_queue_push_tail(&conn->primary_list, pkt);
> + } else {
> + error_report("colo compare primary queue size too big,"
> + "drop packet");
> + }
> + } else {
> + if (g_queue_get_length(&conn->secondary_list) <
> + MAX_QUEUE_SIZE) {
<= ?
[...]
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet
2016-09-06 7:51 ` Jason Wang
@ 2016-09-06 7:55 ` Zhang Chen
0 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-06 7:55 UTC (permalink / raw)
To: Jason Wang, qemu devel
Cc: Li Zhijian, Wen Congyang, zhanghailiang, eddie . dong,
Dr . David Alan Gilbert
On 09/06/2016 03:51 PM, Jason Wang wrote:
>
>
> On 2016年09月05日 17:37, Zhang Chen wrote:
>> In this patch we use kernel jhash table to track
>> connection, and then enqueue net packet like this:
>>
>> + CompareState ++
>> | |
>> +---------------+ +---------------+ +---------------+
>> |conn list +--->conn +--------->conn |
>> +---------------+ +---------------+ +---------------+
>> | | | | | |
>> +---------------+ +---v----+ +---v----+ +---v----+ +---v----+
>> |primary | |secondary |primary | |secondary
>> |packet | |packet + |packet | |packet +
>> +--------+ +--------+ +--------+ +--------+
>> | | | |
>> +---v----+ +---v----+ +---v----+ +---v----+
>> |primary | |secondary |primary | |secondary
>> |packet | |packet + |packet | |packet +
>> +--------+ +--------+ +--------+ +--------+
>> | | | |
>> +---v----+ +---v----+ +---v----+ +---v----+
>> |primary | |secondary |primary | |secondary
>> |packet | |packet + |packet | |packet +
>> +--------+ +--------+ +--------+ +--------+
>>
>> We use conn_list to record connection info.
>> When we want to enqueue a packet, firstly get the
>> connection from connection_track_table. then push
>> the packet to g_queue(pri/sec) in it's own conn.
>>
>> Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
>> Signed-off-by: Li Zhijian <lizhijian@cn.fujitsu.com>
>> Signed-off-by: Wen Congyang <wency@cn.fujitsu.com>
>> ---
>> net/colo-compare.c | 51 ++++++++++++++++++++-----
>> net/colo.c | 108
>> +++++++++++++++++++++++++++++++++++++++++++++++++++++
>> net/colo.h | 27 ++++++++++++++
>> 3 files changed, 176 insertions(+), 10 deletions(-)
>>
>> diff --git a/net/colo-compare.c b/net/colo-compare.c
>> index d642ad4..42fc354 100644
>> --- a/net/colo-compare.c
>> +++ b/net/colo-compare.c
>> @@ -70,6 +70,11 @@ typedef struct CompareState {
>> SocketReadState pri_rs;
>> SocketReadState sec_rs;
>> + /* connection list: the connections belonged to this NIC could
>> be found
>> + * in this list.
>> + * element type: Connection
>> + */
>> + GQueue conn_list;
>> /* hashtable to save connection */
>> GHashTable *connection_track_table;
>> } CompareState;
>> @@ -97,7 +102,9 @@ static int compare_chr_send(CharDriverState *out,
>> */
>> static int packet_enqueue(CompareState *s, int mode)
>> {
>> + ConnectionKey key = {{ 0 } };
>> Packet *pkt = NULL;
>> + Connection *conn;
>> if (mode == PRIMARY_IN) {
>> pkt = packet_new(s->pri_rs.buf, s->pri_rs.packet_len);
>> @@ -110,17 +117,34 @@ static int packet_enqueue(CompareState *s, int
>> mode)
>> pkt = NULL;
>> return -1;
>> }
>> - /* TODO: get connection key from pkt */
>> + fill_connection_key(pkt, &key);
>> - /*
>> - * TODO: use connection key get conn from
>> - * connection_track_table
>> - */
>> + conn = connection_get(s->connection_track_table,
>> + &key,
>> + &s->conn_list);
>> - /*
>> - * TODO: insert pkt to it's conn->primary_list
>> - * or conn->secondary_list
>> - */
>> + if (!conn->processing) {
>> + g_queue_push_tail(&s->conn_list, conn);
>> + conn->processing = true;
>> + }
>> +
>> + if (mode == PRIMARY_IN) {
>> + if (g_queue_get_length(&conn->primary_list) <=
>> + MAX_QUEUE_SIZE) {
>> + g_queue_push_tail(&conn->primary_list, pkt);
>> + } else {
>> + error_report("colo compare primary queue size too big,"
>> + "drop packet");
>> + }
>> + } else {
>> + if (g_queue_get_length(&conn->secondary_list) <
>> + MAX_QUEUE_SIZE) {
>
> <= ?
>
> [...]
>
Oh, I miss this... will fix it in next version.
Thanks
Zhang Chen
>
>
> .
>
--
Thanks
zhangchen
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
` (13 preceding siblings ...)
2016-09-05 10:35 ` no-reply
@ 2016-09-06 8:02 ` Jason Wang
2016-09-07 1:16 ` Zhang Chen
14 siblings, 1 reply; 19+ messages in thread
From: Jason Wang @ 2016-09-06 8:02 UTC (permalink / raw)
To: Zhang Chen, qemu devel
Cc: Li Zhijian, Wen Congyang, zhanghailiang, eddie . dong,
Dr . David Alan Gilbert
On 2016年09月05日 17:37, Zhang Chen wrote:
> COLO-proxy is a part of COLO project. COLO project is
> composed of COLO-frame, COLO-proxy and block-replication.
> It is used to compare the network package to help COLO
> decide whether to do checkpoint. With COLO-proxy's help,
> COLO greatly improves the performance.
>
> The filter-redirector, filter-mirror, colo-compare
> and filter-rewriter compose the COLO-proxy.
>
> COLO-compare
> It is used to compare the network package to help COLO decide
> whether to do checkpoint.
>
> Filter-rewriter
> It will rewrite some of secondary packet to make
> secondary guest's connection established successfully.
> In this module we will rewrite tcp packet's ack to the secondary
> from primary,and rewrite tcp packet's seq to the primary from
> secondary.
>
> The full version in this github:
> https://github.com/zhangckid/qemu/tree/colo-v2.7-proxy-mode-compare-and-rewriter-sep5
Look good, just find one minor issue. And please also:
- Fix the mingw build issue reported by the bot, you can test it through
docker test
- Move the doc patch to the end of series
Thanks
>
> v13:
> - add docs/colo-proxy.txt
> - add MAINTAINERS
> - remove unnecessary .h
> - remove QTAILQ_ENTRY(CompareState)
> - fix some comments
> - add find_and_check_chardev() to avoid code duplication
> - remove the "is_unix" in patch3
> - change error_report() to trace in patch4
> - use l2hdr_len here instead of ETH_HLEP
> - fix code style
> - remove colo_rm_connection()
> - remove hashtable_size
> - change g_queue_foreach() to g_queue_find_custom() in patch7
> - change trace_colo_compare_tcp_miscompare() to fprintf() in patch8
> - add codes not queue vlan packets
>
> v12:
> - add qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
> to this series as the first patch.
> - update COLO net ascii figure.
> - add chardev socket check.
> - fix some typo.
> - add some comments.
> - rename net/colo-base.c to net/colo.c
> - rename network/transport_layer to network/transport_header.
> - move the job that clear coon_list when hashtable_size oversize
> to connection_get.
> - reuse connection_destroy() do colo_rm_connection().
> - fix pkt mem leak in colo_compare_connection().
> (result be released in g_queue_remove(), so it were not leak)
> - rename thread_name "compare" to "colo-compare".
> - change icmp compare to memcmp().
>
> v11:
> - Make patch 5 to a independent patch series.
> [PATCH V3] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
> - For Jason's comments, merge filter-rewriter to this series.
> (patch 7,8,9)
> - Add reverse_connection_key()
> - remove conn_list in filter-rewriter
> - remove unprocessed_connections
> - add some comments
>
> v10:
> - fix typo
> - Should we make patch 5 independent with this series?
> This patch just add a API for qemu-char.
>
> v9:
> p5:
> - use chr_update_read_handler_full() replace
> the chr_update_read_handler()
> - use io_watch_poll_prepare_full() replace
> the io_watch_poll_prepare()
> - use io_watch_poll_funcs_full replace
> the io_watch_poll_funcs
> - avoid code duplication
>
> v8:
> p5:
> - add new patch:
> qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
>
> v7:
> p5:
> - add [PATCH]qemu-char: Fix context for g_source_attach()
> in this patch series.
>
> v6:
> p6:
> - add more commit log.
> - fix icmp comparison to compare all packet.
>
> p5:
> - add more cpmments in commit log.
> - change REGULAR_CHECK_MS to REGULAR_PACKET_CHECK_MS
> - make check old packet independent to compare thread
> - remove thread_status
>
> p4:
> - change this patch only about
> Connection and ConnectionKey.
> - add some comments in commit log.
> - remove mode in fill_connection_key().
> - fix some comments and bug.
> - move colo_conn_state to patch of
> "work with colo-frame"
> - remove conn_list_lock.
> - add MAX_QUEUE_SIZE, if primary_list or
> secondary_list biger than MAX_QUEUE_SIZE
> we will drop packet.
>
> p3:
> - add new independent kernel jhash patch.
>
> p2:
> - add new independent colo-base patch.
>
> p1:
> - add a ascii figure and some comments to explain it
> - move trace.h to p2
> - move QTAILQ_HEAD(, CompareState) net_compares to
> patch of "work with colo-frame"
> - add some comments in qemu-option.hx
>
>
> v5:
> p3:
> - comments from Jason
> we poll and handle chardev in comapre thread,
> Through this way, there's no need for extra
> synchronization with main loop
> this depend on another patch:
> qemu-char: Fix context for g_source_attach()
> - remove QemuEvent
> p2:
> - remove conn->list_lock
> p1:
> - move compare_pri/sec_chr_in to p3
> - move compare_chr_send to p2
>
> v4:
> p4:
> - add some comments
> - fix some trace-events
> - fix tcp compare error
> p3:
> - add rcu_read_lock().
> - fix trace name
> - fix jason's other comments
> - rebase some Dave's branch function
> p2:
> - colo_compare_connection() change g_queue_push_head() to
> - g_queue_push_tail() match to sorted order.
> - remove pkt->s
> - move data structure to colo-base.h
> - add colo-base.c reuse codes for filter-rewriter
> - add some filter-rewriter needs struct
> - depends on previous SocketReadState patch
> p1:
> - except move qemu_chr_add_handlers()
> to colo thread
> - remove class_finalize
> - remove secondary arp codes
> - depends on previous SocketReadState patch
>
> v3:
> - rebase colo-compare to colo-frame v2.7
> - fix most of Dave's comments
> (except RCU)
> - add TCP,UDP,ICMP and other packet comparison
> - add trace-event
> - add some comments
> - other bug fix
> - add RFC index
> - add usage in patch 1/4
>
> v2:
> - add jhash.h
>
> v1:
> - initial patch
>
>
> Zhang Chen (12):
> docs: Add documentation for COLO-proxy
> qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
> colo-compare: introduce colo compare initialization
> net/colo.c: add colo.c to define and handle packet
> Jhash: add linux kernel jhashtable in qemu
> colo-compare: track connection and enqueue packet
> colo-compare: introduce packet comparison thread
> colo-compare: add TCP,UDP,ICMP packet comparison
> filter-rewriter: introduce filter-rewriter initialization
> filter-rewriter: track connection and parse packet
> filter-rewriter: rewrite tcp packet to keep secondary connection
> MAINTAINERS: add maintainer for COLO-proxy
>
> MAINTAINERS | 9 +
> docs/colo-proxy.txt | 188 ++++++++++++
> include/qemu/jhash.h | 59 ++++
> include/sysemu/char.h | 11 +-
> net/Makefile.objs | 3 +
> net/colo-compare.c | 776 ++++++++++++++++++++++++++++++++++++++++++++++++++
> net/colo.c | 211 ++++++++++++++
> net/colo.h | 76 +++++
> net/filter-rewriter.c | 268 +++++++++++++++++
> qemu-char.c | 77 +++--
> qemu-options.hx | 52 ++++
> trace-events | 16 ++
> vl.c | 4 +-
> 13 files changed, 1724 insertions(+), 26 deletions(-)
> create mode 100644 docs/colo-proxy.txt
> create mode 100644 include/qemu/jhash.h
> create mode 100644 net/colo-compare.c
> create mode 100644 net/colo.c
> create mode 100644 net/colo.h
> create mode 100644 net/filter-rewriter.c
>
^ permalink raw reply [flat|nested] 19+ messages in thread
* Re: [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy
2016-09-06 8:02 ` Jason Wang
@ 2016-09-07 1:16 ` Zhang Chen
0 siblings, 0 replies; 19+ messages in thread
From: Zhang Chen @ 2016-09-07 1:16 UTC (permalink / raw)
To: Jason Wang, qemu devel
Cc: Li Zhijian, Wen Congyang, zhanghailiang, eddie . dong,
Dr . David Alan Gilbert
On 09/06/2016 04:02 PM, Jason Wang wrote:
>
>
> On 2016年09月05日 17:37, Zhang Chen wrote:
>> COLO-proxy is a part of COLO project. COLO project is
>> composed of COLO-frame, COLO-proxy and block-replication.
>> It is used to compare the network package to help COLO
>> decide whether to do checkpoint. With COLO-proxy's help,
>> COLO greatly improves the performance.
>>
>> The filter-redirector, filter-mirror, colo-compare
>> and filter-rewriter compose the COLO-proxy.
>>
>> COLO-compare
>> It is used to compare the network package to help COLO decide
>> whether to do checkpoint.
>>
>> Filter-rewriter
>> It will rewrite some of secondary packet to make
>> secondary guest's connection established successfully.
>> In this module we will rewrite tcp packet's ack to the secondary
>> from primary,and rewrite tcp packet's seq to the primary from
>> secondary.
>>
>> The full version in this github:
>> https://github.com/zhangckid/qemu/tree/colo-v2.7-proxy-mode-compare-and-rewriter-sep5
>>
>
> Look good, just find one minor issue. And please also:
>
> - Fix the mingw build issue reported by the bot, you can test it
> through docker test
> - Move the doc patch to the end of series
>
> Thanks
OK~~ I will fix this in next version.
Thanks
Zhang Chen
>
>>
>> v13:
>> - add docs/colo-proxy.txt
>> - add MAINTAINERS
>> - remove unnecessary .h
>> - remove QTAILQ_ENTRY(CompareState)
>> - fix some comments
>> - add find_and_check_chardev() to avoid code duplication
>> - remove the "is_unix" in patch3
>> - change error_report() to trace in patch4
>> - use l2hdr_len here instead of ETH_HLEP
>> - fix code style
>> - remove colo_rm_connection()
>> - remove hashtable_size
>> - change g_queue_foreach() to g_queue_find_custom() in patch7
>> - change trace_colo_compare_tcp_miscompare() to fprintf() in patch8
>> - add codes not queue vlan packets
>>
>> v12:
>> - add qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
>> to this series as the first patch.
>> - update COLO net ascii figure.
>> - add chardev socket check.
>> - fix some typo.
>> - add some comments.
>> - rename net/colo-base.c to net/colo.c
>> - rename network/transport_layer to network/transport_header.
>> - move the job that clear coon_list when hashtable_size oversize
>> to connection_get.
>> - reuse connection_destroy() do colo_rm_connection().
>> - fix pkt mem leak in colo_compare_connection().
>> (result be released in g_queue_remove(), so it were not leak)
>> - rename thread_name "compare" to "colo-compare".
>> - change icmp compare to memcmp().
>>
>> v11:
>> - Make patch 5 to a independent patch series.
>> [PATCH V3] qemu-char: Add qemu_chr_add_handlers_full() for
>> GMaincontext
>> - For Jason's comments, merge filter-rewriter to this series.
>> (patch 7,8,9)
>> - Add reverse_connection_key()
>> - remove conn_list in filter-rewriter
>> - remove unprocessed_connections
>> - add some comments
>>
>> v10:
>> - fix typo
>> - Should we make patch 5 independent with this series?
>> This patch just add a API for qemu-char.
>>
>> v9:
>> p5:
>> - use chr_update_read_handler_full() replace
>> the chr_update_read_handler()
>> - use io_watch_poll_prepare_full() replace
>> the io_watch_poll_prepare()
>> - use io_watch_poll_funcs_full replace
>> the io_watch_poll_funcs
>> - avoid code duplication
>>
>> v8:
>> p5:
>> - add new patch:
>> qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
>>
>> v7:
>> p5:
>> - add [PATCH]qemu-char: Fix context for g_source_attach()
>> in this patch series.
>>
>> v6:
>> p6:
>> - add more commit log.
>> - fix icmp comparison to compare all packet.
>>
>> p5:
>> - add more cpmments in commit log.
>> - change REGULAR_CHECK_MS to REGULAR_PACKET_CHECK_MS
>> - make check old packet independent to compare thread
>> - remove thread_status
>>
>> p4:
>> - change this patch only about
>> Connection and ConnectionKey.
>> - add some comments in commit log.
>> - remove mode in fill_connection_key().
>> - fix some comments and bug.
>> - move colo_conn_state to patch of
>> "work with colo-frame"
>> - remove conn_list_lock.
>> - add MAX_QUEUE_SIZE, if primary_list or
>> secondary_list biger than MAX_QUEUE_SIZE
>> we will drop packet.
>>
>> p3:
>> - add new independent kernel jhash patch.
>>
>> p2:
>> - add new independent colo-base patch.
>>
>> p1:
>> - add a ascii figure and some comments to explain it
>> - move trace.h to p2
>> - move QTAILQ_HEAD(, CompareState) net_compares to
>> patch of "work with colo-frame"
>> - add some comments in qemu-option.hx
>>
>>
>> v5:
>> p3:
>> - comments from Jason
>> we poll and handle chardev in comapre thread,
>> Through this way, there's no need for extra
>> synchronization with main loop
>> this depend on another patch:
>> qemu-char: Fix context for g_source_attach()
>> - remove QemuEvent
>> p2:
>> - remove conn->list_lock
>> p1:
>> - move compare_pri/sec_chr_in to p3
>> - move compare_chr_send to p2
>>
>> v4:
>> p4:
>> - add some comments
>> - fix some trace-events
>> - fix tcp compare error
>> p3:
>> - add rcu_read_lock().
>> - fix trace name
>> - fix jason's other comments
>> - rebase some Dave's branch function
>> p2:
>> - colo_compare_connection() change g_queue_push_head() to
>> - g_queue_push_tail() match to sorted order.
>> - remove pkt->s
>> - move data structure to colo-base.h
>> - add colo-base.c reuse codes for filter-rewriter
>> - add some filter-rewriter needs struct
>> - depends on previous SocketReadState patch
>> p1:
>> - except move qemu_chr_add_handlers()
>> to colo thread
>> - remove class_finalize
>> - remove secondary arp codes
>> - depends on previous SocketReadState patch
>>
>> v3:
>> - rebase colo-compare to colo-frame v2.7
>> - fix most of Dave's comments
>> (except RCU)
>> - add TCP,UDP,ICMP and other packet comparison
>> - add trace-event
>> - add some comments
>> - other bug fix
>> - add RFC index
>> - add usage in patch 1/4
>>
>> v2:
>> - add jhash.h
>>
>> v1:
>> - initial patch
>>
>>
>> Zhang Chen (12):
>> docs: Add documentation for COLO-proxy
>> qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext
>> colo-compare: introduce colo compare initialization
>> net/colo.c: add colo.c to define and handle packet
>> Jhash: add linux kernel jhashtable in qemu
>> colo-compare: track connection and enqueue packet
>> colo-compare: introduce packet comparison thread
>> colo-compare: add TCP,UDP,ICMP packet comparison
>> filter-rewriter: introduce filter-rewriter initialization
>> filter-rewriter: track connection and parse packet
>> filter-rewriter: rewrite tcp packet to keep secondary connection
>> MAINTAINERS: add maintainer for COLO-proxy
>>
>> MAINTAINERS | 9 +
>> docs/colo-proxy.txt | 188 ++++++++++++
>> include/qemu/jhash.h | 59 ++++
>> include/sysemu/char.h | 11 +-
>> net/Makefile.objs | 3 +
>> net/colo-compare.c | 776
>> ++++++++++++++++++++++++++++++++++++++++++++++++++
>> net/colo.c | 211 ++++++++++++++
>> net/colo.h | 76 +++++
>> net/filter-rewriter.c | 268 +++++++++++++++++
>> qemu-char.c | 77 +++--
>> qemu-options.hx | 52 ++++
>> trace-events | 16 ++
>> vl.c | 4 +-
>> 13 files changed, 1724 insertions(+), 26 deletions(-)
>> create mode 100644 docs/colo-proxy.txt
>> create mode 100644 include/qemu/jhash.h
>> create mode 100644 net/colo-compare.c
>> create mode 100644 net/colo.c
>> create mode 100644 net/colo.h
>> create mode 100644 net/filter-rewriter.c
>>
>
>
>
> .
>
--
Thanks
zhangchen
^ permalink raw reply [flat|nested] 19+ messages in thread
end of thread, other threads:[~2016-09-07 1:17 UTC | newest]
Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-05 9:37 [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 01/12] docs: Add documentation for COLO-proxy Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 02/12] qemu-char: Add qemu_chr_add_handlers_full() for GMaincontext Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 03/12] colo-compare: introduce colo compare initialization Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 04/12] net/colo.c: add colo.c to define and handle packet Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 05/12] Jhash: add linux kernel jhashtable in qemu Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 06/12] colo-compare: track connection and enqueue packet Zhang Chen
2016-09-06 7:51 ` Jason Wang
2016-09-06 7:55 ` Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 07/12] colo-compare: introduce packet comparison thread Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 08/12] colo-compare: add TCP, UDP, ICMP packet comparison Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 09/12] filter-rewriter: introduce filter-rewriter initialization Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 10/12] filter-rewriter: track connection and parse packet Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 11/12] filter-rewriter: rewrite tcp packet to keep secondary connection Zhang Chen
2016-09-05 9:37 ` [Qemu-devel] [PATCH V13 12/12] MAINTAINERS: add maintainer for COLO-proxy Zhang Chen
2016-09-05 10:25 ` [Qemu-devel] [PATCH V13 00/12] Introduce COLO-Proxy no-reply
2016-09-05 10:35 ` no-reply
2016-09-06 8:02 ` Jason Wang
2016-09-07 1:16 ` Zhang Chen
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.