search for: virtqueue_detach_unused_buf_split

Displaying 20 results from an estimated 32 matches for "virtqueue_detach_unused_buf_split".

2023 Jun 22
1
[PATCH vhost v10 05/10] virtio_ring: split-detach: support return dma info to driver
...>last_used_idx++; > /* If we expect an interrupt for the next entry, tell host > * by writing event index and flush out the write before > @@ -961,7 +1055,8 @@ static bool virtqueue_enable_cb_delayed_split(struct virtqueue *_vq) > return true; > } > > -static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) > +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq, > + struct virtqueue_detach_cursor *cursor) > { > struct vring_virtqueue *vq = to_vvq(_vq); > unsigned int i; > @@ -974,7 +1069,10 @@ static void *virtqueue_detach_unuse...
2019 Aug 08
2
[PATCH v2 2/2] virtio_ring: packed ring: fix virtqueue_detach_unused_buf
On Thu, Aug 08, 2019 at 05:06:06PM +0530, Pankaj Gupta wrote: > This patch makes packed ring code compatible with split ring in function > 'virtqueue_detach_unused_buf_*'. What does that mean? What does this "fix"? thanks, greg k-h
2019 Aug 08
1
[PATCH v2 2/2] virtio_ring: packed ring: fix virtqueue_detach_unused_buf
...atible with split ring in function > > > 'virtqueue_detach_unused_buf_*'. > > > > What does that mean? What does this "fix"? > > Patch 1 frees the buffers When a port is unplugged from the virtio > console device. It does this with the help of 'virtqueue_detach_unused_buf_split/packed' > function. For split ring case, corresponding function decrements avail ring index. > For packed ring code, this functionality is not available, so this patch adds the > required support and hence help to remove the unused buffer completely. Explain all of this in great detai...
2019 Aug 10
1
[PATCH v3 2/2] virtio: decrement avail idx with buffer detach for packed ring
On Fri, Aug 09, 2019 at 12:18:47PM +0530, Pankaj Gupta wrote: > This patch decrements 'next_avail_idx' count when detaching a buffer > from vq for packed ring code. Split ring code already does this in > virtqueue_detach_unused_buf_split function. This updates the > 'next_avail_idx' to the previous correct index after an unused buffer > is detatched from the vq. > > Signed-off-by: Pankaj Gupta <pagupta at redhat.com> I would make this patch 1, not patch 2, otherwise patch 1 corrupts the ring. > ---...
2019 Aug 12
1
[PATCH v3 2/2] virtio: decrement avail idx with buffer detach for packed ring
On 2019/8/9 ??2:48, Pankaj Gupta wrote: > This patch decrements 'next_avail_idx' count when detaching a buffer > from vq for packed ring code. Split ring code already does this in > virtqueue_detach_unused_buf_split function. This updates the > 'next_avail_idx' to the previous correct index after an unused buffer > is detatched from the vq. > > Signed-off-by: Pankaj Gupta <pagupta at redhat.com> > --- > drivers/virtio/virtio_ring.c | 6 ++++++ > 1 file changed, 6 insertion...
2019 Aug 08
2
[PATCH v2 2/2] virtio_ring: packed ring: fix virtqueue_detach_unused_buf
On Thu, Aug 08, 2019 at 05:06:06PM +0530, Pankaj Gupta wrote: > This patch makes packed ring code compatible with split ring in function > 'virtqueue_detach_unused_buf_*'. What does that mean? What does this "fix"? thanks, greg k-h
2019 Aug 09
5
[PATCH v3 0/2] virtio_console: fix replug of virtio console port
This patch series fixes the issue with unplug/replug of a port in virtio console driver which fails with an error "Error allocating inbufs\n". Patch 1 makes use of 'virtqueue_detach_unused_buf' function to detach the unused buffers during port hotunplug time. Patch 2 updates the next avail index for packed ring code. Tested the packed ring code with the qemu virtio 1.1 device
2023 Jun 02
12
[PATCH vhost v10 00/10] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2023 Jun 02
12
[PATCH vhost v10 00/10] virtio core prepares for AF_XDP
## About DMA APIs Now, virtio may can not work with DMA APIs when virtio features do not have VIRTIO_F_ACCESS_PLATFORM. 1. I tried to let DMA APIs return phy address by virtio-device. But DMA APIs just work with the "real" devices. 2. I tried to let xsk support callballs to get phy address from virtio-net driver as the dma address. But the maintainers of xsk may want to use
2019 Aug 08
0
[PATCH v2 2/2] virtio_ring: packed ring: fix virtqueue_detach_unused_buf
...ch makes packed ring code compatible with split ring in function > > 'virtqueue_detach_unused_buf_*'. > > What does that mean? What does this "fix"? Patch 1 frees the buffers When a port is unplugged from the virtio console device. It does this with the help of 'virtqueue_detach_unused_buf_split/packed' function. For split ring case, corresponding function decrements avail ring index. For packed ring code, this functionality is not available, so this patch adds the required support and hence help to remove the unused buffer completely. Thanks, Pankaj > > thanks, > > g...
2019 Aug 09
0
[PATCH v3 2/2] virtio: decrement avail idx with buffer detach for packed ring
This patch decrements 'next_avail_idx' count when detaching a buffer from vq for packed ring code. Split ring code already does this in virtqueue_detach_unused_buf_split function. This updates the 'next_avail_idx' to the previous correct index after an unused buffer is detatched from the vq. Signed-off-by: Pankaj Gupta <pagupta at redhat.com> --- drivers/virtio/virtio_ring.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/virtio/vi...
2019 Aug 13
2
[PATCH v4 0/2] virtio_console: fix replug of virtio console port
This patch series fixes the issue with unplug/replug of a port in virtio console driver which fails with an error "Error allocating inbufs\n". Patch 1 updates the next avail index for packed ring code. Patch 2 makes use of 'virtqueue_detach_unused_buf' function to detach the unused buffers during port hotunplug time. Tested the packed ring code with the qemu virtio 1.1 device
2018 Nov 21
19
[PATCH net-next v3 00/13] virtio: support packed ring
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should
2018 Nov 21
19
[PATCH net-next v3 00/13] virtio: support packed ring
Hi, This patch set implements packed ring support in virtio driver. A performance test between pktgen (pktgen_sample03_burst_single_flow.sh) and DPDK vhost (testpmd/rxonly/vhost-PMD) has been done, I saw ~30% performance gain in packed ring in this case. To make this patch set work with below patch set for vhost, some hacks are needed to set the _F_NEXT flag in indirect descriptors (this should
2018 May 22
0
[RFC v5 2/5] virtio_ring: support creating packed ring
...ed_event(&vq->vring), + cpu_to_virtio16(_vq->vdev, vq->last_used_idx + bufs)); + + if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->vring.used->idx) - vq->last_used_idx) > bufs)) { + END_USE(vq); + return false; + } + + END_USE(vq); + return true; +} + +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + unsigned int i; + void *buf; + + START_USE(vq); + + for (i = 0; i < vq->vring.num; i++) { + if (!vq->desc_state[i].data) + continue; + /* detach_buf clears data, so grab it now. */ + buf = vq->desc_state[i].dat...
2018 Jul 11
0
[PATCH net-next v2 2/5] virtio_ring: support creating packed ring
...ed_event(&vq->vring), + cpu_to_virtio16(_vq->vdev, vq->last_used_idx + bufs)); + + if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->vring.used->idx) - vq->last_used_idx) > bufs)) { + END_USE(vq); + return false; + } + + END_USE(vq); + return true; +} + +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) +{ + struct vring_virtqueue *vq = to_vvq(_vq); + unsigned int i; + void *buf; + + START_USE(vq); + + for (i = 0; i < vq->vring.num; i++) { + if (!vq->desc_state[i].data) + continue; + /* detach_buf clears data, so grab it now. */ + buf = vq->desc_state[i].dat...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...t;vdev, vq->last_used_idx + bufs)); > + > + if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->vring.used->idx) - vq->last_used_idx) > bufs)) { > + END_USE(vq); > + return false; > + } > + > + END_USE(vq); > + return true; > +} > + > +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + unsigned int i; > + void *buf; > + > + START_USE(vq); > + > + for (i = 0; i < vq->vring.num; i++) { > + if (!vq->desc_state[i].data) > + continue; > + /* detach_buf clears dat...
2018 May 29
2
[RFC v5 2/5] virtio_ring: support creating packed ring
...t;vdev, vq->last_used_idx + bufs)); > + > + if (unlikely((u16)(virtio16_to_cpu(_vq->vdev, vq->vring.used->idx) - vq->last_used_idx) > bufs)) { > + END_USE(vq); > + return false; > + } > + > + END_USE(vq); > + return true; > +} > + > +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + unsigned int i; > + void *buf; > + > + START_USE(vq); > + > + for (i = 0; i < vq->vring.num; i++) { > + if (!vq->desc_state[i].data) > + continue; > + /* detach_buf clears dat...
2018 Apr 10
0
[RFC v2] virtio: support packed ring
...(vq); > - return false; > - } > - > - END_USE(vq); > - return true; > + return vq->packed ? virtqueue_enable_cb_delayed_packed(_vq) : > + virtqueue_enable_cb_delayed_split(_vq); > } > EXPORT_SYMBOL_GPL(virtqueue_enable_cb_delayed); > > +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + unsigned int i; > + void *buf; > + > + START_USE(vq); > + > + for (i = 0; i < vq->vring.num; i++) { > + if (!vq->desc_state[i].data) > + continue; > + /* detach_buf clears dat...
2018 Apr 13
0
[RFC v2] virtio: support packed ring
...(vq); > - return false; > - } > - > - END_USE(vq); > - return true; > + return vq->packed ? virtqueue_enable_cb_delayed_packed(_vq) : > + virtqueue_enable_cb_delayed_split(_vq); > } > EXPORT_SYMBOL_GPL(virtqueue_enable_cb_delayed); > > +static void *virtqueue_detach_unused_buf_split(struct virtqueue *_vq) > +{ > + struct vring_virtqueue *vq = to_vvq(_vq); > + unsigned int i; > + void *buf; > + > + START_USE(vq); > + > + for (i = 0; i < vq->vring.num; i++) { > + if (!vq->desc_state[i].data) > + continue; > + /* detach_buf clears dat...