Michael S. Tsirkin
2023-Jul-25 07:34 UTC
[PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()
On Tue, Jul 25, 2023 at 10:13:48AM +0800, Xuan Zhuo wrote:> On Mon, 24 Jul 2023 09:43:42 -0700, Christoph Hellwig <hch at infradead.org> wrote: > > On Thu, Jul 20, 2023 at 01:21:07PM -0400, Michael S. Tsirkin wrote: > > > Well I think we can add wrappers like virtio_dma_sync and so on. > > > There are NOP for non-dma so passing the dma device is harmless. > > > > Yes, please. > > > I am not sure I got this fully. > > Are you mean this: > https://lore.kernel.org/all/20230214072704.126660-8-xuanzhuo at linux.alibaba.com/ > https://lore.kernel.org/all/20230214072704.126660-9-xuanzhuo at linux.alibaba.com/ > > Then the driver must do dma operation(map and sync) by these virtio_dma_* APIs. > No care the device is non-dma device or dma device.yes> Then the AF_XDP must use these virtio_dma_* APIs for virtio device.We'll worry about AF_XDP when the patch is posted. -- MST
Xuan Zhuo
2023-Jul-25 11:07 UTC
[PATCH vhost v11 05/10] virtio_ring: introduce virtqueue_dma_dev()
On Tue, 25 Jul 2023 03:34:34 -0400, "Michael S. Tsirkin" <mst at redhat.com> wrote:> On Tue, Jul 25, 2023 at 10:13:48AM +0800, Xuan Zhuo wrote: > > On Mon, 24 Jul 2023 09:43:42 -0700, Christoph Hellwig <hch at infradead.org> wrote: > > > On Thu, Jul 20, 2023 at 01:21:07PM -0400, Michael S. Tsirkin wrote: > > > > Well I think we can add wrappers like virtio_dma_sync and so on. > > > > There are NOP for non-dma so passing the dma device is harmless. > > > > > > Yes, please. > > > > > > I am not sure I got this fully. > > > > Are you mean this: > > https://lore.kernel.org/all/20230214072704.126660-8-xuanzhuo at linux.alibaba.com/ > > https://lore.kernel.org/all/20230214072704.126660-9-xuanzhuo at linux.alibaba.com/ > > > > Then the driver must do dma operation(map and sync) by these virtio_dma_* APIs. > > No care the device is non-dma device or dma device. > > yes > > > Then the AF_XDP must use these virtio_dma_* APIs for virtio device. > > We'll worry about AF_XDP when the patch is posted.YES. We discussed it. They voted 'no'. http://lore.kernel.org/all/20230424082856.15c1e593 at kernel.org Thanks.> > -- > MST >