* [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated
@ 2015-08-18 11:25 Shmulik Ladkani
2015-08-19 17:32 ` Dmitry Fleytman
2015-08-19 18:45 ` Fam Zheng
0 siblings, 2 replies; 5+ messages in thread
From: Shmulik Ladkani @ 2015-08-18 11:25 UTC (permalink / raw)
To: qemu-devel, Stefan Hajnoczi; +Cc: Dmitry Fleytman, Fam Zheng, Shmulik Ladkani
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.ladkani@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
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated
2015-08-18 11:25 [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated Shmulik Ladkani
@ 2015-08-19 17:32 ` Dmitry Fleytman
2015-08-19 18:45 ` Fam Zheng
1 sibling, 0 replies; 5+ messages in thread
From: Dmitry Fleytman @ 2015-08-19 17:32 UTC (permalink / raw)
To: Shmulik Ladkani; +Cc: Fam Zheng, qemu-devel, Stefan Hajnoczi
ACK.
> On Aug 18, 2015, at 04:25 AM, Shmulik Ladkani <shmulik.ladkani@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.ladkani@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
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated
2015-08-18 11:25 [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated Shmulik Ladkani
2015-08-19 17:32 ` Dmitry Fleytman
@ 2015-08-19 18:45 ` Fam Zheng
2015-09-02 13:48 ` Stefan Hajnoczi
1 sibling, 1 reply; 5+ messages in thread
From: Fam Zheng @ 2015-08-19 18:45 UTC (permalink / raw)
To: Shmulik Ladkani, stefanha; +Cc: Dmitry Fleytman, qemu-devel
On Tue, 08/18 14:25, Shmulik Ladkani 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.ladkani@ravellosystems.com>
Looks like the previous patch to fix this fell between the cracks and never
made it to qemu.git?
http://patchwork.ozlabs.org/patch/489847/
Stefan, any idea?
Fam
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated
2015-08-19 18:45 ` Fam Zheng
@ 2015-09-02 13:48 ` Stefan Hajnoczi
2015-09-04 7:12 ` Shmulik Ladkani
0 siblings, 1 reply; 5+ messages in thread
From: Stefan Hajnoczi @ 2015-09-02 13:48 UTC (permalink / raw)
To: Fam Zheng; +Cc: Dmitry Fleytman, Shmulik Ladkani, qemu-devel
On Thu, Aug 20, 2015 at 02:45:47AM +0800, Fam Zheng wrote:
> On Tue, 08/18 14:25, Shmulik Ladkani 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.ladkani@ravellosystems.com>
>
> Looks like the previous patch to fix this fell between the cracks and never
> made it to qemu.git?
>
> http://patchwork.ozlabs.org/patch/489847/
>
> Stefan, any idea?
Shmulik: Please test the patch that Fam linked
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated
2015-09-02 13:48 ` Stefan Hajnoczi
@ 2015-09-04 7:12 ` Shmulik Ladkani
0 siblings, 0 replies; 5+ messages in thread
From: Shmulik Ladkani @ 2015-09-04 7:12 UTC (permalink / raw)
To: Stefan Hajnoczi; +Cc: Dmitry Fleytman, Fam Zheng, qemu-devel
Hi Stefan,
On Wed, 2 Sep 2015 14:48:57 +0100 Stefan Hajnoczi <stefanha@redhat.com> wrote:
> On Thu, Aug 20, 2015 at 02:45:47AM +0800, Fam Zheng wrote:
> > Looks like the previous patch to fix this fell between the cracks and never
> > made it to qemu.git?
> >
> > http://patchwork.ozlabs.org/patch/489847/
> >
> > Stefan, any idea?
>
> Shmulik: Please test the patch that Fam linked
Added a "Tested-by" to the relevant post.
Stefan, I assume this should go into v2.4.1?
Otherwise, vmxnet3 has no rx connectivity.
Regards,
Shmulik
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2015-09-04 7:13 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-08-18 11:25 [Qemu-devel] [PATCH] net/vmxnet3: Flush packets when device gets activated Shmulik Ladkani
2015-08-19 17:32 ` Dmitry Fleytman
2015-08-19 18:45 ` Fam Zheng
2015-09-02 13:48 ` Stefan Hajnoczi
2015-09-04 7:12 ` Shmulik Ladkani
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).