History

io_uring: add register/unregister napi function

This adds an api to register and unregister the napi for io-uring. If the arg value is specified when unregistering, the current napi setting for the busy poll timeout is copied into the user structure. If this is not required, NULL can be passed as the arg value.

Stefan Roesch committed 3 years ago

Commit ef1186c1 parent ff183d44 files · +88 −0Browse files

Showing the changes to include/uapi (1 of 4 files). Show all

Unified · Split

include/uapi/linux/io_uring.h+12−0
@@ -571,6 +571,10 @@ enum { · 570 unmodified lines
571 /* return status information for a buffer group */571 /* return status information for a buffer group */
572 IORING_REGISTER_PBUF_STATUS = 26,572 IORING_REGISTER_PBUF_STATUS = 26,
573 573
574 /* set/clear busy poll settings */
575 IORING_REGISTER_NAPI = 27,
576 IORING_UNREGISTER_NAPI = 28,
577
574 /* this goes last */578 /* this goes last */
575 IORING_REGISTER_LAST,579 IORING_REGISTER_LAST,
576 580
@@ -704,6 +708,14 @@ struct io_uring_buf_status { · 127 unmodified lines
704 __u32 resv[8];708 __u32 resv[8];
705};709};
706 710
711/* argument for IORING_(UN)REGISTER_NAPI */
712struct io_uring_napi {
713 __u32 busy_poll_to;
714 __u8 prefer_busy_poll;
715 __u8 pad[3];
716 __u64 resv;
717};
718
707/*719/*
708 * io_uring_restriction->opcode values720 * io_uring_restriction->opcode values
709 */721 */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t