qemu/include/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
..
announce.h net/announce: Add optional ID 2019-07-02 10:21:06 +08:00
can_emu.h net/can: Add can_dlc2len and can_len2dlc for CAN FD. 2020-09-30 19:11:37 +02:00
can_host.h qom: fix objects with improper parent type 2020-10-12 11:50:22 -04:00
checksum.h net: checksum: Introduce fine control over checksum type 2021-01-25 17:04:56 +08:00
eth.h igb: Strip the second VLAN tag for extended VLAN 2023-05-23 15:20:15 +08:00
filter.h qapi: Move @String out of common.json to discourage reuse 2024-02-12 10:04:32 +01:00
net.h net: make nb_nics and nd_table[] static in net/net.c 2024-02-02 16:23:48 +00:00
queue.h net: introduce qemu_receive_packet() 2021-03-15 16:41:22 +08:00
slirp.h net: Remove the deprecated -tftp, -bootp, -redir and -smb options 2018-08-31 09:53:03 +02:00
tap.h Include qemu-common.h exactly where needed 2019-06-12 13:20:20 +02:00
vhost_net.h Revert "tap: setting error appropriately when calling net_init_tap_one()" 2024-03-29 14:59:07 +08:00
vhost-user.h vhost-user: Refactor vhost acked features saving 2023-01-08 01:54:22 -05:00
vhost-vdpa.h vhost-vdpa: remove the unused vhost_vdpa_get_acked_features() 2021-06-11 10:30:13 +08:00