fd3c3333 | 21-Feb-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: open-code qemu_socket_(un)select()
We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still.
Signed-off-by: Marc-André Lureau <marca
slirp: open-code qemu_socket_(un)select()
We are about to make the QEMU socket API use file-descriptor space only, but libslirp gives us SOCKET as fd, still.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20230221124802.4103554-14-marcandre.lureau@redhat.com>
show more ...
|
21ac7284 | 21-Feb-2023 |
Marc-André Lureau <marcandre.lureau@redhat.com> |
slirp: unregister the win32 SOCKET
Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now h
slirp: unregister the win32 SOCKET
Presumably, this is what should happen when the SOCKET is to be removed. (it probably worked until now because closesocket() does it implicitly, but we never now how the slirp library could use the SOCKET later)
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Reviewed-by: Stefan Berger <stefanb@linux.ibm.com> Message-Id: <20230221124802.4103554-13-marcandre.lureau@redhat.com>
show more ...
|
65f474bb | 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
net/eth: Introduce EthL4HdrProto
igb, a new network device emulation, will need SCTP checksum offloading. Currently eth_get_protocols() has a bool parameter for each protocol currently it supports,
net/eth: Introduce EthL4HdrProto
igb, a new network device emulation, will need SCTP checksum offloading. Currently eth_get_protocols() has a bool parameter for each protocol currently it supports, but there will be a bit too many parameters if we add yet another protocol.
Introduce an enum type, EthL4HdrProto to represent all L4 protocols eth_get_protocols() support with one parameter.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
69ff5ef8 | 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
net/eth: Report if headers are actually present
The values returned by eth_get_protocols() are used to perform RSS, checksumming and segmentation. Even when a packet signals the use of the protocols
net/eth: Report if headers are actually present
The values returned by eth_get_protocols() are used to perform RSS, checksumming and segmentation. Even when a packet signals the use of the protocols which these operations can be applied to, the headers for them may not be present because of too short packet or fragmentation, for example. In such a case, the operations cannot be applied safely.
Report the presence of headers instead of whether the use of the protocols are indicated with eth_get_protocols(). This also makes corresponding changes to the callers of eth_get_protocols() to match with its new signature and to remove redundant checks for fragmentation.
Fixes: 75020a7021 ("Common definitions for VMWARE devices") Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
02ef5fdc | 23-Feb-2023 |
Akihiko Odaki <akihiko.odaki@daynix.com> |
hw/net/net_tx_pkt: Implement TCP segmentation
There was no proper implementation of TCP segmentation before this change, and net_tx_pkt relied solely on IPv4 fragmentation. Not only this is not alig
hw/net/net_tx_pkt: Implement TCP segmentation
There was no proper implementation of TCP segmentation before this change, and net_tx_pkt relied solely on IPv4 fragmentation. Not only this is not aligned with the specification, but it also resulted in corrupted IPv6 packets.
This is particularly problematic for the igb, a new proposed device implementation; igb provides loopback feature for VMDq and the feature relies on software segmentation.
Implement proper TCP segmentation in net_tx_pkt to fix such a scenario.
Signed-off-by: Akihiko Odaki <akihiko.odaki@daynix.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
609ab4c3 | 03-Mar-2023 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa net: allow VHOST_F_LOG_ALL
Since some actions move to the start function instead of init, the device features may not be the parent vdpa device's, but the one returned by vhost backend. If tra
vdpa net: allow VHOST_F_LOG_ALL
Since some actions move to the start function instead of init, the device features may not be the parent vdpa device's, but the one returned by vhost backend. If transition to SVQ is supported, the vhost backend will return _F_LOG_ALL to signal the device is migratable.
Add VHOST_F_LOG_ALL. HW dirty page tracking can be added on top of this change if the device supports it in the future.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Message-Id: <20230303172445.1089785-14-eperezma@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
5c1ebd4c | 03-Mar-2023 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa: block migration if device has unsupported features
A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If th
vdpa: block migration if device has unsupported features
A vdpa net device must initialize with SVQ in order to be migratable at this moment, and initialization code verifies some conditions. If the device is not initialized with the x-svq parameter, it will not expose _F_LOG so the vhost subsystem will block VM migration from its initialization.
Next patches change this, so we need to verify migration conditions differently.
QEMU only supports a subset of net features in SVQ, and it cannot migrate state that cannot track or restore in the destination. Add a migration blocker if the device offers an unsupported feature.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20230303172445.1089785-12-eperezma@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
9c363cf6 | 03-Mar-2023 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa net: block migration if the device has CVQ
Devices with CVQ need to migrate state beyond vq state. Leaving this to future series.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id
vdpa net: block migration if the device has CVQ
Devices with CVQ need to migrate state beyond vq state. Leaving this to future series.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20230303172445.1089785-11-eperezma@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
69498430 | 03-Mar-2023 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa: add vdpa net migration state notifier
This allows net to restart the device backend to configure SVQ on it.
Ideally, these changes should not be net specific and they could be done in: * vhos
vdpa: add vdpa net migration state notifier
This allows net to restart the device backend to configure SVQ on it.
Ideally, these changes should not be net specific and they could be done in: * vhost_vdpa_set_features (with VHOST_F_LOG_ALL) * vhost_vdpa_set_vring_addr (with .enable_log) * vhost_vdpa_set_log_base.
However, the vdpa net backend is the one with enough knowledge to configure everything because of some reasons: * Queues might need to be shadowed or not depending on its kind (control vs data). * Queues need to share the same map translations (iova tree).
Also, there are other problems that may have solutions but complicates the implementation at this stage: * We're basically duplicating vhost_dev_start and vhost_dev_stop, and they could go out of sync. If we want to reuse them, we need a way to skip some function calls to avoid recursiveness (either vhost_ops -> vhost_set_features, vhost_set_vring_addr, ...). * We need to traverse all vhost_dev of a given net device twice: one to stop and get the vq state and another one after the reset to configure properties like address, fd, etc.
Because of that it is cleaner to restart the whole net backend and configure again as expected, similar to how vhost-kernel moves between userspace and passthrough.
If more kinds of devices need dynamic switching to SVQ we can: * Create a callback struct like VhostOps and move most of the code there. VhostOps cannot be reused since all vdpa backend share them, and to personalize just for networking would be too heavy. * Add a parent struct or link all the vhost_vdpa or vhost_dev structs so we can traverse them.
Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Message-Id: <20230303172445.1089785-9-eperezma@redhat.com> Tested-by: Lei Yang <leiyang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
show more ...
|
525ae115 | 17-Jan-2023 |
Eugenio Pérez <eperezma@redhat.com> |
vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check
VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and VHOST_BACKE
vdpa: fix VHOST_BACKEND_F_IOTLB_ASID flag check
VHOST_BACKEND_F_IOTLB_ASID is the feature bit, not the bitmask. Since the device under test also provided VHOST_BACKEND_F_IOTLB_MSG_V2 and VHOST_BACKEND_F_IOTLB_BATCH, this went unnoticed.
Fixes: c1a1008685 ("vdpa: always start CVQ in SVQ mode if possible") Signed-off-by: Eugenio Pérez <eperezma@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Acked-by: Jason Wang <jasowang@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
148fbf0d | 19-Jan-2023 |
Laurent Vivier <lvivier@redhat.com> |
net: stream: add a new option to automatically reconnect
In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device an
net: stream: add a new option to automatically reconnect
In stream mode, if the server shuts down there is currently no way to reconnect the client to a new server without removing the NIC device and the netdev backend (or to reboot).
This patch introduces a reconnect option that specifies a delay to try to reconnect with the same parameters.
Add a new test in qtest to test the reconnect option and the connect/disconnect events.
Signed-off-by: Laurent Vivier <lvivier@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
993f71ee | 01-Jan-2023 |
Joelle van Dyne <j@getutm.app> |
vmnet: stop recieving events when VM is stopped
When the VM is stopped using the HMP command "stop", soon the handler will stop reading from the vmnet interface. This causes a flood of `VMNET_INTERF
vmnet: stop recieving events when VM is stopped
When the VM is stopped using the HMP command "stop", soon the handler will stop reading from the vmnet interface. This causes a flood of `VMNET_INTERFACE_PACKETS_AVAILABLE` events to arrive and puts the host CPU at 100%. We fix this by removing the event handler from vmnet when the VM is no longer in a running state and restore it when we return to a running state.
Signed-off-by: Joelle van Dyne <j@getutm.app> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
0c65ef4f | 30-Dec-2022 |
Christian Svensson <blue@cmd.nu> |
net: Increase L2TPv3 buffer to fit jumboframes
Increase the allocated buffer size to fit larger packets. Given that jumboframes can commonly be up to 9000 bytes the closest suitable value seems to b
net: Increase L2TPv3 buffer to fit jumboframes
Increase the allocated buffer size to fit larger packets. Given that jumboframes can commonly be up to 9000 bytes the closest suitable value seems to be 16 KiB.
Tested by running qemu towards a Linux L2TPv3 endpoint and pushing jumboframe traffic through the interfaces.
Signed-off-by: Christian Svensson <blue@cmd.nu> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
3b0cca8e | 10-Nov-2022 |
Thomas Huth <thuth@redhat.com> |
net: Replace "Supported NIC models" with "Available NIC models"
Just because a NIC model is compiled into the QEMU binary does not necessary mean that it can be used with each and every machine. So
net: Replace "Supported NIC models" with "Available NIC models"
Just because a NIC model is compiled into the QEMU binary does not necessary mean that it can be used with each and every machine. So let's rather talk about "available" models instead of "supported" models, just to avoid confusion.
Reviewed-by: Claudio Fontana <cfontana@suse.de> Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|
27c81924 | 10-Nov-2022 |
Thomas Huth <thuth@redhat.com> |
net: Restore printing of the help text with "-nic help"
Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions (it showed the available netdev backends), but this feature got br
net: Restore printing of the help text with "-nic help"
Running QEMU with "-nic help" used to work in QEMU 5.2 and earlier versions (it showed the available netdev backends), but this feature got broken during some refactoring in version 6.0. Let's restore the old behavior, and while we're at it, let's also print the available NIC models here now since this option can be used to configure both, netdev backend and model in one go.
Fixes: ad6f932fe8 ("net: do not exit on "netdev_add help" monitor command") Signed-off-by: Thomas Huth <thuth@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com>
show more ...
|