Re: [PATCH vhost v1 4/7] virtio_net: big mode support premapped

2024-04-21 Thread kernel test robot
Hi Xuan, kernel test robot noticed the following build warnings: [auto build test WARNING on mst-vhost/linux-next] [also build test WARNING on linus/master v6.9-rc5 next-20240419] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use

[PATCH vhost v1 6/7] virtio_net: rx remove premapped failover code

2024-04-21 Thread Xuan Zhuo
Now, the premapped mode can be enabled unconditionally. So we can remove the failover code. Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/net/virtio_net.c | 81 1 file changed, 33 insertions(+), 48 deletions(-) diff --git a/drivers/net/virt

[PATCH vhost v1 0/7] virtio_net: rx enable premapped mode by default

2024-04-21 Thread Xuan Zhuo
Actually, for the virtio drivers, we can enable premapped mode whatever the value of use_dma_api. Because we provide the virtio dma apis. So the driver can enable premapped mode unconditionally. This patch set makes the big mode of virtio-net to support premapped mode. And enable premapped mode fo

[PATCH vhost v1 5/7] virtio_net: enable premapped by default

2024-04-21 Thread Xuan Zhuo
Currently, big, merge, and small modes all support the premapped mode. We can now enable premapped mode by default. Furthermore, virtqueue_set_dma_premapped() must succeed when called immediately after find_vqs(). Consequently, we can assume that premapped mode is always enabled. Signed-off-by: Xu

[PATCH vhost v1 1/7] virtio_ring: introduce dma map api for page

2024-04-21 Thread Xuan Zhuo
The virtio-net big mode sq will use these APIs to map the pages. dma_addr_t virtqueue_dma_map_page_attrs(struct virtqueue *_vq, struct page *page, size_t offset, size_t size, enum dma_data_direction dir,

[PATCH vhost v1 4/7] virtio_net: big mode support premapped

2024-04-21 Thread Xuan Zhuo
In big mode, pre-mapping DMA is beneficial because if the pages are not used, we can reuse them without needing to unmap and remap. We require space to store the DMA address. I use the page.dma_addr to store the DMA address from the pp structure inside the page. Every page retrieved from get_a_pa

[PATCH vhost v1 2/7] virtio_ring: enable premapped mode whatever use_dma_api

2024-04-21 Thread Xuan Zhuo
Now, we have virtio DMA APIs, the driver can be the premapped mode whatever the virtio core uses dma api or not. So remove the limit of checking use_dma_api from virtqueue_set_dma_premapped(). Signed-off-by: Xuan Zhuo Acked-by: Jason Wang --- drivers/virtio/virtio_ring.c | 7 +-- 1 file ch

[PATCH vhost v1 3/7] virtio_net: replace private by pp struct inside page

2024-04-21 Thread Xuan Zhuo
Now, we chain the pages of big mode by the page's private variable. But a subsequent patch aims to make the big mode to support premapped mode. This requires additional space to store the dma addr. Within the sub-struct that contains the 'private', there is no suitable variable for storing the DMA

[PATCH vhost v1 7/7] virtio_net: remove the misleading comment

2024-04-21 Thread Xuan Zhuo
We call the build_skb() actually without copying data. The comment is misleading. So remove it. Signed-off-by: Xuan Zhuo --- drivers/net/virtio_net.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index eff8f16a9fe0..a8dac48a1be7 100644 ---