- 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>
-
- Apr 23, 2021
-
-
Jason Wang authored
There could be case that peer is NULL. This can happen when during network device hot-add where net device needs to be added first. So the patch check the existence of peer before trying to do the pad. Fixes: 969e50b6 ("net: Pad short frames to minimum size before sending from SLiRP/TAP") Signed-off-by:
Jason Wang <jasowang@redhat.com> Reviewed-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Stefan Weil <sw@weilnetz.de> Message-id: 20210423031803.1479-1-jasowang@redhat.com Signed-off-by:
Peter Maydell <peter.maydell@linaro.org>
-
- Apr 08, 2021
-
-
Jason Wang authored
Several issues has been reported for query-netdev series. Consider it's late in the rc, this reverts commit d32ad10a. Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Jason Wang authored
Several issues has been reported for query-netdev info series. Consider it's late in the rc, this reverts commit commit 59b5437e. Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Jason Wang authored
Several issues has been reported for query-netdev info series. Consider it's late in the rc, this reverts commit f2e8319d. Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Mar 22, 2021
-
-
Bin Meng authored
The minimum Ethernet frame length is 60 bytes. For short frames with smaller length like ARP packets (only 42 bytes), on a real world NIC it can choose either padding its length to the minimum required 60 bytes, or sending it out directly to the wire. Such behavior can be hardcoded or controled by a register bit. Similarly on the receive path, NICs can choose either dropping such short frames directly or handing them over to software to handle. On the other hand, for the network backends like SLiRP/TAP, they don't expose a way to control the short frame behavior. As of today they just send/receive data from/to the other end connected to them, which means any sized packet is acceptable. So they can send and receive short frames without any problem. It is observed that ARP packets sent from SLiRP/TAP are 42 bytes, and SLiRP/TAP just send these ARP packets to the other end which might be a NIC model that does not allow short frames to pass through. To provide better compatibility, for packets sent from QEMU network backends like SLiRP/TAP, we change to pad short frames before sending it out to the other end, if the other end does not forbid it via the nc->do_not_pad flag. This ensures a backend as an Ethernet sender does not violate the spec. But with this change, the behavior of dropping short frames from SLiRP/TAP interfaces in the NIC model cannot be emulated because it always receives a packet that is spec complaint. The capability of sending short frames from NIC models is still supported and short frames can still pass through SLiRP/TAP. This commit should be able to fix the issue as reported with some NIC models before, that ARP requests get dropped, preventing the guest from becoming visible on the network. It was workarounded in these NIC models on the receive path, that when a short frame is received, it is padded up to 60 bytes. The following 2 commits seem to be the one to workaround this issue in e1000 and vmxenet3 before, and should probably be reverted. commit 78aeb23e ("e1000: Pad short frames to minimum size (60 bytes)") commit 40a87c6c ("vmxnet3: Pad short frames to minimum size (60 bytes)") Signed-off-by:
Bin Meng <bmeng.cn@gmail.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Mar 15, 2021
-
-
Alexey Kirillov authored
As we use QAPI NetClientState->stored_config to store and get information about backend network devices, we can drop fill of legacy field info_str for them. We still use info_str field for NIC and hubports, so we can not completely remove it. Signed-off-by:
Alexey Kirillov <lekiravi@yandex-team.ru> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Alexey Kirillov authored
The info_str field of the NetClientState structure is static and has a size of 256 bytes. This amount is often unclaimed, and the field itself is used exclusively for HMP "info network". The patch translates info_str to dynamic memory allocation. This action is also allows us to painlessly discard usage of this field for backend devices. Signed-off-by:
Alexey Kirillov <lekiravi@yandex-team.ru> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
Alexey Kirillov authored
The query-netdev command is used to get the configuration of the current network device backends (netdevs). This is the QMP analog of the HMP command "info network" but only for netdevs (i.e. excluding NIC and hubports). The query-netdev command returns an array of objects of the NetdevInfo type, which are an extension of Netdev type. It means that response can be used for netdev-add after small modification. This can be useful for recreate the same netdev configuration. Information about the network device is filled in when it is created or modified and is available through the NetClientState->stored_config. Signed-off-by:
Alexey Kirillov <lekiravi@yandex-team.ru> Acked-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Jan 29, 2021
-
-
Doug Evans authored
DNS should be DHCP Signed-off-by:
Doug Evans <dje@google.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Message-Id: <20210122004251.843837-1-dje@google.com> Signed-off-by:
Laurent Vivier <laurent@vivier.eu>
-
- Jan 08, 2021
-
-
Peter Maydell authored
This commit is the result of running the timer-del-timer-free.cocci script on the whole source tree. Signed-off-by:
Peter Maydell <peter.maydell@linaro.org> Acked-by:
Corey Minyard <cminyard@mvista.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Message-id: 20201215154107.3255-4-peter.maydell@linaro.org
-
- Mar 09, 2020
-
-
Thomas Huth authored
It's been deprecated since QEMU v3.1.0. Time to finally remove it now. Signed-off-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20191205104109.18680-1-thuth@redhat.com> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Reworked Thomas's deprecated.texi to the rst
-
- Oct 01, 2019
-
-
Samuel Thibault authored
This can be used to set a DNS server to be used by the guest which is different from the one configured on the host. Buglink: https://bugs.launchpad.net/qemu/+bug/1010484 Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com>
-
- Sep 12, 2019
-
-
Dr. David Alan Gilbert authored
Commit 78dd48df removed the last caller of register_savevm_live for an instantiable device (rather than a single system wide device); so trim out the parameter. Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com> Message-Id: <20190822115433.12070-1-dgilbert@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Reviewed-by:
Cornelia Huck <cohuck@redhat.com> Signed-off-by:
Dr. David Alan Gilbert <dgilbert@redhat.com>
-
- May 17, 2019
-
-
Stefano Garzarella authored
Reword and add a missing parentheses at the end of the error message. Signed-off-by:
Stefano Garzarella <sgarzare@redhat.com> Reviewed-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Reviewed-by:
Markus Armbruster <armbru@redhat.com> Signed-off-by:
Jason Wang <jasowang@redhat.com>
-
- Mar 07, 2019
-
-
Marc-André Lureau authored
Use the "system" libslirp if its present or requested. Else build with a static libslirp.a if slirp/ is checked out ("internal") or a submodule ("git"). Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-7-marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Prepare for making slirp/ a standalone project. Remove some useless includes while at it. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-5-marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
slirp migration code uses QEMU vmstate so far, when building WITH_QEMU. Introduce slirp_state_{load,save,version}() functions to move the state saving handling to libslirp side. So far, the bitstream compatibility should remain equal with current QEMU, as this is effectively using the same code, with the same format etc. When libslirp is made standalone, we will need some mechanism to ensure bitstream compatibility regardless of the libslirp version installed. See the FIXME note in the code. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20190212162524.31504-3-marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Mar 06, 2019
-
-
Samuel Thibault authored
Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Feb 13, 2019
-
-
Paolo Bonzini authored
This will be needed by vhost-user-test, when each test switches to its own GMainLoop and GMainContext. Otherwise, for a reconnecting socket the initial connection will happen on the default GMainContext, and no one will be listening on it. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20190202110834.24880-1-pbonzini@redhat.com> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com>
-
- Feb 07, 2019
-
-
Marc-André Lureau authored
This is friendlier for FFI bindings. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
It would be legitimate to use libslirp without glib. Let's add_poll/get_revents pair of callbacks to provide the same functionality. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Remove hard-coded dependency on slirp in main-loop, and use a "poll" notifier instead. The notifier is registered per slirp instance. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Use a more descriptive name for the callback. Reuse the SlirpWriteCb type. Wrap it to check that all data has been written. Return a ssize_t for potential error handling and data-loss reporting. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Introduce a SlirpCb callback to kick the main io-thread. Add an intermediary sodrop() function that will call SlirpCb.notify callback when sbdrop() returns true. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Add a counter-part to register_poll_fd() for completeness. (so far, register_poll_fd() is called only on struct socket fd) Suggested-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Replace qemu_set_nonblock() with slirp_set_nonblock() qemu_set_nonblock() does some event registration with the main loop. Add a new callback register_poll_fd() for that reason. Always build the fd-register stub, to avoid #if WIN32. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Instead of calling into QEMU chardev directly, and mixing it with slirp_add_exec() handling, add a new function slirp_add_guestfwd() which takes a write callback. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
- Jan 13, 2019
-
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Since commit 12f8def0 (v2.9), qemu requires Vista. Let's remove some conditional code. Note that this introduces a missing declaration warning with mingw. warning: implicit declaration of function 'inet_ntop' See also: https://sourceforge.net/p/mingw-w64/mailman/message/36473782/ We could workaround it by declaring it ourself depending on __MINGW64_VERSION_*: WINSOCK_API_LINKAGE INT WSAAPI inet_pton(int Family, PCTSTR pszAddrString, PVOID pAddrBuf); Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Only slirp/libslirp.h should be included. Instead of using some slirp declarations and utility functions directly, let's copy them in net/util.h. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Tested-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
This will bring slirp a bit forward to the state of an independent project. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
There is nothing performance-sensitive in returning an allocated string for info, and handling the monitor_printf() on the caller side. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Let's not mix command line and chardev pointers. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-
Marc-André Lureau authored
Let's make the slirp interface a bit more library-like. Associate the slirp_output() with a Slirp context. Signed-off-by:
Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by:
Samuel Thibault <samuel.thibault@ens-lyon.org>
-