[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activat
From: |
Shmulik Ladkani |
Subject: |
[Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated |
Date: |
Tue, 18 Aug 2015 14:25:42 +0300 |
As of a90a7425cf592a3afeff3eaf32f543b83050ee5c 'tap: Drop tap_can_send'
vmxnet3 (with tap networking) can no longer receive once device is
deactivated.
Alas, as the device is initially "inactive", this brakes vmxnet3
receive functionality.
vmxnet3_can_receive() checks its internal 'device_active' flag (among
other tests).
However, as of a90a7425cf, if 'device_active' is false, packets will be
queued by tap_send (at qemu_net_queue_send).
However, vmxnet3 never flushes the queue, even if the device is later
activated.
Fix by calling 'qemu_flush_queued_packets()' when vmxnet3 device gets
active.
Signed-off-by: Shmulik Ladkani <address@hidden>
---
hw/net/vmxnet3.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/net/vmxnet3.c b/hw/net/vmxnet3.c
index 59b06b8..8387571 100644
--- a/hw/net/vmxnet3.c
+++ b/hw/net/vmxnet3.c
@@ -1561,6 +1561,7 @@ static void vmxnet3_activate_device(VMXNET3State *s)
vmxnet3_reset_mac(s);
s->device_active = true;
+ qemu_flush_queued_packets(qemu_get_queue(s->nic));
}
static void vmxnet3_handle_command(VMXNET3State *s, uint64_t cmd)
--
1.9.1
- [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated,
Shmulik Ladkani <=