xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
To: Xen devel <xen-devel@lists.xenproject.org>,
	Wei Liu <wei.liu2@citrix.com>,
	Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>,
	Li Zhijian <lizhijian@cn.fujitsu.com>,
	eddie dong <eddie.dong@intel.com>,
	Yang Hongyang <imhy.yang@gmail.com>,
	Bian Naimeng <biannm@cn.fujitsu.com>
Subject: [PATCH V4 6/8] COLO-Proxy: Add colo-compare notify args
Date: Mon, 6 Mar 2017 10:59:24 +0800	[thread overview]
Message-ID: <1488769166-28738-7-git-send-email-zhangchen.fnst@cn.fujitsu.com> (raw)
In-Reply-To: <1488769166-28738-1-git-send-email-zhangchen.fnst@cn.fujitsu.com>

Xen colo-frame can use the notify way communicate with
qemu colo-compare.

Signed-off-by: Zhang Chen <zhangchen.fnst@cn.fujitsu.com>
---
 tools/libxl/libxl_dm.c      | 12 +++++++++---
 tools/libxl/libxl_nic.c     |  8 ++++++++
 tools/libxl/libxl_types.idl |  4 ++++
 tools/xl/xl_parse.c         |  8 ++++++++
 4 files changed, 29 insertions(+), 3 deletions(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index 0fabd64..4344c53 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1323,6 +1323,10 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
                                             sock_compare_sec_in_ip,
                                             sock_compare_sec_in_port);
 
+                    APPEND_COLO_SOCK_SERVER(sock_compare_notify_id,
+                                            sock_compare_notify_ip,
+                                            sock_compare_notify_port);
+
                     APPEND_COLO_SOCK_SERVER(sock_redirector0_id,
                                             sock_redirector0_ip,
                                             sock_redirector0_port);
@@ -1364,13 +1368,15 @@ static int libxl__build_device_model_args_new(libxl__gc *gc,
                     }
                     if (nics[i].colo_compare_pri_in &&
                         nics[i].colo_compare_sec_in &&
-                        nics[i].colo_compare_out) {
+                        nics[i].colo_compare_out &&
+                        nics[i].colo_compare_notify_dev) {
                         flexarray_append(dm_args, "-object");
                         flexarray_append(dm_args,
-                           GCSPRINTF("colo-compare,id=c1,primary_in=%s,secondary_in=%s,outdev=%s",
+                           GCSPRINTF("colo-compare,id=c1,primary_in=%s,secondary_in=%s,outdev=%s,notify_dev=%s",
                                      nics[i].colo_compare_pri_in,
                                      nics[i].colo_compare_sec_in,
-                                     nics[i].colo_compare_out));
+                                     nics[i].colo_compare_out,
+                                     nics[i].colo_compare_notify_dev));
                     }
                 }
                 ioemu_nics++;
diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
index 5e1fecd..33954a2 100644
--- a/tools/libxl/libxl_nic.c
+++ b/tools/libxl/libxl_nic.c
@@ -212,6 +212,9 @@ static void libxl__device_nic_add(libxl__egc *egc, uint32_t domid,
     MAYBE_ADD_COLO_ARGS(sock_compare_sec_in_id);
     MAYBE_ADD_COLO_ARGS(sock_compare_sec_in_ip);
     MAYBE_ADD_COLO_ARGS(sock_compare_sec_in_port);
+    MAYBE_ADD_COLO_ARGS(sock_compare_notify_id);
+    MAYBE_ADD_COLO_ARGS(sock_compare_notify_ip);
+    MAYBE_ADD_COLO_ARGS(sock_compare_notify_port);
     MAYBE_ADD_COLO_ARGS(sock_redirector0_id);
     MAYBE_ADD_COLO_ARGS(sock_redirector0_ip);
     MAYBE_ADD_COLO_ARGS(sock_redirector0_port);
@@ -232,6 +235,7 @@ static void libxl__device_nic_add(libxl__egc *egc, uint32_t domid,
     MAYBE_ADD_COLO_ARGS(compare_pri_in);
     MAYBE_ADD_COLO_ARGS(compare_sec_in);
     MAYBE_ADD_COLO_ARGS(compare_out);
+    MAYBE_ADD_COLO_ARGS(compare_notify_dev);
 
     MAYBE_ADD_COLO_ARGS(sock_sec_redirector0_id);
     MAYBE_ADD_COLO_ARGS(sock_sec_redirector0_ip);
@@ -418,6 +422,9 @@ static int libxl__device_nic_from_xenstore(libxl__gc *gc,
     CHECK_COLO_ARGS(sock_compare_sec_in_id);
     CHECK_COLO_ARGS(sock_compare_sec_in_ip);
     CHECK_COLO_ARGS(sock_compare_sec_in_port);
+    CHECK_COLO_ARGS(sock_compare_notify_id);
+    CHECK_COLO_ARGS(sock_compare_notify_ip);
+    CHECK_COLO_ARGS(sock_compare_notify_port);
     CHECK_COLO_ARGS(sock_redirector0_id);
     CHECK_COLO_ARGS(sock_redirector0_ip);
     CHECK_COLO_ARGS(sock_redirector0_port);
@@ -438,6 +445,7 @@ static int libxl__device_nic_from_xenstore(libxl__gc *gc,
     CHECK_COLO_ARGS(compare_pri_in);
     CHECK_COLO_ARGS(compare_sec_in);
     CHECK_COLO_ARGS(compare_out);
+    CHECK_COLO_ARGS(compare_notify_dev);
     CHECK_COLO_ARGS(sock_sec_redirector0_id);
     CHECK_COLO_ARGS(sock_sec_redirector0_ip);
     CHECK_COLO_ARGS(sock_sec_redirector0_port);
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 47e96b1..516bd79 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -639,6 +639,9 @@ libxl_device_nic = Struct("device_nic", [
     ("colo_sock_compare_sec_in_id", string),
     ("colo_sock_compare_sec_in_ip", string),
     ("colo_sock_compare_sec_in_port", string),
+    ("colo_sock_compare_notify_id", string),
+    ("colo_sock_compare_notify_ip", string),
+    ("colo_sock_compare_notify_port", string),
     ("colo_sock_redirector0_id", string),
     ("colo_sock_redirector0_ip", string),
     ("colo_sock_redirector0_port", string),
@@ -659,6 +662,7 @@ libxl_device_nic = Struct("device_nic", [
     ("colo_compare_pri_in", string),
     ("colo_compare_sec_in", string),
     ("colo_compare_out", string),
+    ("colo_compare_notify_dev", string),
     ("colo_sock_sec_redirector0_id", string),
     ("colo_sock_sec_redirector0_ip", string),
     ("colo_sock_sec_redirector0_port", string),
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index d2bbe26..77e91c8 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -494,6 +494,12 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config **config, char *token)
         replace_string(&nic->colo_sock_compare_pri_in_ip, oparg);
     } else if (MATCH_OPTION("colo_sock_compare_pri_in_port", token, oparg)) {
         replace_string(&nic->colo_sock_compare_pri_in_port, oparg);
+    } else if (MATCH_OPTION("colo_sock_compare_notify_id", token, oparg)) {
+        replace_string(&nic->colo_sock_compare_notify_id, oparg);
+    } else if (MATCH_OPTION("colo_sock_compare_notify_ip", token, oparg)) {
+        replace_string(&nic->colo_sock_compare_notify_ip, oparg);
+    } else if (MATCH_OPTION("colo_sock_compare_notify_port", token, oparg)) {
+        replace_string(&nic->colo_sock_compare_notify_port, oparg);
     } else if (MATCH_OPTION("colo_filter_mirror_queue", token, oparg)) {
         replace_string(&nic->colo_filter_mirror_queue, oparg);
     } else if (MATCH_OPTION("colo_filter_mirror_outdev", token, oparg)) {
@@ -516,6 +522,8 @@ int parse_nic_config(libxl_device_nic *nic, XLU_Config **config, char *token)
         replace_string(&nic->colo_compare_sec_in, oparg);
     } else if (MATCH_OPTION("colo_compare_out", token, oparg)) {
         replace_string(&nic->colo_compare_out, oparg);
+    } else if (MATCH_OPTION("colo_compare_notify_dev", token, oparg)) {
+        replace_string(&nic->colo_compare_notify_dev, oparg);
 
     } else if (MATCH_OPTION("colo_sock_sec_redirector0_id", token, oparg)) {
         replace_string(&nic->colo_sock_sec_redirector0_id, oparg);
-- 
2.7.4




_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
https://lists.xen.org/xen-devel

  parent reply	other threads:[~2017-03-06  3:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06  2:59 [PATCH V4 0/8] COLO-Proxy: Make Xen COLO use userspace colo-proxy Zhang Chen
2017-03-06  2:59 ` [PATCH V4 1/8] COLO-Proxy: Add remus command to open userspace proxy Zhang Chen
2017-03-14 11:23   ` Wei Liu
2017-03-06  2:59 ` [PATCH V4 2/8] COLO-Proxy: Setup userspace colo-proxy on primary side Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-06  2:59 ` [PATCH V4 3/8] COLO-Proxy: Setup userspace colo-proxy on secondary side Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-06  2:59 ` [PATCH V4 4/8] COLO-Proxy: Add primary userspace colo proxy start args Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-06  2:59 ` [PATCH V4 5/8] COLO-Proxy: Add secondary userspace colo-proxy " Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-14 11:39     ` Wei Liu
2017-03-15  1:53       ` Zhang Chen
2017-03-06  2:59 ` Zhang Chen [this message]
2017-03-14 11:24   ` [PATCH V4 6/8] COLO-Proxy: Add colo-compare notify args Wei Liu
2017-03-06  2:59 ` [PATCH V4 7/8] COLO-Proxy: Use socket to get checkpoint event Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-15  2:02     ` Zhang Chen
2017-03-15 10:56       ` Wei Liu
2017-03-16  1:21         ` Zhang Chen
2017-03-06  2:59 ` [PATCH V4 8/8] COLO-proxy: Add colo_userspace_proxy macro Zhang Chen
2017-03-14 11:24   ` Wei Liu
2017-03-06 14:31 ` [PATCH V4 0/8] COLO-Proxy: Make Xen COLO use userspace colo-proxy Konrad Rzeszutek Wilk
2017-03-07  3:25   ` Zhang Chen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488769166-28738-7-git-send-email-zhangchen.fnst@cn.fujitsu.com \
    --to=zhangchen.fnst@cn.fujitsu.com \
    --cc=Ian.Jackson@eu.citrix.com \
    --cc=biannm@cn.fujitsu.com \
    --cc=eddie.dong@intel.com \
    --cc=imhy.yang@gmail.com \
    --cc=lizhijian@cn.fujitsu.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).