ACK.

> On Aug 18, 2015, at 04:25 AM, Shmulik Ladkani 
> <shmulik.ladk...@ravellosystems.com> wrote:
> 
> 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 <shmulik.ladk...@ravellosystems.com>
> ---
> 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
> 


Reply via email to