qemu-e2k/net
Akihiko Odaki d9b33018a0 Revert "tap: setting error appropriately when calling net_init_tap_one()"
This reverts commit 46d4d36d0b.

The reverted commit changed to emit warnings instead of errors when
vhost is requested but vhost initialization fails if vhostforce option
is not set.

However, vhostforce is not meant to ignore vhost errors. It was once
introduced as an option to commit 5430a28fe4 ("vhost: force vhost off
for non-MSI guests") to force enabling vhost for non-MSI guests, which
will have worse performance with vhost. The option was deprecated with
commit 1e7398a140 ("vhost: enable vhost without without MSI-X") and
changed to behave identical with the vhost option for compatibility.

Worse, commit bf769f742c ("virtio: del net client if net_init_tap_one
failed") changed to delete the client when vhost fails even when the
failure only results in a warning. The leads to an assertion failure
for the -netdev command line option.

The reverted commit was intended to avoid that the vhost initialization
failure won't result in a corrupted netdev. This problem should have
been fixed by deleting netdev when the initialization fails instead of
ignoring the failure with an arbitrary option. Fortunately, commit
bf769f742c ("virtio: del net client if net_init_tap_one failed"),
mentioned earlier, implements this behavior.

Restore the correct semantics and fix the assertion failure for the
-netdev command line option by reverting the problematic commit.

Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com>
Signed-off-by: Jason Wang <jasowang@redhat.com>
2024-03-29 14:59:07 +08:00
..
can configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
af-xdp.c net/af-xdp.c: Don't leak sock_fds array in net_init_af_xdp() 2024-03-25 10:41:00 +00:00
announce.c
checksum.c
clients.h
colo-compare.c migration: privatize colo interfaces 2024-03-11 16:28:59 -04:00
colo-compare.h
colo.c
colo.h
dgram.c
dump.c
eth.c
filter-buffer.c
filter-mirror.c
filter-replay.c
filter-rewriter.c
filter.c
hub.c
hub.h
l2tpv3.c
meson.build configure, meson: rename targetos to host_os 2023-12-31 09:11:29 +01:00
net-hmp-cmds.c
net.c net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
netmap.c
queue.c
slirp.c migration: Use VMSTATE_INSTANCE_ID_ANY for slirp 2023-11-01 16:13:58 +01:00
socket.c
stream.c net: handle QIOTask completion to report useful error message 2024-01-11 11:39:26 +01:00
tap_int.h
tap-bsd.c
tap-linux.c
tap-linux.h
tap-solaris.c
tap-stub.c
tap-win32.c tap-win32: Remove unnecessary stubs 2024-03-29 14:59:07 +08:00
tap.c Revert "tap: setting error appropriately when calling net_init_tap_one()" 2024-03-29 14:59:07 +08:00
trace-events vdpa: add trace event for vhost_vdpa_net_load_mq 2024-03-12 17:56:55 -04:00
trace.h
util.c
util.h
vde.c
vhost-user-stub.c
vhost-user.c
vhost-vdpa-stub.c
vhost-vdpa.c virtio,pc,pci: features, cleanups, fixes 2024-03-13 15:11:53 +00:00
vmnet_int.h
vmnet-bridged.m
vmnet-common.m
vmnet-host.c
vmnet-shared.c