Displaying 5 results from an estimated 5 matches for "virtqueue_add_vring_split".
2023 Mar 02
1
[PATCH vhost v1 02/12] virtio_ring: split: separate DMA codes
DMA-related logic is separated from the virtqueue_add_vring_split() to
prepare for subsequent support for premapped.
DMA address will be saved as sg->dma_address, then
virtqueue_add_vring_split() will use it directly.
If it is a premapped scene, the transmitted sgs should have saved DMA
address in dma_address, and in virtio core, we need to pass
virtqueue_ma...
2023 Mar 02
1
[PATCH vhost v1 01/12] virtio_ring: split: refactor virtqueue_add_split() for premapped
...int virtqueue_add_split(struct virtqueue *_vq,
* host should service the ring ASAP. */
if (out_sgs)
vq->notify(&vq->vq);
- if (indirect)
- kfree(desc);
- END_USE(vq);
- return -ENOSPC;
+ kfree(desc);
+ return ERR_PTR(-ENOSPC);
+ }
+
+ return desc;
+}
+
+static inline int virtqueue_add_vring_split(struct vring_virtqueue *vq,
+ struct scatterlist *sgs[],
+ unsigned int total_sg,
+ unsigned int out_sgs,
+ unsigned int in_sgs,
+ struct vring_desc *desc)
+{
+ struct virtqueue *_vq = &vq->vq;
+ struct scatterlist *sg;
+ unsigned int i, n, avail, desc...
2023 Mar 02
12
[PATCH vhost v1 00/12] virtio core prepares for AF_XDP
XDP socket(AF_XDP) is an excellent bypass kernel network framework. The zero
copy feature of xsk (XDP socket) needs to be supported by the driver. The
performance of zero copy is very good.
ENV: Qemu with vhost.
vhost cpu | Guest APP CPU |Guest Softirq CPU | PPS
-----------------------------|---------------|------------------|------------
xmit by sockperf: 90% | 100%
2023 Mar 07
2
[PATCH vhost v1 03/12] virtio_ring: split: introduce virtqueue_add_split_premapped()
...s case? Then we don't need to
introduce the dma_map flag.
Thanks
> + err = virtqueue_map_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
> + if (err)
> + goto err;
> + }
>
> head = vq->free_head;
> err = virtqueue_add_vring_split(vq, sgs, total_sg, out_sgs, in_sgs, desc);
> @@ -779,11 +786,13 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
> /* Store token and indirect buffer state. */
> vq->split.desc_state[head].data = data;
> vq->split.desc_state[head].indir_desc...
2023 Mar 07
1
[PATCH vhost v1 03/12] virtio_ring: split: introduce virtqueue_add_split_premapped()
...map flag.
>
> Thanks
>
>
> > + err = virtqueue_map_sgs(vq, sgs, total_sg, out_sgs, in_sgs);
> > + if (err)
> > + goto err;
> > + }
> >
> > head = vq->free_head;
> > err = virtqueue_add_vring_split(vq, sgs, total_sg, out_sgs, in_sgs, desc);
> > @@ -779,11 +786,13 @@ static inline int virtqueue_add_split(struct virtqueue *_vq,
> > /* Store token and indirect buffer state. */
> > vq->split.desc_state[head].data = data;
> > vq->split.desc_sta...