]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
io_uring/zcrx: drop "notif" from stats struct names
authorPavel Begunkov <asml.silence@gmail.com>
Wed, 22 Jul 2026 13:42:15 +0000 (14:42 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 22 Jul 2026 15:48:41 +0000 (09:48 -0600)
Keep zcrx statistics generic and don't stick "notif" to its uapi
definitions. Stats dosn't need to be bound to notification details,
it makes it cleaner and more readable.

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
Link: https://patch.msgid.link/6a39676b6f71b67d3f89c6ebab7a3739873834a3.1784726895.git.asml.silence@gmail.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
include/uapi/linux/io_uring/query.h
include/uapi/linux/io_uring/zcrx.h
io_uring/query.c
io_uring/zcrx.c
io_uring/zcrx.h

index 1a68eca7c6b48ee5ed8b98b13e18ae0ee3910ee1..708bcdd585dd6210b46adc197d9f911b18e596be 100644 (file)
@@ -66,10 +66,10 @@ struct io_uring_query_zcrx {
 struct io_uring_query_zcrx_notif {
        /* Bitmask of supported ZCRX_NOTIF_* flags */
        __u32 notif_flags;
-       /* Size of io_uring_zcrx_notif_stats */
-       __u32 notif_stats_size;
+       /* Size of zcrx_stats */
+       __u32 stats_size;
        /* Required alignment for the stats struct within the region (ie stats_offset) */
-       __u32 notif_stats_off_alignment;
+       __u32 stats_off_alignment;
        __u32 __resv1;
        __u64 __resv2[4];
 };
index 15c05c45ce365101c2e4dd07fc34b9c071d74106..99e56ec26ead62c4022bf58048b43620080cea56 100644 (file)
@@ -76,11 +76,11 @@ enum zcrx_notification_type {
 };
 
 enum zcrx_notification_desc_flags {
-       /* If set, stats_offset holds a valid offset to a notif_stats struct */
+       /* If set, stats_offset holds a valid offset to a zcrx_stats struct */
        ZCRX_NOTIF_DESC_FLAG_STATS = 1 << 0,
 };
 
-struct zcrx_notif_stats {
+struct zcrx_stats {
        __u64   copy_count;     /* cumulative copy-fallback CQEs */
        __u64   copy_bytes;     /* cumulative bytes copied */
 };
index d529d94aa8f4a5ad9fb9f287fc29eaeee41f6bbf..2e48fddd8d3ab39147a969fe7bc2968bb784a02e 100644 (file)
@@ -50,8 +50,8 @@ static ssize_t io_query_zcrx_notif(union io_query_data *data)
        struct io_uring_query_zcrx_notif *e = &data->zcrx_notif;
 
        e->notif_flags = ZCRX_NOTIF_TYPE_MASK;
-       e->notif_stats_size = sizeof(struct zcrx_notif_stats);
-       e->notif_stats_off_alignment = __alignof__(struct zcrx_notif_stats);
+       e->stats_size = sizeof(struct zcrx_stats);
+       e->stats_off_alignment = __alignof__(struct zcrx_stats);
        e->__resv1 = 0;
        memset(&e->__resv2, 0, sizeof(e->__resv2));
        return sizeof(*e);
index 49163f9c39df3b86bce7847acd78d9f928cfb6a6..53dcb5110719b9219fe9fe55d639884b1dc8e232 100644 (file)
@@ -863,12 +863,12 @@ static int zcrx_validate_notif_stats(struct io_zcrx_ifq *ifq,
        used = reg->offsets.rqes +
               sizeof(struct io_uring_zcrx_rqe) * reg->rq_entries;
 
-       if (!IS_ALIGNED(stats_off, __alignof__(struct zcrx_notif_stats)))
+       if (!IS_ALIGNED(stats_off, __alignof__(struct zcrx_stats)))
                return -EINVAL;
        if (stats_off < used)
                return -ERANGE;
        if (check_add_overflow(stats_off,
-                              sizeof(struct zcrx_notif_stats),
+                               sizeof(struct zcrx_stats),
                               &end))
                return -ERANGE;
        if (end > io_region_size(&ifq->rq_region))
index fa00900e479e742597ebee8ebb4fb181916c4480..a8d301b6191f105dd6ca68f3e5c246456cd08c77 100644 (file)
@@ -80,7 +80,7 @@ struct io_zcrx_ifq {
        u32                             allowed_notif_mask;
        u32                             fired_notifs;
        u64                             notif_data;
-       struct zcrx_notif_stats         *notif_stats;
+       struct zcrx_stats               *notif_stats;
 };
 
 #if defined(CONFIG_IO_URING_ZCRX)