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];
};
};
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 */
};
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);
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))
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)