summary refs log tree commit diff stats
path: root/net/queue.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2020-07-28 16:28:22 +0100
committerPeter Maydell <peter.maydell@linaro.org>2020-07-28 16:28:22 +0100
commita466dd084f51cdc9da2e99361f674f98d7218559 (patch)
treeaa614dbf4554ec28d779c6d68c197ef9640d428f /net/queue.c
parent1e0e0917e5df765575a72afd35a7183e65f505ac (diff)
parent22dc8663d9fc7baa22100544c600b6285a63c7a3 (diff)
downloadfocaccia-qemu-a466dd084f51cdc9da2e99361f674f98d7218559.tar.gz
focaccia-qemu-a466dd084f51cdc9da2e99361f674f98d7218559.zip
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
Want to send earlier but most patches just come.

- fix vhost-vdpa issues when no peer
- fix virtio-pci queue enabling index value
- forbid reentrant RX

Changes from V1:

- drop the patch that has been merged

# gpg: Signature made Tue 28 Jul 2020 09:59:41 BST
# gpg:                using RSA key EF04965B398D6211
# gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" [marginal]
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 215D 46F4 8246 689E C77F  3562 EF04 965B 398D 6211

* remotes/jasowang/tags/net-pull-request:
  net: forbid the reentrant RX
  virtio-net: check the existence of peer before accessing vDPA config
  virtio-pci: fix wrong index in virtio_pci_queue_enabled

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'net/queue.c')
-rw-r--r--net/queue.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/queue.c b/net/queue.c
index 0164727e39..19e32c80fd 100644
--- a/net/queue.c
+++ b/net/queue.c
@@ -250,6 +250,9 @@ void qemu_net_queue_purge(NetQueue *queue, NetClientState *from)
 
 bool qemu_net_queue_flush(NetQueue *queue)
 {
+    if (queue->delivering)
+        return false;
+
     while (!QTAILQ_EMPTY(&queue->packets)) {
         NetPacket *packet;
         int ret;