On Fri, Jul 05, 2024 at 02:21:35AM +, Yang Dongshan wrote:
> > virtqueue_get_avail_bytes would always return the opaque.
> Then the condition will change from:
>
> static int virtio_net_has_buffers(VirtIONetQueue *q, int bufsize)
> {
> if (virtio_queue_empty(q->rx_vq) ||
> (n->
> virtqueue_get_avail_bytes would always return the opaque.
Then the condition will change from:
static int virtio_net_has_buffers(VirtIONetQueue *q, int bufsize)
{
if (virtio_queue_empty(q->rx_vq) ||
(n->mergeable_rx_bufs &&
!virtqueue_avail_bytes(q->rx_vq, bufsize, 0))
On Thu, Jul 04, 2024 at 10:20:15AM +, Yang Dongshan wrote:
> Hi, Michael
>
> > My suggestion:
> >
> >
> > change virtqueue_get_avail_bytes to return the shadow
> > in an opaque unsigned value.
> >
> >
> > add virtqueue_poll that gets this opaque and tells us whether any new
> > buffers bec
Hi, Michael
> My suggestion:
>
>
> change virtqueue_get_avail_bytes to return the shadow
> in an opaque unsigned value.
>
>
> add virtqueue_poll that gets this opaque and tells us whether any new
> buffers became available in the queue since that value>
> was returned.
> accordingly, virtio
> This answer does not make sense from API POV.
The core logic of function virtio_queue_set_notification_and_check()
actually is a copy of function vhost_enable_notify() from
vhost.c in kernel.
> > > +bool virtio_queue_set_notification_and_check(VirtQueue *vq, int enable)
> > > +{
> > > + uint16
On Tue, Jul 02, 2024 at 07:45:31AM +0800, Yang Dongshan wrote:
> > what does "changed" mean here? changed compared to what?
> For a split queue, if the shadow_avail_idx synced from avail ring idx
> by vring_avail_idx(vq) last time doesn't equal the current value of avail ring
> idx.
>
> vq->shadow
> what does "changed" mean here? changed compared to what?
For a split queue, if the shadow_avail_idx synced from avail ring idx
by *vring_avail_idx(vq) last time doesn't equal the current value of avail
ring idx.*
*vq->shadow_avail_idx **!= vring_avail_idx(vq);*
For packed queue, the logic is si
On Tue, Jul 02, 2024 at 01:18:15AM +0800, Yang Dongshan wrote:
> > Please document what this does.
> okay, i will.
>
> > So this will return false if ring has any available buffers?
> > Equivalent to:
> >
> > bool virtio_queue_set_notification_and_check(VirtQueue *vq, int enable)
> > {
> >
> Please document what this does.
okay, i will.
> So this will return false if ring has any available buffers?
> Equivalent to:
>
> bool virtio_queue_set_notification_and_check(VirtQueue *vq, int enable)
> {
>virtio_queue_packed_set_notification(vq, enable);
> return virtio_queue_e
On Mon, Jul 01, 2024 at 10:00:17PM +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
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
11 matches
Mail list logo