- Dec 12, 2018
-
-
Marc-André Lureau authored
COLO uses a worker context (iothread) to drive the chardev. All backends are not able to switch the context, let's report an error in this case. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20181205203737.9011-6-marcandre.lureau@redhat.com> Reviewed-by:
Li Zhijian <lizhiian@cn.fujitsu.com> Reviewed-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com>
-
- Dec 04, 2018
-
-
Jason Wang authored
If we want to qtest through hub, it would be much more simpler and safer to configure the hub without host network. So silent this warnings for qtest. Signed-off-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-id: 20181204035347.6148-3-jasowang@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
Jason Wang authored
We try to detect and drop too large packet (>INT_MAX) in 1592a994 ("net: ignore packet size greater than INT_MAX") during packet delivering. Unfortunately, this is not sufficient as we may hit another integer overflow when trying to queue such large packet in qemu_net_queue_append_iov(): - size of the allocation may overflow on 32bit - packet->size is integer which may overflow even on 64bit Fixing this by moving the check to qemu_sendv_packet_async() which is the entrance of all networking codes and reduce the limit to NET_BUFSIZE to be more conservative. This works since: - For the callers that call qemu_sendv_packet_async() directly, they only care about if zero is returned to determine whether to prevent the source from producing more packets. A callback will be triggered if peer can accept more then source could be enabled. This is usually used by high speed networking implementation like virtio-net or netmap. - For the callers that call qemu_sendv_packet() that calls qemu_sendv_packet_async() indirectly, they often ignore the return value. In this case qemu will just the drop packets if peer can't receive. Qemu will copy the packet if it was queued. So it was safe for both kinds of the callers to assume the packet was sent. Since we move the check from qemu_deliver_packet_iov() to qemu_sendv_packet_async(), it would be safer to make qemu_deliver_packet_iov() static to prevent any external user in the future. This is a revised patch of CVE-2018-17963. Cc: qemu-stable@nongnu.org Cc: Li Qiang <liq3ea@163.com> Fixes: 1592a994 ("net: ignore packet size greater than INT_MAX") Reported-by:
Li Qiang <liq3ea@gmail.com> Reviewed-by:
Li Qiang <liq3ea@gmail.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-id: 20181204035347.6148-2-jasowang@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Nov 16, 2018
-
-
Zhang Chen authored
The original code just follow the TCP state diagram, but in this case, we can skip the TCPS_TIME_WAIT state to simplify the implementation. Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Oct 21, 2018
-
-
Fam Zheng authored
This new usernet option can be used to add data for option 66 (tftp server name) in the BOOTP reply, which is useful in PXE based automatic OS install such as OpenBSD. Signed-off-by:
Fam Zheng <famz@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Tested-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Fam Zheng authored
When user provides a long domainname or hostname that doesn't fit in the DHCP packet, we mustn't overflow the response packet buffer. Instead, report errors, following the g_warning() in the slirp->vdnssearch branch. Also check the strlen against 256 when initializing slirp, which limit is also from the protocol where one byte represents the string length. This gives an early error before the warning which is harder to notice or diagnose. Reported-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by:
Fam Zheng <famz@redhat.com> Tested-by:
Gerd Hoffmann <kraxel@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Oct 19, 2018
-
-
Markus Armbruster authored
Calling error_report() in a function that takes an Error ** argument is suspicious. net_socket_fd_init() does that, and then fails without setting an error. Wrong. I didn't analyze how exactly this can break. A caller that reports the error on failure would crash. Broken when commit c37f0bb1 (v2.11.0) converted the function to Error. Fix by calling error_setg() instead of error_report(). Fixes: c37f0bb1 Cc: Jason Wang <jasowang@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20181017082702.5581-15-armbru@redhat.com>
-
Markus Armbruster authored
When -netdev l2tpv3 fails, it first reports a specific error, then a generic one, like this: $ qemu-system-x86_64 -netdev l2tpv3,id=foo,src=,dst=,txsession=1 qemu-system-x86_64: -netdev l2tpv3,id=foo,src=,dst=,txsession=1: l2tpv3_open : could not resolve src, errno = Name or service not known qemu-system-x86_64: Device 'l2tpv3' could not be initialized With the command line, the messages go to stderr. In HMP, they go to the monitor. In QMP, the second one becomes the error reply, and the first one goes to stderr. Convert net_init_tap() to Error. This suppresses the unwanted second message, and makes the specific error the QMP error reply. Cc: Jason Wang <jasowang@redhat.com> Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20181017082702.5581-14-armbru@redhat.com>
-
Jason Wang authored
There should not be a reason for passing a packet size greater than INT_MAX. It's usually a hint of bug somewhere, so ignore packet size greater than INT_MAX in qemu_deliver_packet_iov() CC: qemu-stable@nongnu.org Reported-by:
Daniel Shapira <daniel@twistlock.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
After one round of checkpoint, the states between PVM and SVM become consistent, so it is unnecessary to adjust the sequence of net packets for old connections, besides, while failover happens, filter-rewriter will into failover mode that needn't handle the new TCP connection. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
Filter needs to process the event of checkpoint/failover or other event passed by COLO frame. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
It's a good idea to use notifier to notify COLO frame of inconsistent packets comparing. Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
While do checkpoint, we need to flush all the unhandled packets, By using the filter notifier mechanism, we can easily to notify every compare object to do this process, which runs inside of compare threads as a coroutine. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
We add almost full TCP state machine in filter-rewriter, except TCPS_LISTEN and some simplify in VM active close FIN states. The reason for this simplify job is because guest kernel will track the TCP status and wait 2MSL time too, if client resend the FIN packet, guest will resend the last ACK, so we needn't wait 2MSL time in filter-rewriter. After a net connection is closed, we didn't clear its related resources in connection_track_table, which will lead to memory leak. Let's track the state of net connection, if it is closed, its related resources will be cleared up. Signed-off-by:
zhanghailiang <zhang.zhanghailiang@huawei.com> Signed-off-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Oct 03, 2018
-
-
Marc-André Lureau authored
This is mostly for readability of the code. Let's make it clear which callers can create an implicit monitor when the chardev is muxed. This will also enforce a safer behaviour, as we don't really support creating monitor anywhere/anytime at the moment. Add an assert() to make sure the programmer explicitely wanted that behaviour. There are documented cases, such as: -serial/-parallel/-virtioconsole and to less extent -debugcon. Less obvious and questionable ones are -gdb, SLIRP -guestfwd and Xen console. Add a FIXME note for those, but keep the support for now. Other qemu_chr_new() callers either have a fixed parameter/filename string or do not need it, such as -qtest: * qtest.c: qtest_init() Afaik, only used by tests/libqtest.c, without mux. I don't think we support it outside of qemu testing: drop support for implicit mux monitor (qemu_chr_new() call: no implicit mux now). * hw/ All with literal @filename argument that doesn't enable mux monitor. * tests/ All with @filename argument that doesn't enable mux monitor. On a related note, the list of monitor creation places: - the chardev creators listed above: all from command line (except perhaps Xen console?) - -gdb & hmp gdbserver will create a "GDB monitor command" chardev that is wired to an HMP monitor. - -mon command line option From this short study, I would like to think that a monitor may only be created in the main thread today, though I remain skeptical :) Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com>
-
- Sep 25, 2018
-
-
Thomas Huth authored
The "name" in the [hub_id name] parameter tuple is the same as a "netdev_id" (which should be unique), so specifying the hub_id here is just redundant (it was likely just necessary in the past when the network subsystem was still using "vlans" only and when it did not use unique "id"s yet). Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
Thomas Huth authored
In early times, network backends were specified by a "vlan" and "name" tuple. With the introduction of netdevs, the "name" was replaced by an "id" (which is supposed to be unique), but the "name" parameter stayed as an alias which could be used instead of "id". Unfortunately, we miss the duplication check for "name": $ qemu-system-x86_64 -net user,name=n1 -net user,name=n1 ... starts without an error, while "id" correctly complains: $ qemu-system-x86_64 -net user,id=n1 -net user,id=n1 qemu-system-x86_64: -net user,id=n1: Duplicate ID 'n1' for net Instead of trying to fix the code for the legacy "name" parameter, let's rather get rid of this old interface and deprecate the "name" parameter now - this will also be less confusing for the users in the long run. Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Aug 31, 2018
-
-
Thomas Huth authored
These options likely do not work as expected as soon as the user tries to use more than one network interface at once. The parameters have been marked as deprecated since QEMU v2.6, so users had plenty of time to move their scripts to the new syntax. Time to remove the old parameters now. Reviewed-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Acked-by:
Peter Krempa <pkrempa@redhat.com> Acked-by:
Ján Tomko <jtomko@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- Jul 20, 2018
-
-
Yunjian Wang authored
The memory leak on success to create a tap device. And the nfds and nvhosts may not be the same and need to be processed separately. Fixes: 07825977 ("tap: fix memory leak on failure to create a multiqueue tap device") Fixes: 264986e2 ("tap: multiqueue support") Cc: qemu-stable@nongnu.org Signed-off-by:
Yunjian Wang <wangyunjian@huawei.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jun 15, 2018
-
-
linzhecheng authored
As qemu_new_net_client create new ncs but error happens later, ncs will be left in global net_clients list and we can't use them any more, so we need to cleanup them. Cc: qemu-stable@nongnu.org Signed-off-by:
linzhecheng <linzhecheng@huawei.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Lin Ma authored
If user forgets to provide any backend types for '-netdev' in qemu CLI, It triggers seg fault. e.g. Expected: $ qemu -netdev id=net0 qemu-system-x86_64: Parameter 'type' is missing Actual: $ qemu -netdev id=net0 Segmentation fault (core dumped) Fixes: 547203ea ("net: List available netdevs with "-netdev help") Reviewed-by:
Thomas Huth <thuth@redhat.com> Cc: qemu-stable@nongnu.org Signed-off-by:
Lin Ma <lma@suse.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Brijesh Singh authored
A guest boot hangs while probing the network interface when iommu_platform=on is used. The following qemu cli hangs without this patch: # $QEMU \ -netdev tap,fd=3,id=hostnet0,vhost=on,vhostfd=4 3<>/dev/tap67 4<>/dev/host-net \ -device virtio-net-pci,netdev=hostnet0,id=net0,iommu_platform=on,disable-legacy=on \ ... Commit: c471ad0e (vhost_net: device IOTLB support) took care of setting vhostfd to non-blocking when QEMU opens /dev/host-net but if the fd is passed from qemu cli then we need to ensure that fd is set to non-blocking. Fixes: c471ad0e ("vhost_net: device IOTLB support") Cc: qemu-stable@nongnu.org Cc: Michael S. Tsirkin <mst@redhat.com> Cc: Jason Wang <jasowang@redhat.com> Signed-off-by:
Brijesh Singh <brijesh.singh@amd.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jun 12, 2018
-
-
Marc-André Lureau authored
A link property can be set during creation, with object_property_add_link() and later with object_property_set_link(). add_link() doesn't add a reference to the target object, while set_link() does. Furthemore, OBJ_PROP_LINK_UNREF_ON_RELEASE flags, set during add_link, says whether a reference must be released when the property is destroyed. This can lead to leaks if the property was later set_link(), as the added reference is never released. Instead, rename OBJ_PROP_LINK_UNREF_ON_RELEASE to OBJ_PROP_LINK_STRONG and use that has an indication on how the link handle reference management in set_link(). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-id: 20180531195119.22021-3-marcandre.lureau@redhat.com Signed-off-by:
Gerd Hoffmann <kraxel@redhat.com>
-
- Jun 01, 2018
-
-
Michael S. Tsirkin authored
When pulling in headers that are in the same directory as the C file (as opposed to one in include/), we should use its relative path, without a directory. Reviewed-by:
Zhang Chen <zhangckid@gmail.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Tested-by:
Philippe Mathieu-Daudé <f4bug@amsat.org>
-
- May 31, 2018
-
-
Nia Alarie authored
Signed-off-by:
Nia Alarie <nia.alarie@gmail.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Benjamin Drung authored
This patch will allow the user to include the domainname option in replies from the built-in DHCP server. Signed-off-by:
Benjamin Drung <benjamin.drung@profitbricks.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- May 24, 2018
-
-
Tiwei Bie authored
When multi queue is enabled e.g. for a virtio-net device, each queue pair will have a vhost_dev, and the only thing shared between vhost devs currently is the chardev. This patch introduces a vhost-user state structure which will be shared by all vhost devs of the same virtio device. Signed-off-by:
Tiwei Bie <tiwei.bie@intel.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- May 23, 2018
-
-
Tiwei Bie authored
We are going to introduce a shared vhost user state which will be named as 'VhostUserState'. So add 'Net' prefix to the existing internal state structure in the vhost-user netdev to avoid conflict. Signed-off-by:
Tiwei Bie <tiwei.bie@intel.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- May 14, 2018
-
-
Thomas Huth authored
'vlan' is very confusing since it does not mean something like IEEE 802.1Q, but rather emulated hubs, so let's switch to that terminology instead. Buglink: https://bugs.launchpad.net/qemu/+bug/658904 Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
It's been marked as deprecated since QEMU v2.9.0, so that should have been enough time for everybody to either just drop unnecessary "vlan=0" parameters, to switch to the modern -device + -netdev syntax for connecting guest NICs with host network backends, or to switch to the "hubport" netdev in case hubs are really wanted instead. Buglink: https://bugs.launchpad.net/qemu/+bug/658904 Signed-off-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
The early exits in case of errors leak the memory allocated for nd_id. Fix it by using a "goto out" to the cleanup at the end of the function instead. Reviewed-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Philippe Mathieu-Daudé <f4bug@amsat.org> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Mar 26, 2018
-
-
Julia Suvorova authored
Despite the fact that now when the initialization of vde fails, qemu does not end silently, no informative error is printed. The patch generates an error and pushes it through the calling function. Related bug: https://bugs.launchpad.net/qemu/+bug/676029 Signed-off-by:
Julia Suvorova <jusual@mail.ru> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Greg Kurz authored
If the backend could not transmit a packet right away for some reason, the packet is queued for asynchronous sending. The corresponding vq element is tracked in the async_tx.elem field of the VirtIONetQueue, for later freeing when the transmission is complete. If a reset happens before completion, virtio_net_tx_complete() will push async_tx.elem back to the guest anyway, and we end up with the inuse flag of the vq being equal to -1. The next call to virtqueue_pop() is then likely to fail with "Virtqueue size exceeded". This can be reproduced easily by starting a guest with an hubport backend that is not connected to a functional network, eg, -device virtio-net-pci,netdev=hub0 -netdev hubport,id=hub0,hubid=0 and no other -netdev hubport,hubid=0 on the command line. The appropriate fix is to ensure that such an asynchronous transmission cannot survive a device reset. So for all queues, we first try to send the packet again, and eventually we purge it if the backend still could not deliver it. CC: qemu-stable@nongnu.org Reported-by:
R. Nageswara Sastry <nasastry@in.ibm.com> Buglink: https://github.com/open-power-host-os/qemu/issues/37 Signed-off-by:
Greg Kurz <groug@kaod.org> Tested-by:
R. Nageswara Sastry <nasastry@in.ibm.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Mar 05, 2018
-
-
Jay Zhou authored
If netdev_add tap,id=net0,...,vhost=on failed in net_init_tap_one(), the followed up device_add virtio-net-pci,netdev=net0 will fail too, prints: TUNSETOFFLOAD ioctl() failed: Bad file descriptor TUNSETOFFLOAD ioctl() failed: Bad file descriptor The reason is that the fd of tap is closed when error occured after calling net_init_tap_one(). The fd should be closed when calling net_init_tap_one failed: - if tap_set_sndbuf() failed - if tap_set_sndbuf() succeeded but vhost failed to open or initialize with vhostforce flag on - with wrong vhost command line parameter The fd should not be closed just because vhost failed to open or initialize but without vhostforce flag. So the followed up device_add can fall back to userspace virtio successfully. Suggested-by:
Michael S. Tsirkin <mst@redhat.com> Suggested-by:
Igor Mammedov <imammedo@redhat.com> Suggested-by:
Jason Wang <jasowang@redhat.com> Signed-off-by:
Jay Zhou <jianjay.zhou@huawei.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
The legacy "-net" option can be quite confusing for the users since most people do not expect to get a "vlan" hub between their emulated guest hardware and the host backend. But so far, we are also not able to get rid of "-net" completely, since it is the only way to configure on-board NICs that can not be instantiated via "-device" yet. It's also a little bit shorter to type "-net nic -net tap" instead of "-device xyz,netdev=n1 -netdev tap,id=n1". So what we need is a new convenience option that is shorter to type than the full -device + -netdev stuff, and which can be used to configure the on-board NICs that can not be handled via -device yet. Thus this patch now provides such a new option "--nic": It adds an entry in the nd_table to configure a on-board / default NIC, creates a host backend and connects the two directly, without a confusing "vlan" hub inbetween. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
They are deprecated since QEMU v2.10, and so far nobody complained that these commands are still necessary for any reason - and since you can use 'netdev_add' and 'netdev_remove' instead, there also should not be any real reason. Since they are also standing in the way for the upcoming 'vlan' clean-up, it's now time to remove them. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
"-net dump" has been marked as deprecated since QEMU v2.10, since it only works with the deprecated 'vlan' parameter (or hubs). Network dumping should be done with "-object filter-dump" nowadays instead. Since nobody complained so far about the deprecation message, let's finally get rid of "-net dump" now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
The function is only used within net.c, so there's no need that this is a global function. While we're at it, also remove the unused prototype compute_mcast_idx() (the function has been removed in commit d9caeb09). Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
Other options like "-chardev" or "-device" feature a nice help text with the available devices when being called with "help" or "?". Since it is quite useful, especially if you want to see which network backends have been compiled into the QEMU binary, let's provide such a help text for "-netdev", too. Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Thomas Huth authored
It looks strange that net_init_client() and net_init_netdev() both take an "Error **errp" parameter, but then do the error reporting with "error_report_err(local_err)" on their own. Let's move the error reporting to the calling site instead to simplify this code a little bit. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-