Skip to content

io_uring/zcrx: add CQE based notifications and stats reporting

Clément Léger io-uring linux-doc linux-kselftest lkml netdev 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest6 patches 3 repliesIn review
  2. v15 patches 3 repliesSuperseded

Changes in v2 from the cover letter

- Rebase on top of Pavel's branch that now uses a single CQE per notif
- Change notification mask to type (ie one CQE per event)
- Use a type rather than a mask for rearm as well
- Update tests to use single typei
- Update documentatiopn to state that notif CQEs are sent for a single event
- Fix zero init of zcrx_query_notif __resv field
- Rename resv1 to __resv1
- Reduce __resv2 size to match io_uring_query_opcode size
- Verifies that stats_offset is 0 if FLAG_STATS is zero
- Added zcrx notif query sequence to documentation
- Add _copy_fallback to test name

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6io_uring/zcrx: add ctx pointer to zcrxio_uring/zcrx.c io_uring/zcrx.h+34 -81 reply
2/6io_uring/zcrx: notify user when out of buffersinclude/uapi/linux/io_uring/zcrx.h io_uring/io_uring.c io_uring/io_uring.h +2 more+115 -51 reply
3/6io_uring/zcrx: notify user on frag copy fallbackinclude/uapi/linux/io_uring/zcrx.h io_uring/zcrx.c io_uring/zcrx.h+8 -20 replies
4/6io_uring/zcrx: add shared-memory notification statisticsinclude/uapi/linux/io_uring/query.h include/uapi/linux/io_uring/zcrx.h io_uring/query.c +2 more+94 -40 replies
5/6Documentation: networking: document zcrx notifications and statisticsDocumentation/networking/iou-zcrx.rst+121 -00 replies
6/6selftests: iou-zcrx: add notification and stats test for zcrxtools/testing/selftests/drivers/net/hw/iou-zcrx.c tools/testing/selftests/drivers/net/hw/iou-zcrx.py+151 -120 replies

Reviews trailers per patch

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

Read the v2 thread

Cover letter [PATCH v2 0/6] io_uring/zcrx: add CQE based notifications and stats reporting

The zcrx path can encounter various conditions that lead to internal fallbacks or errors. These errors can have a large impact on performance and functionality but are not yet not being reported to the user which is then unable to take action.

This series addresses this problem by adding a new notification system paired with a statistics structure. The notification system currently report out of buffer and packets that fallback to copy. The statistics structure report the number and total size of packets that were copied rather than received via the zero-copy path.

The out of buffer notification allows the user to actually adjust the buffer sizing when registering zcrx support for the ifq. Some future work could allow the user to add more memory on the fly to the pool so the page allocator doesn't run out of memory.

This series can be tested using the include kselftest modification and using the liburing series that updates headers and tests/examples so that it uses notifications and statistics.

Changes in v2:
- Rebase on top of Pavel's branch that now uses a single CQE per notif
- Change notification mask to type (ie one CQE per event)
- Use a type rather than a mask for rearm as well
- Update tests to use single typei
- Update documentatiopn to state that notif CQEs are sent for a single event
- Fix zero init of zcrx_query_notif __resv field
- Rename resv1 to __resv1
- Reduce __resv2 size to match io_uring_query_opcode size
- Verifies that stats_offset is 0 if FLAG_STATS is zero
- Added zcrx notif query sequence to documentation
- Add _copy_fallback to test name

---

Clément Léger (4):
io_uring/zcrx: notify user on frag copy fallback io_uring/zcrx: add shared-memory notification statistics
Documentation: networking: document zcrx notifications and statistics
selftests: iou-zcrx: add notification and stats test for zcrx

Pavel Begunkov (2):
io_uring/zcrx: add ctx pointer to zcrx
io_uring/zcrx: notify user when out of buffers

 Documentation/networking/iou-zcrx.rst         | 121 ++++++++++++
 include/uapi/linux/io_uring/query.h           |  12 ++
 include/uapi/linux/io_uring/zcrx.h            |  36 +++-
 io_uring/io_uring.c                           |   2 +-
 io_uring/io_uring.h                           |   1 +
 io_uring/query.c                              |  16 ++
 io_uring/zcrx.c                               | 180 +++++++++++++++++-
 io_uring/zcrx.h                               |  11 +-
 .../selftests/drivers/net/hw/iou-zcrx.c       | 114 ++++++++++-
 .../selftests/drivers/net/hw/iou-zcrx.py      |  49 ++++-
 10 files changed, 517 insertions(+), 25 deletions(-)
Signature · 1 line
Clément Léger