Merge tag 'for-6.15/io_uring-rx-zc-20250325' of git://git.kernel.dk/linux
Pull io_uring zero-copy receive support from Jens Axboe: "This adds support for zero-copy receive with io_uring, enabling fast bulk receive of data directly into application memory, rather than needing to copy the data out of kernel memory. While this version only supports host memory as that was the initial target, other memory types are planned as well, with notably GPU memory coming next. This work depends on some networking components which were queued up on the networking side, but have now landed in your tree. This is the work of Pavel Begunkov and David Wei. From the v14 posting: 'We configure a page pool that a driver uses to fill a hw rx queue to hand out user pages instead of kernel pages. Any data that ends up hitting this hw rx queue will thus be dma'd into userspace memory directly, without needing to be bounced through kernel memory. 'Reading' data out of a socket instead becomes a _notification_ mechanism, where the kernel tells userspace where the data is. The overall approach is similar to the devmem TCP proposal This relies on hw header/data split, flow steering and RSS to ensure packet headers remain in kernel memory and only desired flows hit a hw rx queue configured for zero copy. Configuring this is outside of the scope of this patchset. We share netdev core infra with devmem TCP. The main difference is that io_uring is used for the uAPI and the lifetime of all objects are bound to an io_uring instance. Data is 'read' using a new io_uring request type. When done, data is returned via a new shared refill queue. A zero copy page pool refills a hw rx queue from this refill queue directly. Of course, the lifetime of these data buffers are managed by io_uring rather than the networking stack, with different refcounting rules. This patchset is the first step adding basic zero copy support. We will extend this iteratively with new features e.g. dynamically allocated zero copy areas, THP support, dmabuf support, improved copy fallback, general optimisations and more' In a local setup, I was able to saturate a 200G link with a single CPU core, and at netdev conf 0x19 earlier this month, Jamal reported 188Gbit of bandwidth using a single core (no HT, including soft-irq). Safe to say the efficiency is there, as bigger links would be needed to find the per-core limit, and it's considerably more efficient and faster than the existing devmem solution" * tag 'for-6.15/io_uring-rx-zc-20250325' of git://git.kernel.dk/linux: io_uring/zcrx: add selftest case for recvzc with read limit io_uring/zcrx: add a read limit to recvzc requests io_uring: add missing IORING_MAP_OFF_ZCRX_REGION in io_uring_mmap io_uring: Rename KConfig to Kconfig io_uring/zcrx: fix leaks on failed registration io_uring/zcrx: recheck ifq on shutdown io_uring/zcrx: add selftest net: add documentation for io_uring zcrx io_uring/zcrx: add copy fallback io_uring/zcrx: throttle receive requests io_uring/zcrx: set pp memory provider for an rx queue io_uring/zcrx: add io_recvzc request io_uring/zcrx: dma-map area for the device io_uring/zcrx: implement zerocopy receive pp memory provider io_uring/zcrx: grab a net device io_uring/zcrx: add io_zcrx_area io_uring/zcrx: add interface queue and refill queue
Showing
- Documentation/networking/index.rst 1 addition, 0 deletionsDocumentation/networking/index.rst
- Documentation/networking/iou-zcrx.rst 202 additions, 0 deletionsDocumentation/networking/iou-zcrx.rst
- Kconfig 2 additions, 0 deletionsKconfig
- include/linux/io_uring_types.h 6 additions, 0 deletionsinclude/linux/io_uring_types.h
- include/uapi/linux/io_uring.h 53 additions, 1 deletioninclude/uapi/linux/io_uring.h
- io_uring/Kconfig 10 additions, 0 deletionsio_uring/Kconfig
- io_uring/Makefile 1 addition, 0 deletionsio_uring/Makefile
- io_uring/io_uring.c 7 additions, 0 deletionsio_uring/io_uring.c
- io_uring/io_uring.h 10 additions, 0 deletionsio_uring/io_uring.h
- io_uring/memmap.c 2 additions, 0 deletionsio_uring/memmap.c
- io_uring/memmap.h 1 addition, 0 deletionsio_uring/memmap.h
- io_uring/net.c 84 additions, 0 deletionsio_uring/net.c
- io_uring/opdef.c 16 additions, 0 deletionsio_uring/opdef.c
- io_uring/register.c 7 additions, 0 deletionsio_uring/register.c
- io_uring/rsrc.c 1 addition, 1 deletionio_uring/rsrc.c
- io_uring/rsrc.h 1 addition, 0 deletionsio_uring/rsrc.h
- io_uring/zcrx.c 960 additions, 0 deletionsio_uring/zcrx.c
- io_uring/zcrx.h 73 additions, 0 deletionsio_uring/zcrx.h
- tools/testing/selftests/drivers/net/hw/.gitignore 2 additions, 0 deletionstools/testing/selftests/drivers/net/hw/.gitignore
- tools/testing/selftests/drivers/net/hw/Makefile 5 additions, 0 deletionstools/testing/selftests/drivers/net/hw/Makefile
Loading
Please register or sign in to comment