On Mon, 17 Apr 2023 22:01:36 -0700 Christoph Hellwig wrote: > On Mon, Apr 17, 2023 at 07:54:00PM -0700, Jakub Kicinski wrote: > > AF_XDP, io_uring, and increasing number of pinned memory / zero copy > > implementations need to do DMA mapping outside the drivers. > > You can't just do dma mapping outside the driver, because there are > drivers that do not require DMA mapping at all. virtio is an example, > but all the classic s390 drivers and some other odd virtualization > ones are others. What bus are the classic s390 on (in terms of the device model)? > > I don't think it's reasonable to be bubbling up custom per-subsystem > > DMA ops into all of them for the sake of virtio. > > dma addresses and thus dma mappings are completely driver specific. > Upper layers have no business looking at them. Damn, that's unfortunate. Thinking aloud -- that means that if we want to continue to pull memory management out of networking drivers to improve it for all, cross-optimize with the rest of the stack and allow various upcoming forms of zero copy -- then we need to add an equivalent of dma_ops and DMA API locally in networking?