Skip to content

RFC io_uring: prototype for device memory tx

Pavel Begunkov io-uring netdev 1 version New

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest10 patches 0 repliesNew

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10net: pass ubuf to custom sg_from_iter callbacksinclude/linux/socket.h io_uring/net.c net/core/datagram.c+6 -60 replies
2/10net: reject zcrx skbs to not registered devicesinclude/net/netmem.h io_uring/zcrx.c net/core/dev.c+12 -20 replies
3/10io_uring/zcrx: switch to pcpu refcountingio_uring/zcrx.c io_uring/zcrx.h+33 -70 replies
4/10io_uring/zcrx: prepare areas to be exported for txinclude/linux/io_uring/net.h io_uring/zcrx.c io_uring/zcrx.h +1 more+83 -50 replies
5/10io_uring/rsrc: introduce buf registration structureio_uring/rsrc.c+32 -150 replies
6/10io_uring/rsrc: extend buffer updateinclude/uapi/linux/io_uring.h io_uring/rsrc.c+69 -270 replies
7/10io_uring/rsrc: add uncloneable regbuf flagio_uring/rsrc.c io_uring/rsrc.h+7 -10 replies
8/10io_uring/rsrc: add regbuf import flagsio_uring/rsrc.c io_uring/rsrc.h+24 -80 replies
9/10io_uring/rsrc: add zcrx backed registered buffersinclude/uapi/linux/io_uring.h io_uring/rsrc.c io_uring/rsrc.h+95 -20 replies
10/10io_uring/net: implement device memory sendio_uring/net.c io_uring/notif.h+28 -60 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [RFC 00/10] io_uring: prototype for device memory tx

People were asking about io_uring tx with device memory, this is a quick and dirty enablement for io_uring's IORING_OP_SEND[MSG]_ZC. It's more of a testing prototype than to show the design as I'm not happy with uapi and how it relies on zcrx, and will be redoing it.

It's piggy backed on top of a zcrx instance and relies on it managing the rx queue and talking to the device. It also uses memory and mappings from zcrx area. Since there is no proper iter type to pass netmems, io_uring gives an ubuf/iovec iterator and relies on a new sg_from_iter to setup skbs in the right way. Just as devmem TCP, it implmements {get,put}_netmem by referencing, and verifies in validate_xmit_unreadable_skb() that skbs go to the right device.

Pavel Begunkov (10):
net: pass ubuf to custom sg_from_iter callbacks
net: reject zcrx skbs to not registered devices io_uring/zcrx: switch to pcpu refcounting io_uring/zcrx: prepare areas to be exported for tx io_uring/rsrc: introduce buf registration structure io_uring/rsrc: extend buffer update io_uring/rsrc: add uncloneable regbuf flag io_uring/rsrc: add regbuf import flags io_uring/rsrc: add zcrx backed registered buffers io_uring/net: implement device memory send

 include/linux/io_uring/net.h  |  10 ++
 include/linux/socket.h        |   2 +-
 include/net/netmem.h          |   1 +
 include/uapi/linux/io_uring.h |  28 ++++-
 io_uring/net.c                |  37 ++++--
 io_uring/notif.h              |   5 +-
 io_uring/rsrc.c               | 204 +++++++++++++++++++++++++++-------
 io_uring/rsrc.h               |  32 +++++-
 io_uring/zcrx.c               | 104 +++++++++++++++--
 io_uring/zcrx.h               |  14 ++-
 net/core/datagram.c           |   2 +-
 net/core/dev.c                |  10 +-
 net/core/skbuff.c             |   3 +
 13 files changed, 381 insertions(+), 71 deletions(-)
Signature · 1 line
2.54.0