[PATCH RESEND] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem); "

2024-04-30 Thread Alexey Dobriyan
; g_free(elem); and aren't problematic. Signed-off-by: Alexey Dobriyan --- hopefully better changelog. use "if (out_num < 1)" so that discard doesn't calculate iov length hw/net/virtio-net.c | 18 -- 1 file changed, 12 insertions(+),

[PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem); "

2024-04-09 Thread Alexey Dobriyan
aiting for TX to complete, TX complete hook is _not_ called and assert(async_tx.elem) is eventually triggered. The fix is to discard such phantom packets in virtio_net_flush_tx(). Signed-off-by: Alexey Dobriyan --- hw/net/virtio-net.c | 18 -- 1 file changed, 12 insertions(+), 6

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem);"

2024-04-09 Thread Alexey Dobriyan
On Tue, Apr 09, 2024 at 12:41:39PM -0400, Michael S. Tsirkin wrote: > On Tue, Apr 09, 2024 at 07:37:04PM +0300, Alexey Dobriyan wrote: > > On Tue, Apr 09, 2024 at 02:51:38AM -0400, Michael S. Tsirkin wrote: > > > On Fri, Apr 05, 2024 at 02:20:15PM +0300, Alexey Dobriyan wrote:

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem);"

2024-04-09 Thread Alexey Dobriyan
On Tue, Apr 09, 2024 at 02:51:38AM -0400, Michael S. Tsirkin wrote: > On Fri, Apr 05, 2024 at 02:20:15PM +0300, Alexey Dobriyan wrote: > > Don't send zero length packets in virtio_net_flush_tx(). > > > > Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/145

Re: [PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem);"

2024-04-09 Thread Alexey Dobriyan
On Mon, Apr 08, 2024 at 03:26:35PM +0800, Jason Wang wrote: > On Fri, Apr 5, 2024 at 7:22 PM Alexey Dobriyan > wrote: > > > > Don't send zero length packets in virtio_net_flush_tx(). > > > > Reproducer from https://gitlab.com/qemu-project/qemu/-/issues/1451

[PATCH 1/1] virtio-net: fix bug 1451 aka "assert(!virtio_net_get_subqueue(nc)->async_tx.elem); "

2024-04-05 Thread Alexey Dobriyan
is terrible because queue is being destroyed, nothing has been sent, nobody is waiting for TX to complete and assert it triggered. Signed-off-by: Alexey Dobriyan --- hw/net/virtio-net.c | 18 -- 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/hw/net/virtio-net.c b/hw