mbox series

[v3,liburing,0/7] liburing: multishot receive

Message ID 20220630164918.3958710-1-dylany@fb.com (mailing list archive)
Headers show
Series liburing: multishot receive | expand

Message

Dylan Yudaken June 30, 2022, 4:49 p.m. UTC
This adds an API, tests and documentation for the multi shot receive functionality.

It also adds some testing for overflow paths in accept & poll which previously was
not tested.

Patch 1 adds a helper t_create_socket_pair which provides two connected sockets
without needing a hard coded port

Patch 2-5 adds multishot recv api, tests and docs
Patch 6,7 add tests for overflow in poll

v3:
 * remove TCP_NODELAY stuff from patch 1 as it was useless
 * fix return codes from recv-multishot test
 * use ioprio field for multishot

v2:
 * added a multishot recv api rather than expecting applications to use the
   flags directly
 * fixed the io_uring.h include
 * added overflow tests for recv multishot
 * added tests for poll/accept

Dylan Yudaken (7):
  add t_create_socket_pair
  add IORING_RECV_MULTISHOT to io_uring.h
  add io_uring_prep_(recv|recvmsg)_multishot
  add IORING_RECV_MULTISHOT docs
  add recv-multishot test
  add poll overflow test
  add accept with overflow test

 man/io_uring_prep_recv.3              |  22 ++
 man/io_uring_prep_recv_multishot.3    |   1 +
 man/io_uring_prep_recvmsg.3           |  20 ++
 man/io_uring_prep_recvmsg_multishot.3 |   1 +
 src/include/liburing.h                |  16 ++
 src/include/liburing/io_uring.h       |   5 +
 test/Makefile                         |   2 +
 test/accept.c                         | 129 +++++++---
 test/helpers.c                        |  90 +++++++
 test/helpers.h                        |   5 +
 test/poll-mshot-overflow.c            | 128 ++++++++++
 test/recv-multishot.c                 | 343 ++++++++++++++++++++++++++
 12 files changed, 734 insertions(+), 28 deletions(-)
 create mode 120000 man/io_uring_prep_recv_multishot.3
 create mode 120000 man/io_uring_prep_recvmsg_multishot.3
 create mode 100644 test/poll-mshot-overflow.c
 create mode 100644 test/recv-multishot.c


base-commit: 6c90ac3c9fb874d406656c9e7a68805c83a055a0

Comments

Jens Axboe June 30, 2022, 8:32 p.m. UTC | #1
On Thu, 30 Jun 2022 09:49:11 -0700, Dylan Yudaken wrote:
> This adds an API, tests and documentation for the multi shot receive functionality.
> 
> It also adds some testing for overflow paths in accept & poll which previously was
> not tested.
> 
> Patch 1 adds a helper t_create_socket_pair which provides two connected sockets
> without needing a hard coded port
> 
> [...]

Applied, thanks!

[1/7] add t_create_socket_pair
      commit: 9167905ca187064ba1d9ac4c8bb8484157bef86b
[2/7] add IORING_RECV_MULTISHOT to io_uring.h
      commit: 791fc0998b0bdb913f71320caf3128aae23d8f39
[3/7] add io_uring_prep_(recv|recvmsg)_multishot
      commit: 5279d6abefcdb3eedfbcae87559cfdda0ec6e94b
[4/7] add IORING_RECV_MULTISHOT docs
      commit: 8e182bbdff0f5d6e1640190f713ed11060470b5f
[5/7] add recv-multishot test
      commit: b367a5273328d05b8e118bdaf1e87c0c8d9f8606
[6/7] add poll overflow test
      commit: 4218ad94b03db5f9109f02db3ba45bebd55eb744
[7/7] add accept with overflow test
      commit: afc6be1619b4d9eeda5a432353fd7285a543640f

Best regards,