- Nov 28, 2021
-
-
Eugenio Pérez authored
Qemu falls back on userland handlers even if vhost-user and vhost-vdpa cases. These assumes a tap device can handle the packets. If a vdpa device fail to start, it can trigger a sigsegv because of that. Add dummy receiver that returns no progress so it can keep running. Fixes: 1e0a84ea ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by:
Eugenio Pérez <eperezma@redhat.com> Message-Id: <20211125101614.76927-2-eperezma@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Acked-by:
Jason Wang <jasowang@redhat.com>
-
- Nov 19, 2021
-
-
Zhang Chen authored
Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Zhang Chen authored
The TCP protocol ACK maybe bigger than uint32_t MAX. At this time, the ACK will reverse to 0. This patch fix the max_ack and min_ack track issue. Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Nov 15, 2021
-
-
Eugenio Pérez authored
Since net_init_vhost_vdpa is trying to open it. Not specifying it in the command line crash qemu. Fixes: 7327813d ("vhost-vdpa: open device fd in net_init_vhost_vdpa()") Signed-off-by:
Eugenio Pérez <eperezma@redhat.com> Message-Id: <20211112193431.2379298-3-eperezma@redhat.com> Acked-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Eugenio Pérez authored
There is no reason to keep using the old one, since we neither use the variadics arguments nor open it with O_DIRECT. Also, net_client_init1, the caller of net_init_vhost_vdpa, wants all net_client_init_fun to use Error API, so it's a good step in that direction. Signed-off-by:
Eugenio Pérez <eperezma@redhat.com> Message-Id: <20211112193431.2379298-2-eperezma@redhat.com> Acked-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Nov 11, 2021
-
-
Stefano Garzarella authored
Use g_autofree to ensure that `config` is freed when vhost_vdpa_get_max_queue_pairs() returns. Reported-by: Coverity (CID 1465228: RESOURCE_LEAK) Fixes: 40237840 ("vhost-vdpa: multiqueue support") Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Message-Id: <20211102155157.241034-1-sgarzare@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Acked-by:
Jason Wang <jasowang@redhat.com>
-
- Nov 03, 2021
-
-
Rao, Lei authored
Remove some unnecessary code to improve the performance of the filter-rewriter module. Signed-off-by:
Lei Rao <lei.rao@intel.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@trasno.org>
-
Rao, Lei authored
Signed-off-by:
Lei Rao <lei.rao@intel.com> Reviewed-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reviewed-by:
Juan Quintela <quintela@redhat.com> Signed-off-by:
Juan Quintela <quintela@redhat.com>
-
- Nov 02, 2021
-
-
Thomas Huth authored
And while we're at it, also provide a proper entry for this feature in meson_options.txt, so that people who don't need it have a knob to disable this feature. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20211028185910.1729744-3-thuth@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Oct 20, 2021
-
-
Jason Wang authored
This patch implements the multiqueue support for vhost-vdpa. This is done simply by reading the number of queue pairs from the config space and initialize the datapath and control path net client. Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-11-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
This patch introduces a boolean for the device has control queue which can accepts control command via network queue. The first user would be the control virtqueue support for vhost. Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-6-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
This patch switches to let net_vhost_vdpa_init() to return NetClientState *. This is used for the callers to allocate multiqueue NetClientState for multiqueue support. Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-5-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
This patch switches to open device fd in net_init_vhost_vpda(). This is used to prepare for the multiqueue support. Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-2-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Oct 15, 2021
-
-
Kevin Wolf authored
vhost-vdpa works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them. This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo' should complain about an unknown property, not about the wrong kind of network device being attached) and completely ignores hotplugging. Drop the old checks and implement .check_peer_type() instead to fix this. As a nice side effect, it also removes one more dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211008133442.141332-4-kwolf@redhat.com> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Acked-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Peter Krempa <pkrempa@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
vhost-user works only with specific devices. At startup, it second guesses what the command line option handling will do and error out if it thinks a non-virtio device will attach to them. This second guessing is not only ugly, it can lead to wrong error messages ('-device floppy,netdev=foo' should complain about an unknown property, not about the wrong kind of network device being attached) and completely ignores hotplugging. Drop the old checks and implement .check_peer_type() instead to fix this. As a nice side effect, it also removes one more dependency on the legacy QemuOpts infrastructure and even reduces the code size. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20211008133442.141332-3-kwolf@redhat.com> Reviewed-by:
Damien Hedde <damien.hedde@greensocs.com> Acked-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Tested-by:
Peter Krempa <pkrempa@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Oct 14, 2021
-
-
Paolo Bonzini authored
Message-Id: <20211007130829.632254-12-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
Paolo Bonzini authored
Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20211007130829.632254-11-pbonzini@redhat.com> Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- Sep 04, 2021
-
-
Jason Wang authored
The queue_index of NetClientState should be assigned in set_netdev() afterwards, so trying to net_vhost_vdpa_init() is meaningless. This patch removes this. Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-12-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
Vhost_vdpa_add() can fail for various reasons, so the assertion of the succeed is wrong. Instead, we should free the NetClientState and propagate the error to the caller Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-11-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
Introduce new error label to avoid the unnecessary checking of net pointer. Fixes: 1e0a84ea ("vhost-vdpa: introduce vhost-vdpa net client") Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-10-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
Fixes: 1e0a84ea ("vhost-vdpa: introduce vhost-vdpa net client") Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-9-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
The previous vhost_net_cleanup is sufficient for freeing, calling vhost_vdpa_del() in this case will lead an extra round of free. Note that this kind of "double free" is safe since vhost_dev_cleanup() zero the whole structure. Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-8-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
The VhostVDPAState is just allocated by qemu_new_net_client() via g_malloc0() in net_vhost_vdpa_init(). So s->vhost_net is NULL for sure, let's remove this unnecessary check in vhost_vdpa_add(). Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-7-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
This patch switches to initialize dev.nvqs from the VhostNetOptions instead of assuming it was 2. This is useful for implementing control virtqueue support which will be a single vhost_net structure with a single cvq. Note that nvqs is still set to 2 for all users and this patch does not change functionality. Reviewed-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Eli Cohen <elic@nvidia.com> Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-6-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
Jason Wang authored
"acked_features" is unused, let's remove that. Signed-off-by:
Jason Wang <jasowang@redhat.com> Message-Id: <20210903091031.47303-2-jasowang@redhat.com> Reviewed-by:
Michael S. Tsirkin <mst@redhat.com> Signed-off-by:
Michael S. Tsirkin <mst@redhat.com>
-
- Aug 26, 2021
-
-
Peter Maydell authored
We don't currently zero-initialize the 'struct sockaddr_in' that parse_host_port() fills in, so any fields we don't explicitly initialize might be left as random garbage. POSIX states that implementations may define extensions in sockaddr_in, and that those extensions must not trigger if zero-initialized. So not zero initializing might result in inadvertently triggering an impdef extension. memset() the sockaddr_in before we start to fill it in. Fixes: Coverity CID 1005338 Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Reviewed-by:
Eric Blake <eblake@redhat.com> Message-id: 20210813150506.7768-2-peter.maydell@linaro.org
-
- Aug 05, 2021
-
-
Marc-André Lureau authored
Since commit 9894dc0c "char: convert from GIOChannel to QIOChannel", the first argument to the watch callback can actually be a QIOChannel, which is not a GIOChannel (but a QEMU Object). Even though we never used that pointer, change the callback type to warn the users. Possibly a better fix later, we may want to store the callback and call it from intermediary functions. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- Jul 26, 2021
-
-
Richard Henderson authored
From clang-13: ../qemu/net/checksum.c:189:23: error: variable 'buf_off' set but not used \ [-Werror,-Wunused-but-set-variable] Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 11, 2021
-
-
Rao, Lei authored
The data pointer has skipped vnet_hdr_len in the function of parse_packet_early().So, we can not subtract vnet_hdr_len again when calculating pkt->header_size in fill_pkt_tcp_info(). Otherwise, it will cause network packet comparsion errors and greatly increase the frequency of checkpoints. Signed-off-by:
Lei Rao <lei.rao@intel.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Tested-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Rao, Lei authored
This patch fixes the following: #0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50 #1 0x00007f6ae4559859 in __GI_abort () at abort.c:79 #2 0x0000559aaa386720 in error_exit (err=16, msg=0x559aaa5973d0 <__func__.16227> "qemu_mutex_destroy") at util/qemu-thread-posix.c:36 #3 0x0000559aaa3868c5 in qemu_mutex_destroy (mutex=0x559aabffe828) at util/qemu-thread-posix.c:69 #4 0x0000559aaa2f93a8 in char_finalize (obj=0x559aabffe800) at chardev/char.c:285 #5 0x0000559aaa23318a in object_deinit (obj=0x559aabffe800, type=0x559aabfd7d20) at qom/object.c:606 #6 0x0000559aaa2331b8 in object_deinit (obj=0x559aabffe800, type=0x559aabfd9060) at qom/object.c:610 #7 0x0000559aaa233200 in object_finalize (data=0x559aabffe800) at qom/object.c:620 #8 0x0000559aaa234202 in object_unref (obj=0x559aabffe800) at qom/object.c:1074 #9 0x0000559aaa2356b6 in object_finalize_child_property (obj=0x559aac0dac10, name=0x559aac778760 "compare0-0", opaque=0x559aabffe800) at qom/object.c:1584 #10 0x0000559aaa232f70 in object_property_del_all (obj=0x559aac0dac10) at qom/object.c:557 #11 0x0000559aaa2331ed in object_finalize (data=0x559aac0dac10) at qom/object.c:619 #12 0x0000559aaa234202 in object_unref (obj=0x559aac0dac10) at qom/object.c:1074 #13 0x0000559aaa2356b6 in object_finalize_child_property (obj=0x559aac0c75c0, name=0x559aac0dadc0 "chardevs", opaque=0x559aac0dac10) at qom/object.c:1584 #14 0x0000559aaa233071 in object_property_del_child (obj=0x559aac0c75c0, child=0x559aac0dac10, errp=0x0) at qom/object.c:580 #15 0x0000559aaa233155 in object_unparent (obj=0x559aac0dac10) at qom/object.c:599 #16 0x0000559aaa2fb721 in qemu_chr_cleanup () at chardev/char.c:1159 #17 0x0000559aa9f9b110 in main (argc=54, argv=0x7ffeb62fa998, envp=0x7ffeb62fab50) at vl.c:4539 When chardev is cleaned up, chr_write_lock needs to be destroyed. But the colo-compare module is not cleaned up normally before it when the guest poweroff. It is holding chr_write_lock at this time. This will cause qemu crash.So we add the function of colo_compare_cleanup() before qemu_chr_cleanup() to fix the bug. Signed-off-by:
Lei Rao <lei.rao@intel.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Tested-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Rao, Lei authored
Use the packet_new_nocopy instead of packet_new in the filter-rewriter module. There will be one less memory copy in the processing of each network packet. Signed-off-by:
Lei Rao <lei.rao@intel.com> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Rao, Lei authored
The iov_size has been calculated in filter_send(). we can directly return the size.In this way, this is no need to repeat calculations in filter_redirector_receive_iov(); Signed-off-by:
Lei Rao <lei.rao@intel.com> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Tested-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Rao, Lei authored
There is the same trace code in the colo_compare_packet_payload. Signed-off-by:
Lei Rao <lei.rao@intel.com> Reviewed-by:
Li Zhijian <lizhijian@fujitsu.com> Reviewed-by:
Zhang Chen <chen.zhang@intel.com> Reviewed-by:
Lukas Straub <lukasstraub2@web.de> Tested-by:
Lukas Straub <lukasstraub2@web.de> Signed-off-by:
Zhang Chen <chen.zhang@intel.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Jason Wang authored
No user for this helper, let's remove it. Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jun 04, 2021
-
-
Andrew Melnychenko authored
When RSS is enabled the device tries to load the eBPF program to select RX virtqueue in the TUN. If eBPF can be loaded the RSS will function also with vhost (works with kernel 5.8 and later). Software RSS is used as a fallback with vhost=off when eBPF can't be loaded or when hash population requested by the guest. Signed-off-by:
Yuri Benditovich <yuri.benditovich@daynix.com> Signed-off-by:
Andrew Melnychenko <andrew@daynix.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Andrew Melnychenko authored
For now, that method supported only by Linux TAP. Linux TAP uses TUNSETSTEERINGEBPF ioctl. Signed-off-by:
Andrew Melnychenko <andrew@daynix.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Andrew Melnychenko authored
Additional code that will be used for eBPF setting steering routine. Signed-off-by:
Andrew Melnychenko <andrew@daynix.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jun 02, 2021
-
-
Stefano Garzarella authored
Commit e50caf4a ("tracing: convert documentation to rST") converted docs/devel/tracing.txt to docs/devel/tracing.rst. We still have several references to the old file, so let's fix them with the following command: sed -i s/tracing.txt/tracing.rst/ $(git grep -l docs/devel/tracing.txt) Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Message-Id: <20210517151702.109066-2-sgarzare@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 27, 2021
-
-
Brad Smith authored
OpenBSD added support for tap(4) 10 releases ago. Remove the special casing for older releases. Signed-off-by:
Brad Smith <brad@comstyle.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- May 04, 2021
-
-
Joelle van Dyne authored
Replace Windows specific macro with a more generic feature detection macro. Allows slirp smb feature to be disabled manually as well. Acked-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Joelle van Dyne <j@getutm.app> Message-Id: <20210315180341.31638-5-j@getutm.app> [Use $default_feature as the default. - Paolo] Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-