cli: --network: Support driver_queues option

This commit is contained in:
Cole Robinson 2014-02-01 07:48:04 -05:00
parent 34e2ca8389
commit 24c1c5a2bd
6 changed files with 11 additions and 1 deletions

View File

@ -81,6 +81,7 @@
<source bridge="foobar"/>
<mac address="00:11:22:33:44:55"/>
<model type="virtio"/>
<driver name="qemu" queues="3"/>
</interface>
<interface type="direct">
<source dev="eth5" mode="vepa"/>
@ -199,6 +200,7 @@
<source bridge="foobar"/>
<mac address="00:11:22:33:44:55"/>
<model type="virtio"/>
<driver name="qemu" queues="3"/>
</interface>
<interface type="direct">
<source dev="eth5" mode="vepa"/>

View File

@ -552,7 +552,7 @@ c.add_compare("""--hvm --pxe \
--serial tcp,host=:2222,mode=bind,protocol=telnet \
--filesystem /source,/target,mode=squash \
--network user,mac=12:34:56:78:11:22 \
--network bridge=foobar,model=virtio \
--network bridge=foobar,model=virtio,driver_name=qemu,driver_queues=3 \
--network type=direct,source=eth5,source_mode=vepa,target=mytap12,virtualport_type=802.1Qbg,virtualport_managerid=12,virtualport_typeid=1193046,virtualport_typeidversion=1,virtualport_instanceid=09b11c53-8b5c-4eeb-8f00-d84eaa0aaa3b \
--channel spicevmc \
--smartcard passthrough,type=spicevmc \

View File

@ -45,6 +45,7 @@
<parameters managerid="11" typeid="1193047" typeidversion="2" instanceid="09b11c53-8b5c-4eeb-8f00-d84eaa0aaa4f"/>
</virtualport>
<address type="pci" domain="0x0000" bus="0x00" slot="0x07" function="0x0"/>
<driver name="vhost" queues="5"/>
</interface>
<input type="mouse" bus="ps2"/>
<graphics type="sdl" display=":3.4" xauth="/tmp/.Xauthority"/>

View File

@ -450,6 +450,8 @@ class XMLParseTest(unittest.TestCase):
check("type", "direct")
check("source", "eth0.1")
check("source_mode", "vepa", "bridge")
check("driver_name", None, "vhost")
check("driver_queues", None, 5)
virtualport = dev5.virtualport
check = self._make_checker(virtualport)

View File

@ -1795,6 +1795,9 @@ class ParserNetwork(VirtCLIParser):
self.set_param("macaddr", "mac", setter_cb=set_mac_cb)
self.set_param("filterref", "filterref")
self.set_param("driver_name", "driver_name")
self.set_param("driver_queues", "driver_queues")
self.set_param("virtualport.type", "virtualport_type")
self.set_param("virtualport.managerid", "virtualport_managerid")
self.set_param("virtualport.typeid", "virtualport_typeid")

View File

@ -230,6 +230,8 @@ class VirtualNetworkInterface(VirtualDevice):
target_dev = XMLProperty("./target/@dev")
filterref = XMLProperty("./filterref/@filter")
driver_name = XMLProperty("./driver/@name")
driver_queues = XMLProperty("./driver/@queues", is_int=True)
#############
# Build API #