]> xenbits.xensource.com Git - libvirt.git/commitdiff
qemuBuildVhostuserCommandLine: Unify -netdev creation
authorMichal Privoznik <mprivozn@redhat.com>
Tue, 16 Aug 2016 10:21:49 +0000 (12:21 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 14 Oct 2016 03:45:01 +0000 (11:45 +0800)
Currently, what we do for vhost-user network is generate the
following part of command line:

-netdev type=vhost-user,id=hostnet0,chardev=charnet0

There's no need for 'type=' it is the default. Drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
src/qemu/qemu_command.c
tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser-multiq.args
tests/qemuxml2argvdata/qemuxml2argv-net-vhostuser.args

index 1c02e5802bcf31bd73a6d4a08d603f1e525d535c..d74a9f82ccf30b549c9284d7c3b61e391114d089 100644 (file)
@@ -7828,7 +7828,7 @@ qemuBuildVhostuserCommandLine(virQEMUDriverPtr driver,
         goto error;
     }
 
-    virBufferAsprintf(&netdev_buf, "type=vhost-user,id=host%s,chardev=char%s",
+    virBufferAsprintf(&netdev_buf, "vhost-user,id=host%s,chardev=char%s",
                       net->info.alias, net->info.alias);
 
     if (queues > 1) {
index bab15adad72afa8a6f627ab6e7709aa24e2f9fea..4360e5ebd949e1e5903bc58ef6326f1c52161095 100644 (file)
@@ -20,17 +20,17 @@ QEMU_AUDIO_DRV=none \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -chardev socket,id=charnet0,path=/tmp/vhost0.sock,server \
--netdev type=vhost-user,id=hostnet0,chardev=charnet0 \
+-netdev vhost-user,id=hostnet0,chardev=charnet0 \
 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:ee:96:6b,bus=pci.0,\
 addr=0x3 \
 -chardev socket,id=charnet1,path=/tmp/vhost1.sock \
--netdev type=vhost-user,id=hostnet1,chardev=charnet1 \
+-netdev vhost-user,id=hostnet1,chardev=charnet1 \
 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:ee:96:6c,bus=pci.0,\
 addr=0x4 \
 -netdev socket,listen=:2015,id=hostnet2 \
 -device rtl8139,netdev=hostnet2,id=net2,mac=52:54:00:95:db:c0,bus=pci.0,\
 addr=0x5 \
 -chardev socket,id=charnet3,path=/tmp/vhost2.sock \
--netdev type=vhost-user,id=hostnet3,chardev=charnet3,queues=4 \
+-netdev vhost-user,id=hostnet3,chardev=charnet3,queues=4 \
 -device virtio-net-pci,mq=on,vectors=10,netdev=hostnet3,id=net3,\
 mac=52:54:00:ee:96:6d,bus=pci.0,addr=0x6
index ce8d6694b212f07243f12fd3a59b96eab9b52569..47c1d84af27b93296b60cc5649e5d77d3d42c7e9 100644 (file)
@@ -20,11 +20,11 @@ QEMU_AUDIO_DRV=none \
 -drive file=/dev/HostVG/QEMUGuest1,format=raw,if=none,id=drive-ide0-0-0 \
 -device ide-drive,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 \
 -chardev socket,id=charnet0,path=/tmp/vhost0.sock,server \
--netdev type=vhost-user,id=hostnet0,chardev=charnet0 \
+-netdev vhost-user,id=hostnet0,chardev=charnet0 \
 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:ee:96:6b,bus=pci.0,\
 addr=0x3 \
 -chardev socket,id=charnet1,path=/tmp/vhost1.sock \
--netdev type=vhost-user,id=hostnet1,chardev=charnet1 \
+-netdev vhost-user,id=hostnet1,chardev=charnet1 \
 -device virtio-net-pci,netdev=hostnet1,id=net1,mac=52:54:00:ee:96:6c,bus=pci.0,\
 addr=0x4 \
 -netdev socket,listen=:2015,id=hostnet2 \