search for: virtqueue_get_buf

Displaying 20 results from an estimated 1107 matches for "virtqueue_get_buf".

2013 Nov 04
2
[PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()
..._ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool virtio_net: verify if virtqueue_kick() succeeded virtio_test: verify if virtqueue_kick() succeeded virtio_ring: add new function virtqueue_is_broken() virtio_blk: verify if queue is broken after virtqueue_get_buf() virtio_console: verify if queue is broken after virtqueue_get_buf() virtio_net: verify if queue is broken after virtqueue_get_buf() virtio_scsi: verify if queue is broken after virtqueue_get_buf() drivers/block/virtio_blk.c | 2 ++ drivers/char/virtio_console.c | 6...
2013 Nov 04
2
[PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()
..._ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool virtio_net: verify if virtqueue_kick() succeeded virtio_test: verify if virtqueue_kick() succeeded virtio_ring: add new function virtqueue_is_broken() virtio_blk: verify if queue is broken after virtqueue_get_buf() virtio_console: verify if queue is broken after virtqueue_get_buf() virtio_net: verify if queue is broken after virtqueue_get_buf() virtio_scsi: verify if queue is broken after virtqueue_get_buf() drivers/block/virtio_blk.c | 2 ++ drivers/char/virtio_console.c | 6...
2013 Nov 20
1
[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure
On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: > > > ----- ???? ----- > > On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > > > We need decrease the rq->num after we can get a buf through > > > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > > > refill routine won't be triggered under heavy memory stress since the > > > driver may > > > still think there's enough room. > > > > > > This bug was introduced by commit 2613af0ed1...
2013 Nov 19
4
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
We need to drop the refcnt of page when we fail to allocate an skb for frag list, otherwise it will be leaked. The bug was introduced by commit 2613af0ed18a11d5c566a81f9a6510b73180660a ("virtio_net: migrate mergeable rx buffers to page frag allocators"). Cc: Michael Dalton <mwdalton at google.com> Cc: Eric Dumazet <edumazet at google.com> Cc: Rusty Russell <rusty at
2013 Nov 20
1
[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure
On Wed, Nov 20, 2013 at 07:08:50AM -0500, Jason Wang wrote: > > > ----- ???? ----- > > On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > > > We need decrease the rq->num after we can get a buf through > > > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > > > refill routine won't be triggered under heavy memory stress since the > > > driver may > > > still think there's enough room. > > > > > > This bug was introduced by commit 2613af0ed1...
2013 Nov 19
4
[PATCH net] virtio-net: fix page refcnt leaking when fail to allocate frag skb
We need to drop the refcnt of page when we fail to allocate an skb for frag list, otherwise it will be leaked. The bug was introduced by commit 2613af0ed18a11d5c566a81f9a6510b73180660a ("virtio_net: migrate mergeable rx buffers to page frag allocators"). Cc: Michael Dalton <mwdalton at google.com> Cc: Eric Dumazet <edumazet at google.com> Cc: Rusty Russell <rusty at
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote: > - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) { > + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) { > virtqueue_kick(vq); > - wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > - vb->balloon_page_chunk.chunk_num = 0; > + if (busy_wait) > + while (!virtqueue_get_buf(vq, &len) && > + !virtqueue_is_broken(vq)) > + cpu_relax(); > + else > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); Thi...
2017 Jun 20
2
[PATCH v11 6/6] virtio-balloon: VIRTIO_BALLOON_F_CMD_VQ
On Fri, Jun 09, 2017 at 06:41:41PM +0800, Wei Wang wrote: > - if (!virtqueue_indirect_desc_table_add(vq, desc, num)) { > + if (!virtqueue_indirect_desc_table_add(vq, desc, *num)) { > virtqueue_kick(vq); > - wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > - vb->balloon_page_chunk.chunk_num = 0; > + if (busy_wait) > + while (!virtqueue_get_buf(vq, &len) && > + !virtqueue_is_broken(vq)) > + cpu_relax(); > + else > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); Thi...
2013 Nov 20
2
[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure
On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > We need decrease the rq->num after we can get a buf through > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > refill routine won't be triggered under heavy memory stress since the driver may > still think there's enough room. > > This bug was introduced by commit 2613af0ed18a11d5c566a81f9a6510b73180660a > (virtio_net: migrat...
2013 Nov 20
2
[PATCH net 2/3] virtio-net: fix num calculation on frag skb allocation failure
On Wed, Nov 20, 2013 at 05:07:26PM +0800, Jason Wang wrote: > We need decrease the rq->num after we can get a buf through > virtqueue_get_buf() even if we could not allocate frag skb. Otherwise, the > refill routine won't be triggered under heavy memory stress since the driver may > still think there's enough room. > > This bug was introduced by commit 2613af0ed18a11d5c566a81f9a6510b73180660a > (virtio_net: migrat...
2013 Oct 24
0
[PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()
If virtqueue_get_buf() returned with a NULL pointer avoid a possibly endless loop by checking for a broken virtqueue. Signed-off-by: Heinz Graalfs <graalfs at linux.vnet.ibm.com> --- drivers/scsi/virtio_scsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/scsi/virtio_scsi.c b/dri...
2013 Nov 04
0
[PATCH V2 RFC 9/9] virtio_scsi: verify if queue is broken after virtqueue_get_buf()
If virtqueue_get_buf() returned with a NULL pointer avoid a possibly endless loop by checking for a broken virtqueue. Signed-off-by: Heinz Graalfs <graalfs at linux.vnet.ibm.com> --- drivers/scsi/virtio_scsi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virti...
2013 Oct 24
12
[PATCH V2 RFC 0/9] virtio: fix hang(loop) after hot-unplug vlan
...e is now flagged as 'broken'. Patches [3,4] add code to verify host kicks by testing the return value of virtqueue_kick() in order to avoid potential loops. Patch [5] adds a new function virtqueue_is_broken(). This function should be used to verify the state of a virtqueue when a previous virtqueue_get_buf() returned a NULL pointer. Patch [6,7,8,9] add virtqueue_is_broken() calls to handle potential errors when a virtqueue_bet_buf() doesn't deliver any more buffers. Heinz Graalfs (9): virtio_ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool vir...
2013 Oct 24
12
[PATCH V2 RFC 0/9] virtio: fix hang(loop) after hot-unplug vlan
...e is now flagged as 'broken'. Patches [3,4] add code to verify host kicks by testing the return value of virtqueue_kick() in order to avoid potential loops. Patch [5] adds a new function virtqueue_is_broken(). This function should be used to verify the state of a virtqueue when a previous virtqueue_get_buf() returned a NULL pointer. Patch [6,7,8,9] add virtqueue_is_broken() calls to handle potential errors when a virtqueue_bet_buf() doesn't deliver any more buffers. Heinz Graalfs (9): virtio_ring: change host notification API virtio_ring: let virtqueue_{kick()/notify()} return a bool vir...
2017 Sep 08
2
[PATCH v15 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG
...en. Just an idea, up to you > > whether to do it. > > > > > + > > > + /* If batching is in use, we batch the sgs till the vq is full. */ > > > + if (!batch || !vq->num_free) { > > > + virtqueue_kick(vq); > > > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > > > + /* Release all the entries if there are */ > > Meaning > > Account for all used entries if any > > ? > > > > > + while (virtqueue_get_buf(vq, &len)) > > > + ; > > > > Above code is reused below. Add a...
2017 Sep 08
2
[PATCH v15 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG
...en. Just an idea, up to you > > whether to do it. > > > > > + > > > + /* If batching is in use, we batch the sgs till the vq is full. */ > > > + if (!batch || !vq->num_free) { > > > + virtqueue_kick(vq); > > > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > > > + /* Release all the entries if there are */ > > Meaning > > Account for all used entries if any > > ? > > > > > + while (virtqueue_get_buf(vq, &len)) > > > + ; > > > > Above code is reused below. Add a...
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2017 Sep 29
1
[virtio-dev] Re: [PATCH v15 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > > > > > > > + > > > > > + /* If batching is in use, we batch the sgs till the vq is full. */ > > > > > + if (!batch || !vq->num_free) { > > > > > + virtqueue_kick(vq); > > > > > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > > > > > + /* Release all the entries if there are */ > > > > Meaning > > > > Account for all used entries if any > > > > ? > > > > > > > > > + while (virtqueue_get_buf(vq, &len)) > > > &...
2017 Sep 29
1
[virtio-dev] Re: [PATCH v15 3/5] virtio-balloon: VIRTIO_BALLOON_F_SG
...> > > > > > > > + > > > > > + /* If batching is in use, we batch the sgs till the vq is full. */ > > > > > + if (!batch || !vq->num_free) { > > > > > + virtqueue_kick(vq); > > > > > + wait_event(vb->acked, virtqueue_get_buf(vq, &len)); > > > > > + /* Release all the entries if there are */ > > > > Meaning > > > > Account for all used entries if any > > > > ? > > > > > > > > > + while (virtqueue_get_buf(vq, &len)) > > > &...