[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen master] COLO-Proxy: Add secondary userspace colo-proxy start args



commit 0d7f830bd7328b817d756ca0a0fa3ab3f8e6109f
Author:     Zhang Chen <zhangchen.fnst@xxxxxxxxxxxxxx>
AuthorDate: Mon Mar 6 10:59:23 2017 +0800
Commit:     Wei Liu <wei.liu2@xxxxxxxxxx>
CommitDate: Tue Mar 14 11:36:46 2017 +0000

    COLO-Proxy: Add secondary userspace colo-proxy start args
    
    Qemu need this args to start userspace colo-proxy.
    
    Signed-off-by: Zhang Chen <zhangchen.fnst@xxxxxxxxxxxxxx>
    Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx>
---
 tools/libxl/libxl_dm.c      | 34 ++++++++++++++++++++++++++++++++++
 tools/libxl/libxl_nic.c     | 27 +++++++++++++++++++++++++++
 tools/libxl/libxl_types.idl | 15 ++++++++++++++-
 tools/xl/xl_parse.c         | 27 +++++++++++++++++++++++++++
 4 files changed, 102 insertions(+), 1 deletion(-)

diff --git a/tools/libxl/libxl_dm.c b/tools/libxl/libxl_dm.c
index abd4edd..0fabd64 100644
--- a/tools/libxl/libxl_dm.c
+++ b/tools/libxl/libxl_dm.c
@@ -1274,6 +1274,40 @@ static int libxl__build_device_model_args_new(libxl__gc 
*gc,
 
                 if (state->saved_state) {
                     /* secondary colo run */
+
+                    APPEND_COLO_SOCK_CLIENT(sock_sec_redirector0_id,
+                                            sock_sec_redirector0_ip,
+                                            sock_sec_redirector0_port);
+
+                    APPEND_COLO_SOCK_CLIENT(sock_sec_redirector1_id,
+                                            sock_sec_redirector1_ip,
+                                            sock_sec_redirector1_port);
+
+                    if (nics[i].colo_filter_sec_redirector0_queue &&
+                        nics[i].colo_filter_sec_redirector0_indev) {
+                        flexarray_append(dm_args, "-object");
+                        flexarray_append(dm_args,
+                           
GCSPRINTF("filter-redirector,id=rs1,netdev=net%d,queue=%s,indev=%s",
+                                     nics[i].devid,
+                                     nics[i].colo_filter_sec_redirector0_queue,
+                                     
nics[i].colo_filter_sec_redirector0_indev));
+                    }
+                    if (nics[i].colo_filter_sec_redirector1_queue &&
+                        nics[i].colo_filter_sec_redirector1_indev) {
+                        flexarray_append(dm_args, "-object");
+                        flexarray_append(dm_args,
+                           
GCSPRINTF("filter-redirector,id=rs2,netdev=net%d,queue=%s,outdev=%s",
+                                     nics[i].devid,
+                                     nics[i].colo_filter_sec_redirector1_queue,
+                                     
nics[i].colo_filter_sec_redirector1_outdev));
+                    }
+                    if (nics[i].colo_filter_sec_rewriter0_queue) {
+                        flexarray_append(dm_args, "-object");
+                        flexarray_append(dm_args,
+                           
GCSPRINTF("filter-rewriter,id=rs3,netdev=net%d,queue=%s",
+                                     nics[i].devid,
+                                     nics[i].colo_filter_sec_rewriter0_queue));
+                    }
                 } else {
                     /* primary colo run */
 
diff --git a/tools/libxl/libxl_nic.c b/tools/libxl/libxl_nic.c
index 7c57bcf..5e1fecd 100644
--- a/tools/libxl/libxl_nic.c
+++ b/tools/libxl/libxl_nic.c
@@ -233,6 +233,20 @@ static void libxl__device_nic_add(libxl__egc *egc, 
uint32_t domid,
     MAYBE_ADD_COLO_ARGS(compare_sec_in);
     MAYBE_ADD_COLO_ARGS(compare_out);
 
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector0_id);
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector0_ip);
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector0_port);
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector1_id);
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector1_ip);
+    MAYBE_ADD_COLO_ARGS(sock_sec_redirector1_port);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector0_queue);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector0_indev);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector0_outdev);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector1_queue);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector1_indev);
+    MAYBE_ADD_COLO_ARGS(filter_sec_redirector1_outdev);
+    MAYBE_ADD_COLO_ARGS(filter_sec_rewriter0_queue);
+
 #undef MAYBE_ADD_COLO_ARGS
 
     flexarray_append(back, "mac");
