qemuBuildVhostuserCommandLine: Unify -netdev creation

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>
This commit is contained in:
Michal Privoznik 2016-08-16 12:21:49 +02:00
parent 0c61cf3158
commit b093e85224
3 changed files with 6 additions and 6 deletions

View 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) {

View 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

View 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 \