Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

io_uring/query: return support for custom rx page size

Add an ability to query if the zcrx rx page size setting is available.

Note, even when the API is supported by io_uring, the registration can
still get rejected for various reasons, e.g. when the NIC or the driver
doesn't support it, when the particular specified size is unsupported,
when the memory area doesn't satisfy all requirements, etc.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>

authored by

Pavel Begunkov and committed by
Jens Axboe
c2921467 7496e658

+11 -2
+8
include/uapi/linux/io_uring.h
··· 1090 1090 ZCRX_REG_IMPORT = 1, 1091 1091 }; 1092 1092 1093 + enum zcrx_features { 1094 + /* 1095 + * The user can ask for the desired rx page size by passing the 1096 + * value in struct io_uring_zcrx_ifq_reg::rx_buf_len. 1097 + */ 1098 + ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0, 1099 + }; 1100 + 1093 1101 /* 1094 1102 * Argument for IORING_REGISTER_ZCRX_IFQ 1095 1103 */
+2 -1
include/uapi/linux/io_uring/query.h
··· 50 50 __u64 area_flags; 51 51 /* The number of supported ZCRX_CTRL_* opcodes */ 52 52 __u32 nr_ctrl_opcodes; 53 - __u32 __resv1; 53 + /* Bitmask of ZCRX_FEATURE_* indicating which features are available */ 54 + __u32 features; 54 55 /* The refill ring header size */ 55 56 __u32 rq_hdr_size; 56 57 /* The alignment for the header */
+1 -1
io_uring/query.c
··· 39 39 e->nr_ctrl_opcodes = __ZCRX_CTRL_LAST; 40 40 e->rq_hdr_size = sizeof(struct io_uring); 41 41 e->rq_hdr_alignment = L1_CACHE_BYTES; 42 - e->__resv1 = 0; 42 + e->features = ZCRX_FEATURE_RX_PAGE_SIZE; 43 43 e->__resv2 = 0; 44 44 return sizeof(*e); 45 45 }