public inbox for [email protected]
 help / color / mirror / Atom feed
From: Dylan Yudaken <[email protected]>
To: <[email protected]>, <[email protected]>, <[email protected]>
Cc: <[email protected]>, Dylan Yudaken <[email protected]>
Subject: [PATCH liburing 0/4] Buffer ring API fixes
Date: Mon, 13 Jun 2022 06:12:49 -0700	[thread overview]
Message-ID: <[email protected]> (raw)

This set makes some changes to the new buf_ring API to help it's
usability.  Most importantly the _add function needs a mask parameter
to prevent buffer overflow. I added a _mask helper function to
calculate this. Even though its trivial it feels better to not force
the user to think about it.

Additionally _init is required as otherwise there is no provided way
to sync the tail with the kernel.

Lastly I add a test that showed up some issues found in 5.19-rc1.

Patch 1 is a small man fix
Patch 2/3 are the API changes
Patch 4 is the test.

Dylan Yudaken (4):
  remove non-existent manpage reference
  add mask parameter to io_uring_buf_ring_add
  add io_uring_buf_ring_init
  buf-ring: add tests that cycle through the provided buffer ring

 man/io_uring_buf_ring_add.3      |   5 ++
 man/io_uring_buf_ring_init.3     |  30 +++++++
 man/io_uring_buf_ring_mask.3     |  27 +++++++
 man/io_uring_register_buf_ring.3 |   6 +-
 src/include/liburing.h           |  18 ++++-
 test/buf-ring.c                  | 133 +++++++++++++++++++++++++++++++
 test/send_recvmsg.c              |   4 +-
 7 files changed, 218 insertions(+), 5 deletions(-)
 create mode 100644 man/io_uring_buf_ring_init.3
 create mode 100644 man/io_uring_buf_ring_mask.3


base-commit: 807c8169e153a3985f1a4deddc302846673ef979
--
2.30.2



             reply	other threads:[~2022-06-13 15:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-13 13:12 Dylan Yudaken [this message]
2022-06-13 13:12 ` [PATCH liburing 1/4] remove non-existent manpage reference Dylan Yudaken
2022-06-13 13:12 ` [PATCH liburing 2/4] add mask parameter to io_uring_buf_ring_add Dylan Yudaken
2022-06-13 13:12 ` [PATCH liburing 3/4] add io_uring_buf_ring_init Dylan Yudaken
2022-06-13 13:12 ` [PATCH liburing 4/4] buf-ring: add tests that cycle through the provided buffer ring Dylan Yudaken

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox