virtqueue_add() only supports virtual addresses, dma is completed in
virtqueue_add().
In some scenarios (such as the AF_XDP scenario), DMA is completed in advance, so
it is necessary for us to support passing the DMA address to virtqueue_add().
Record this predma information in extra->flags, which can be skipped when
executing dma unmap.
v1:
1. All sgs requested at one time are required to be unified PREDMA, and
several
of them are not supported to be PREDMA
2. virtio_dma_map() is removed from this patch set and will be submitted
together with the next time AF_XDP supports virtio dma
3. Added patch #2 #3 to remove the check for flags when performing unmap
indirect desc
Xuan Zhuo (6):
virtio: rename vring_unmap_state_packed() to
vring_unmap_extra_packed()
virtio: remove flags check for unmap split indirect desc
virtio: remove flags check for unmap packed indirect desc
virtio: virtqueue_add() support predma
virtio: split: virtqueue_add_split() support dma address
virtio: packed: virtqueue_add_packed() support dma address
drivers/virtio/virtio_ring.c | 199 ++++++++++++++++++++++-------------
1 file changed, 126 insertions(+), 73 deletions(-)
--
2.31.0
_______________________________________________
Virtualization mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/virtualization