@@ -424,6 +438,19 @@ 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(sock_sec_redirector0_id);
+    CHECK_COLO_ARGS(sock_sec_redirector0_ip);
+    CHECK_COLO_ARGS(sock_sec_redirector0_port);
+    CHECK_COLO_ARGS(sock_sec_redirector1_id);
+    CHECK_COLO_ARGS(sock_sec_redirector1_ip);
+    CHECK_COLO_ARGS(sock_sec_redirector1_port);
+    CHECK_COLO_ARGS(filter_sec_redirector0_queue);
+    CHECK_COLO_ARGS(filter_sec_redirector0_indev);
+    CHECK_COLO_ARGS(filter_sec_redirector0_outdev);
+    CHECK_COLO_ARGS(filter_sec_redirector1_queue);
+    CHECK_COLO_ARGS(filter_sec_redirector1_indev);
+    CHECK_COLO_ARGS(filter_sec_redirector1_outdev);
+    CHECK_COLO_ARGS(filter_sec_rewriter0_queue);
 
 #undef CHECK_COLO_ARGS
 
diff --git a/tools/libxl/libxl_types.idl b/tools/libxl/libxl_types.idl
index 07ce345..47e96b1 100644
--- a/tools/libxl/libxl_types.idl
+++ b/tools/libxl/libxl_types.idl
@@ -658,7 +658,20 @@ libxl_device_nic = Struct("device_nic", [
     ("colo_filter_redirector1_outdev", string),
     ("colo_compare_pri_in", string),
     ("colo_compare_sec_in", string),
-    ("colo_compare_out", string)
+    ("colo_compare_out", string),
+    ("colo_sock_sec_redirector0_id", string),
+    ("colo_sock_sec_redirector0_ip", string),
+    ("colo_sock_sec_redirector0_port", string),
+    ("colo_sock_sec_redirector1_id", string),
+    ("colo_sock_sec_redirector1_ip", string),
+    ("colo_sock_sec_redirector1_port", string),
+    ("colo_filter_sec_redirector0_queue", string),
+    ("colo_filter_sec_redirector0_indev", string),
+    ("colo_filter_sec_redirector0_outdev", string),
+    ("colo_filter_sec_redirector1_queue", string),
+    ("colo_filter_sec_redirector1_indev", string),
+    ("colo_filter_sec_redirector1_outdev", string),
+    ("colo_filter_sec_rewriter0_queue", string)
     ])
 
 libxl_device_pci = Struct("device_pci", [
diff --git a/tools/xl/xl_parse.c b/tools/xl/xl_parse.c
index 88ef1c6..d2bbe26 100644
--- a/tools/xl/xl_parse.c
+++ b/tools/xl/xl_parse.c
@@ -516,6 +516,33 @@ 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_sock_sec_redirector0_id", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector0_id, oparg);
+    } else if (MATCH_OPTION("colo_sock_sec_redirector0_ip", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector0_ip, oparg);
+    } else if (MATCH_OPTION("colo_sock_sec_redirector0_port", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector0_port, oparg);
+    } else if (MATCH_OPTION("colo_sock_sec_redirector1_id", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector1_id, oparg);
+    } else if (MATCH_OPTION("colo_sock_sec_redirector1_ip", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector1_ip, oparg);
+    } else if (MATCH_OPTION("colo_sock_sec_redirector1_port", token, oparg)) {
+        replace_string(&nic->colo_sock_sec_redirector1_port, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector0_queue", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector0_queue, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector0_indev", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector0_indev, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector0_outdev", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector0_outdev, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector1_queue", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector1_queue, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector1_indev", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector1_indev, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_redirector1_outdev", token, 
oparg)) {
+        replace_string(&nic->colo_filter_sec_redirector1_outdev, oparg);
+    } else if (MATCH_OPTION("colo_filter_sec_rewriter0_queue", token, oparg)) {
+        replace_string(&nic->colo_filter_sec_rewriter0_queue, oparg);
     } else if (MATCH_OPTION("accel", token, oparg)) {
         fprintf(stderr, "the accel parameter for vifs is currently not 
supported\n");
     } else if (MATCH_OPTION("devid", token, oparg)) {
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
https://lists.xenproject.org/xen-changelog

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.