Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
libvirt
提交
8e5a21ee
L
libvirt
项目概览
openeuler
/
libvirt
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
libvirt
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8e5a21ee
编写于
11月 06, 2015
作者:
D
Daniel P. Berrange
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
qemu: assume vnet-hdr feature is always available
上级
257e2056
变更
15
隐藏空白更改
内联
并排
Showing
15 changed file
with
7 addition
and
37 deletion
+7
-37
src/qemu/qemu_capabilities.c
src/qemu/qemu_capabilities.c
+1
-6
src/qemu/qemu_capabilities.h
src/qemu/qemu_capabilities.h
+1
-1
src/qemu/qemu_command.c
src/qemu/qemu_command.c
+4
-12
src/qemu/qemu_command.h
src/qemu/qemu_command.h
+0
-2
src/qemu/qemu_hotplug.c
src/qemu/qemu_hotplug.c
+1
-2
tests/qemucapabilitiesdata/caps_1.2.2-1.caps
tests/qemucapabilitiesdata/caps_1.2.2-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_1.3.1-1.caps
tests/qemucapabilitiesdata/caps_1.3.1-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_1.4.2-1.caps
tests/qemucapabilitiesdata/caps_1.4.2-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_1.5.3-1.caps
tests/qemucapabilitiesdata/caps_1.5.3-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_1.6.0-1.caps
tests/qemucapabilitiesdata/caps_1.6.0-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_1.6.50-1.caps
tests/qemucapabilitiesdata/caps_1.6.50-1.caps
+0
-1
tests/qemucapabilitiesdata/caps_2.1.1-1.caps
tests/qemucapabilitiesdata/caps_2.1.1-1.caps
+0
-1
tests/qemucaps2xmldata/all_1.6.0-1.caps
tests/qemucaps2xmldata/all_1.6.0-1.caps
+0
-1
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
+0
-1
tests/qemuhelptest.c
tests/qemuhelptest.c
+0
-5
未找到文件。
src/qemu/qemu_capabilities.c
浏览文件 @
8e5a21ee
...
...
@@ -1081,7 +1081,6 @@ virCapsPtr virQEMUCapsInit(virQEMUCapsCachePtr cache)
static
int
virQEMUCapsComputeCmdFlags
(
const
char
*
help
,
unsigned
int
version
,
bool
is_kvm
,
unsigned
int
kvm_version
,
virQEMUCapsPtr
qemuCaps
,
bool
check_yajl
ATTRIBUTE_UNUSED
)
...
...
@@ -1217,9 +1216,6 @@ virQEMUCapsComputeCmdFlags(const char *help,
strstr
(
help
,
"sockets="
))
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_SMP_TOPOLOGY
);
if
(
is_kvm
&&
(
version
>=
10000
||
kvm_version
>=
74
))
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_VNET_HDR
);
if
(
strstr
(
help
,
",vhost="
))
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_VHOST_NET
);
...
...
@@ -1448,7 +1444,7 @@ int virQEMUCapsParseHelpStr(const char *qemu,
goto
cleanup
;
}
if
(
virQEMUCapsComputeCmdFlags
(
help
,
*
version
,
*
is_kvm
,
*
kvm_version
,
if
(
virQEMUCapsComputeCmdFlags
(
help
,
*
version
,
*
kvm_version
,
qemuCaps
,
check_yajl
)
<
0
)
goto
cleanup
;
...
...
@@ -3204,7 +3200,6 @@ static qemuMonitorCallbacks callbacks = {
static
void
virQEMUCapsInitQMPBasic
(
virQEMUCapsPtr
qemuCaps
)
{
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_VNET_HDR
);
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_MIGRATE_QEMU_TCP
);
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
);
virQEMUCapsSet
(
qemuCaps
,
QEMU_CAPS_DRIVE_CACHE_V2
);
...
...
src/qemu/qemu_capabilities.h
浏览文件 @
8e5a21ee
...
...
@@ -56,7 +56,7 @@ typedef enum {
X_QEMU_CAPS_NAME
,
/* Is the -name flag available */
X_QEMU_CAPS_UUID
,
/* Is the -uuid flag available */
X_QEMU_CAPS_DOMID
,
/* Xenner: -domid flag available */
QEMU_CAPS_VNET_HDR
,
X_
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_KVM_STDIO
,
/* avoid kvm tcp migration bug */
/* 10 */
...
...
src/qemu/qemu_command.c
浏览文件 @
8e5a21ee
...
...
@@ -219,7 +219,6 @@ qemuVirCommandGetDevSet(virCommandPtr cmd, int fd)
* @def: the definition of the VM (needed by 802.1Qbh and audit)
* @driver: pointer to the driver instance
* @net: pointer to the VM's interface description with direct device type
* @qemuCaps: flags for qemu
* @vmop: VM operation type
*
* Returns a filedescriptor on success or -1 in case of error.
...
...
@@ -228,7 +227,6 @@ int
qemuPhysIfaceConnect
(
virDomainDefPtr
def
,
virQEMUDriverPtr
driver
,
virDomainNetDefPtr
net
,
virQEMUCapsPtr
qemuCaps
,
virNetDevVPortProfileOp
vmop
)
{
int
rc
;
...
...
@@ -237,8 +235,7 @@ qemuPhysIfaceConnect(virDomainDefPtr def,
virQEMUDriverConfigPtr
cfg
=
virQEMUDriverGetConfig
(
driver
);
unsigned
int
macvlan_create_flags
=
VIR_NETDEV_MACVLAN_CREATE_WITH_TAP
;
if
(
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_VNET_HDR
)
&&
net
->
model
&&
STREQ
(
net
->
model
,
"virtio"
))
if
(
net
->
model
&&
STREQ
(
net
->
model
,
"virtio"
))
vnet_hdr
=
1
;
rc
=
virNetDevMacVLanCreateWithVPortProfile
(
...
...
@@ -367,7 +364,6 @@ int
qemuNetworkIfaceConnect
(
virDomainDefPtr
def
,
virQEMUDriverPtr
driver
,
virDomainNetDefPtr
net
,
virQEMUCapsPtr
qemuCaps
,
int
*
tapfd
,
size_t
*
tapfdSize
)
{
...
...
@@ -402,10 +398,8 @@ qemuNetworkIfaceConnect(virDomainDefPtr def,
template_ifname
=
true
;
}
if
(
virQEMUCapsGet
(
qemuCaps
,
QEMU_CAPS_VNET_HDR
)
&&
net
->
model
&&
STREQ
(
net
->
model
,
"virtio"
))
{
if
(
net
->
model
&&
STREQ
(
net
->
model
,
"virtio"
))
tap_create_flags
|=
VIR_NETDEV_TAP_CREATE_VNET_HDR
;
}
if
(
virQEMUDriverIsPrivileged
(
driver
))
{
if
(
virNetDevTapCreateInBridgePort
(
brname
,
&
net
->
ifname
,
&
net
->
mac
,
...
...
@@ -8749,15 +8743,13 @@ qemuBuildInterfaceCommandLine(virCommandPtr cmd,
memset
(
tapfd
,
-
1
,
tapfdSize
*
sizeof
(
tapfd
[
0
]));
if
(
qemuNetworkIfaceConnect
(
def
,
driver
,
net
,
qemuCaps
,
tapfd
,
&
tapfdSize
)
<
0
)
tapfd
,
&
tapfdSize
)
<
0
)
goto
cleanup
;
}
else
if
(
actualType
==
VIR_DOMAIN_NET_TYPE_DIRECT
)
{
if
(
VIR_ALLOC
(
tapfd
)
<
0
||
VIR_ALLOC
(
tapfdName
)
<
0
)
goto
cleanup
;
tapfdSize
=
1
;
tapfd
[
0
]
=
qemuPhysIfaceConnect
(
def
,
driver
,
net
,
qemuCaps
,
vmop
);
tapfd
[
0
]
=
qemuPhysIfaceConnect
(
def
,
driver
,
net
,
vmop
);
if
(
tapfd
[
0
]
<
0
)
goto
cleanup
;
}
...
...
src/qemu/qemu_command.h
浏览文件 @
8e5a21ee
...
...
@@ -228,7 +228,6 @@ char *qemuBuildRedirdevDevStr(virDomainDefPtr def,
int
qemuNetworkIfaceConnect
(
virDomainDefPtr
def
,
virQEMUDriverPtr
driver
,
virDomainNetDefPtr
net
,
virQEMUCapsPtr
qemuCaps
,
int
*
tapfd
,
size_t
*
tapfdSize
)
ATTRIBUTE_NONNULL
(
2
);
...
...
@@ -236,7 +235,6 @@ int qemuNetworkIfaceConnect(virDomainDefPtr def,
int
qemuPhysIfaceConnect
(
virDomainDefPtr
def
,
virQEMUDriverPtr
driver
,
virDomainNetDefPtr
net
,
virQEMUCapsPtr
qemuCaps
,
virNetDevVPortProfileOp
vmop
);
int
qemuOpenVhostNet
(
virDomainDefPtr
def
,
...
...
src/qemu/qemu_hotplug.c
浏览文件 @
8e5a21ee
...
...
@@ -947,7 +947,7 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
goto
cleanup
;
memset
(
vhostfd
,
-
1
,
sizeof
(
*
vhostfd
)
*
vhostfdSize
);
if
(
qemuNetworkIfaceConnect
(
vm
->
def
,
driver
,
net
,
priv
->
qemuCaps
,
tapfd
,
&
tapfdSize
)
<
0
)
tapfd
,
&
tapfdSize
)
<
0
)
goto
cleanup
;
iface_connected
=
true
;
if
(
qemuOpenVhostNet
(
vm
->
def
,
net
,
priv
->
qemuCaps
,
vhostfd
,
&
vhostfdSize
)
<
0
)
...
...
@@ -961,7 +961,6 @@ int qemuDomainAttachNetDevice(virConnectPtr conn,
goto
cleanup
;
*
vhostfd
=
-
1
;
if
((
tapfd
[
0
]
=
qemuPhysIfaceConnect
(
vm
->
def
,
driver
,
net
,
priv
->
qemuCaps
,
VIR_NETDEV_VPORT_PROFILE_OP_CREATE
))
<
0
)
goto
cleanup
;
iface_connected
=
true
;
...
...
tests/qemucapabilitiesdata/caps_1.2.2-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_1.3.1-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_1.4.2-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_1.5.3-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_1.6.0-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_1.6.50-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucapabilitiesdata/caps_2.1.1-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucaps2xmldata/all_1.6.0-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemucaps2xmldata/nodisksnapshot_1.6.0-1.caps
浏览文件 @
8e5a21ee
<qemuCaps>
<flag name='vnet-hdr'/>
<flag name='migrate-qemu-tcp'/>
<flag name='migrate-qemu-exec'/>
<flag name='drive-cache-v2'/>
...
...
tests/qemuhelptest.c
浏览文件 @
8e5a21ee
...
...
@@ -183,7 +183,6 @@ mymain(void)
QEMU_CAPS_VNC
);
DO_TEST
(
"qemu-kvm-0.12.1.2-rhel60"
,
12001
,
1
,
0
,
QEMU_CAPS_DRIVE_BOOT
,
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_QEMU_TCP
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
,
QEMU_CAPS_DRIVE_CACHE_V2
,
...
...
@@ -241,7 +240,6 @@ mymain(void)
QEMU_CAPS_DEVICE_VIRTIO_NET
);
DO_TEST
(
"qemu-kvm-0.12.3"
,
12003
,
1
,
0
,
QEMU_CAPS_DRIVE_BOOT
,
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_QEMU_TCP
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
,
QEMU_CAPS_DRIVE_CACHE_V2
,
...
...
@@ -279,7 +277,6 @@ mymain(void)
QEMU_CAPS_VNC
);
DO_TEST
(
"qemu-kvm-0.13.0"
,
13000
,
1
,
0
,
QEMU_CAPS_DRIVE_BOOT
,
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_QEMU_TCP
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
,
QEMU_CAPS_DRIVE_CACHE_V2
,
...
...
@@ -347,7 +344,6 @@ mymain(void)
QEMU_CAPS_DEVICE_E1000
,
QEMU_CAPS_DEVICE_VIRTIO_NET
);
DO_TEST
(
"qemu-kvm-0.12.1.2-rhel61"
,
12001
,
1
,
0
,
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_QEMU_TCP
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
,
QEMU_CAPS_DRIVE_CACHE_V2
,
...
...
@@ -412,7 +408,6 @@ mymain(void)
QEMU_CAPS_DEVICE_E1000
,
QEMU_CAPS_DEVICE_VIRTIO_NET
);
DO_TEST
(
"qemu-kvm-0.12.1.2-rhel62-beta"
,
12001
,
1
,
0
,
QEMU_CAPS_VNET_HDR
,
QEMU_CAPS_MIGRATE_QEMU_TCP
,
QEMU_CAPS_MIGRATE_QEMU_EXEC
,
QEMU_CAPS_DRIVE_CACHE_V2
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录