diff mbox

[2/3] libxl: colo: move netlink related stuff to libxl_colo_proxy.c

Message ID 1459886762-8815-3-git-send-email-wei.liu2@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wei Liu April 5, 2016, 8:06 p.m. UTC
They are only used there, no need to expose them to other parts of
libxl.

This is necessary to make libxl build on FreeBSD again because FreeBSD
doesn't have netlink.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
 tools/libxl/libxl_colo.h       | 12 ------------
 tools/libxl/libxl_colo_proxy.c | 13 +++++++++++++
 2 files changed, 13 insertions(+), 12 deletions(-)

Comments

Ian Jackson April 6, 2016, 1:41 p.m. UTC | #1
Wei Liu writes ("[PATCH 2/3] libxl: colo: move netlink related stuff to libxl_colo_proxy.c"):
> They are only used there, no need to expose them to other parts of
> libxl.
> 
> This is necessary to make libxl build on FreeBSD again because FreeBSD
> doesn't have netlink.
> 
> Signed-off-by: Wei Liu <wei.liu2@citrix.com>

Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
diff mbox

Patch

diff --git a/tools/libxl/libxl_colo.h b/tools/libxl/libxl_colo.h
index 4f6a612..f0e438e 100644
--- a/tools/libxl/libxl_colo.h
+++ b/tools/libxl/libxl_colo.h
@@ -17,10 +17,6 @@ 
 #define LIBXL_COLO_H
 
 #include "libxl_internal.h"
-#include <linux/netlink.h>
-
-/* Consistent with the new COLO netlink channel in kernel side */
-#define NETLINK_COLO 28
 
 /* Maximum time(5s) to wait for colo proxy checkpoit */
 #define COLO_PROXY_CHECKPOINT_TIMEOUT 5000000
@@ -53,14 +49,6 @@  enum {
     LIBXL_COLO_RESUMED,
 };
 
-enum colo_netlink_op {
-    COLO_QUERY_CHECKPOINT = (NLMSG_MIN_TYPE + 1),
-    COLO_CHECKPOINT,
-    COLO_FAILOVER,
-    COLO_PROXY_INIT,
-    COLO_PROXY_RESET, /* UNUSED, will be used for continuous FT */
-};
-
 struct libxl__colo_device_nic {
     int devid;
     const char *vif;
diff --git a/tools/libxl/libxl_colo_proxy.c b/tools/libxl/libxl_colo_proxy.c
index 991bd0d..034e76c 100644
--- a/tools/libxl/libxl_colo_proxy.c
+++ b/tools/libxl/libxl_colo_proxy.c
@@ -17,6 +17,19 @@ 
 
 #include "libxl_internal.h"
 
+#include <linux/netlink.h>
+
+/* Consistent with the new COLO netlink channel in kernel side */
+#define NETLINK_COLO 28
+
+enum colo_netlink_op {
+    COLO_QUERY_CHECKPOINT = (NLMSG_MIN_TYPE + 1),
+    COLO_CHECKPOINT,
+    COLO_FAILOVER,
+    COLO_PROXY_INIT,
+    COLO_PROXY_RESET, /* UNUSED, will be used for continuous FT */
+};
+
 /* ========= colo-proxy: helper functions ========== */
 
 static int colo_proxy_send(libxl__colo_proxy_state *cps, uint8_t *buff,