Re: [PATCH v8] virtio-net: Fix network stall at the host side waiting for kick

2024-07-05 Thread Yang Dongshan
> > static int virtio_net_has_buffers(VirtIONetQueue *q, int bufsize) > > { > > + int shadow_idx; > > + unsigned int in_bytes; > > VirtIONet *n = q->n; > > - if (virtio_queue_empty(q->rx_vq) || > > - (n->mergeable_rx_bufs && > > - !virtqueue_avail_bytes(q->rx_vq, bufsize, 0))) { > > - virtio_queue_

Re: [PATCH v8] virtio-net: Fix network stall at the host side waiting for kick

2024-07-05 Thread Michael S. Tsirkin
On Fri, Jul 05, 2024 at 06:05:02PM +0800, Wencheng Yang wrote: > From: thomas > > Patch 06b12970174 ("virtio-net: fix network stall under load") > added double-check to test whether the available buffer size > can satisfy the request or not, in case the guest has added > some buffers to the avail

Re: [PATCH v8] virtio-net: Fix network stall at the host side waiting for kick

2024-07-05 Thread Michael S. Tsirkin
On Fri, Jul 05, 2024 at 06:05:02PM +0800, Wencheng Yang wrote: > From: thomas > > Patch 06b12970174 ("virtio-net: fix network stall under load") > added double-check to test whether the available buffer size > can satisfy the request or not, in case the guest has added > some buffers to the avail

[PATCH v8] virtio-net: Fix network stall at the host side waiting for kick

2024-07-05 Thread Wencheng Yang
From: thomas Patch 06b12970174 ("virtio-net: fix network stall under load") added double-check to test whether the available buffer size can satisfy the request or not, in case the guest has added some buffers to the avail ring simultaneously after the first check. It will be lucky if the availab