Thread (48 messages) 48 messages, 6 authors, 2024-02-21

Re: [PATCH vhost 06/17] virtio_ring: no store dma info when unmap is not needed

From: Jason Wang <jasowang@redhat.com>
Date: 2024-02-02 03:04:31
Also in: bpf, kvm, linux-remoteproc, linux-s390, linux-um, platform-driver-x86, virtualization

On Thu, Feb 1, 2024 at 2:05 PM Xuan Zhuo [off-list ref] wrote:
On Wed, 31 Jan 2024 17:12:29 +0800, Jason Wang [off-list ref] wrote:
quoted
On Tue, Jan 30, 2024 at 7:42 PM Xuan Zhuo [off-list ref] wrote:
quoted
As discussed:
http://lore.kernel.org/all/CACGkMEug-=C+VQhkMYSgUKMC==04m7-uem_yC21bgGkKZh845w@mail.gmail.com (local)

When the vq is premapped mode, the driver manages the dma
info is a good way.

So this commit make the virtio core not to store the dma
info and release the memory which is used to store the dma
info.

If the use_dma_api is false, the memory is also not allocated.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
---
[...]
quoted
quoted
@@ -1245,14 +1269,16 @@ static u16 packed_last_used(u16 last_used_idx)

 /* caller must check vring_need_unmap_buffer() */
 static void vring_unmap_extra_packed(const struct vring_virtqueue *vq,
-                                    const struct vring_desc_extra *extra)
+                                    unsigned int i)
 {
+       const struct vring_desc_extra *extra = &vq->packed.desc_extra[i];
+       const struct vring_desc_dma *dma = &vq->packed.desc_dma[i];
        u16 flags;

        flags = extra->flags;
I don't think this can be compiled.
I do not find any error.
Could you say more?
Sorry, I misread the code.

It should be fine.

Thanks
Thanks.

quoted
Thanks
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help