History

io_uring/zcrx: rename notif to event

"Notification" is too long and the abbreviated version is used in several places, which is inconsistent and more ambiguous for users. Rename it to event, which is easier to keep consistent. To keep the change small, only change uapi/ + do necessary fix ups, and the rest of internals can be adjusted in the next release.

Pavel Begunkov committed 3 months ago

Commit e366c151 parent 201e3085 files · +40 −39Browse files

Showing the changes to include/uapi/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/uapi/linux/io_uring/query.h +4 −4
  2. include/uapi/linux/io_uring/zcrx.h +14 −14
include/uapi/linux/io_uring/query.h+4−4
@@ -23,7 +23,7 @@ enum { · 22 unmodified lines
2323 IO_URING_QUERY_OPCODES = 0,
2424 IO_URING_QUERY_ZCRX = 1,
2525 IO_URING_QUERY_SCQ = 2,
26− IO_URING_QUERY_ZCRX_NOTIF = 3,
26+ IO_URING_QUERY_ZCRX_EVENT = 3,
2727
2828 __IO_URING_QUERY_MAX,
2929 };
@@ -63,9 +63,9 @@ struct io_uring_query_zcrx { · 33 unmodified lines
6363 __u64 __resv2;
6464 };
6565
66−struct io_uring_query_zcrx_notif {
67− /* Bitmask of supported ZCRX_NOTIF_* flags */
68− __u32 notif_flags;
66+struct io_uring_query_zcrx_event {
67+ /* Bitmask of supported ZCRX_EVENT_* flags */
68+ __u32 event_flags;
6969 /* Size of zcrx_stats */
7070 __u32 stats_size;
7171 /* Required alignment for the stats struct within the region (ie stats_offset) */
include/uapi/linux/io_uring/zcrx.h+14−14
@@ -65,19 +65,19 @@ enum zcrx_features { · 64 unmodified lines
6565 * value in struct io_uring_zcrx_ifq_reg::rx_buf_len.
6666 */
6767 ZCRX_FEATURE_RX_PAGE_SIZE = 1 << 0,
68− ZCRX_FEATURE_NOTIFICATION = 1 << 1,
68+ ZCRX_FEATURE_EVENT = 1 << 1,
6969 };
7070
71−enum zcrx_notification_type {
72− ZCRX_NOTIF_ALLOC_FAIL,
73− ZCRX_NOTIF_COPY,
71+enum zcrx_event_type {
72+ ZCRX_EVENT_ALLOC_FAIL,
73+ ZCRX_EVENT_COPY,
7474
75− __ZCRX_NOTIF_TYPE_LAST,
75+ __ZCRX_EVENT_TYPE_LAST,
7676 };
7777
78−enum zcrx_notification_desc_flags {
78+enum zcrx_event_desc_flags {
7979 /* If set, stats_offset holds a valid offset to a zcrx_stats struct */
80− ZCRX_NOTIF_DESC_FLAG_STATS = 1 << 0,
80+ ZCRX_EVENT_DESC_FLAG_STATS = 1 << 0,
8181 };
8282
8383 struct zcrx_stats {
@@ -85,10 +85,10 @@ struct zcrx_stats { · 1 unmodified line
8585 __u64 copy_bytes; /* cumulative bytes copied */
8686 };
8787
88−struct zcrx_notification_desc {
88+struct zcrx_event_desc {
8989 __u64 user_data;
9090 __u32 type_mask;
91− __u32 flags; /* see enum zcrx_notification_desc_flags */
91+ __u32 flags; /* see enum zcrx_event_desc_flags */
9292 __u64 stats_offset; /* offset from the beginning of refill ring region for stats */
9393 __u64 __resv2[9];
9494 };
@@ -108,14 +108,14 @@ struct io_uring_zcrx_ifq_reg { · 13 unmodified lines
108108 struct io_uring_zcrx_offsets offsets;
109109 __u32 zcrx_id;
110110 __u32 rx_buf_len;
111− __u64 notif_desc; /* see struct zcrx_notification_desc */
111+ __u64 event_desc; /* see struct zcrx_event_desc */
112112 __u64 __resv[2];
113113 };
114114
115115 enum zcrx_ctrl_op {
116116 ZCRX_CTRL_FLUSH_RQ,
117117 ZCRX_CTRL_EXPORT,
118− ZCRX_CTRL_ARM_NOTIFICATION,
118+ ZCRX_CTRL_ARM_EVENT,
119119
120120 __ZCRX_CTRL_LAST,
121121 };
@@ -129,8 +129,8 @@ struct zcrx_ctrl_export { · 7 unmodified lines
129129 __u32 __resv1[11];
130130 };
131131
132−struct zcrx_ctrl_arm_notif {
133− __u32 notif_type;
132+struct zcrx_ctrl_arm_event {
133+ __u32 event_type; /* see enum zcrx_event_type */
134134 __u32 __resv[11];
135135 };
136136
@@ -142,7 +142,7 @@ struct zcrx_ctrl { · 5 unmodified lines
142142 union {
143143 struct zcrx_ctrl_export zc_export;
144144 struct zcrx_ctrl_flush_rq zc_flush;
145− struct zcrx_ctrl_arm_notif zc_arm_notif;
145+ struct zcrx_ctrl_arm_event zc_arm_event;
146146 };
147147 };
148148