1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
diff --git a/src/libvirt_macvtap.syms b/src/libvirt_macvtap.syms
index 107b7da..b48565b 100644
--- a/src/libvirt_macvtap.syms
+++ b/src/libvirt_macvtap.syms
@@ -1,9 +1,10 @@
#
+# These symbols are dependent on WITH_MACVTAP.
+#
+
# macvtap.h
delMacvtap;
openMacvtapTap;
-virVMOperationTypeFromString;
-virVMOperationTypeToString;
vpAssociatePortProfileId;
vpDisassociatePortProfileId;
diff --git a/src/libvirt_private.syms b/src/libvirt_private.syms
index 310d8f4..3c1c823 100644
--- a/src/libvirt_private.syms
+++ b/src/libvirt_private.syms
@@ -504,6 +504,11 @@ virLogStartup;
virLogUnlock;
+# macvtap.h
+virVMOperationTypeFromString;
+virVMOperationTypeToString;
+
+
# memory.h
virAlloc;
virAllocN;
diff --git a/src/qemu/qemu_driver.c b/src/qemu/qemu_driver.c
index fcb90a3..aa3478f 100644
--- a/src/qemu/qemu_driver.c
+++ b/src/qemu/qemu_driver.c
@@ -11879,6 +11879,7 @@ cleanup:
return ret;
}
+#if WITH_MACVTAP
static void
qemudVPAssociatePortProfiles(virDomainDefPtr def) {
int i;
@@ -11913,6 +11914,7 @@ err_exit:
}
}
}
+#endif /* WITH_MACVTAP */
/* Finish is the third and final step, and it runs on the destination host. */
static virDomainPtr
@@ -11974,7 +11976,9 @@ qemudDomainMigrateFinish2 (virConnectPtr dconn,
goto cleanup;
}
+#if WITH_MACVTAP
qemudVPAssociatePortProfiles(vm->def);
+#endif /* WITH_MACVTAP */
if (flags & VIR_MIGRATE_PERSIST_DEST) {
if (vm->persistent)
diff --git a/src/util/macvtap.h b/src/util/macvtap.h
index 389d1fd..3ae2c24 100644
--- a/src/util/macvtap.h
+++ b/src/util/macvtap.h
@@ -57,11 +57,6 @@ struct _virVirtualPortProfileParams {
} u;
};
-
-# if defined(WITH_MACVTAP)
-
-# include "internal.h"
-
enum virVMOperationType {
VIR_VM_OP_CREATE,
VIR_VM_OP_SAVE,
@@ -75,6 +70,10 @@ enum virVMOperationType {
VIR_VM_OP_LAST
};
+# if WITH_MACVTAP
+
+# include "internal.h"
+
int openMacvtapTap(const char *ifname,
const unsigned char *macaddress,
const char *linkdev,
@@ -90,11 +89,9 @@ void delMacvtap(const char *ifname,
const char *linkdev,
virVirtualPortProfileParamsPtr virtPortProfile);
-# endif /* WITH_MACVTAP */
-
-# define MACVTAP_MODE_PRIVATE_STR "private"
-# define MACVTAP_MODE_VEPA_STR "vepa"
-# define MACVTAP_MODE_BRIDGE_STR "bridge"
+# define MACVTAP_MODE_PRIVATE_STR "private"
+# define MACVTAP_MODE_VEPA_STR "vepa"
+# define MACVTAP_MODE_BRIDGE_STR "bridge"
int vpAssociatePortProfileId(const char *macvtap_ifname,
const unsigned char *macvtap_macaddr,
@@ -109,6 +106,8 @@ int vpDisassociatePortProfileId(const char *macvtap_ifname,
const virVirtualPortProfileParamsPtr virtPort,
enum virVMOperationType vmOp);
+# endif /* WITH_MACVTAP */
+
VIR_ENUM_DECL(virVirtualPort)
VIR_ENUM_DECL(virVMOperation)
--
1.7.0.4
|