Re: [PATCH vhost v6 09/10] virtio_net: set premapped mode by find_vqs()
From: Jason Wang <jasowang@redhat.com>
Date: 2024-03-29 03:20:24
Also in:
virtualization
From: Jason Wang <jasowang@redhat.com>
Date: 2024-03-29 03:20:24
Also in:
virtualization
On Thu, Mar 28, 2024 at 4:27 PM Xuan Zhuo [off-list ref] wrote:
On Thu, 28 Mar 2024 16:05:02 +0800, Jason Wang [off-list ref] wrote:quoted
On Wed, Mar 27, 2024 at 7:14 PM Xuan Zhuo [off-list ref] wrote:quoted
Now, the virtio core can set the premapped mode by find_vqs(). If the premapped can be enabled, the dma array will not be allocated. So virtio-net use the api of find_vqs to enable the premapped. Judge the premapped mode by the vq->premapped instead of saving local variable. Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com> ---I wonder what's the reason to keep a fallback when premapped is not enabled?Rethink this. I think you are right. We can remove the fallback. Because we have the virtio dma apis that wrap all the cases. So I will remove the fallback from the virtio-net in next version.
Ok.
But we still need to export the premapped to the drivers. Because we can enable the AF_XDP only when premapped is true.
I may miss something but it should work like enable AF_XDP -> enable remapping So can we fail during remapping enablement? THanks
Thanksquoted
Thanks