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.
Showing the changes to include/uapi/linux (2 of 5 files). Show all
Unified · Split
| @@ -66,10 +66,10 @@ struct io_uring_query_zcrx { · 65 unmodified lines | |||
| 66 | struct io_uring_query_zcrx_notif { | 66 | struct io_uring_query_zcrx_notif { |
| 67 | /* Bitmask of supported ZCRX_NOTIF_* flags */ | 67 | /* Bitmask of supported ZCRX_NOTIF_* flags */ |
| 68 | __u32 notif_flags; | 68 | __u32 notif_flags; |
| 69 | /* Size of io_uring_zcrx_notif_stats */ | 69 | /* Size of zcrx_stats */ |
| 70 | __u32 notif_stats_size; | 70 | __u32 stats_size; |
| 71 | /* Required alignment for the stats struct within the region (ie stats_offset) */ | 71 | /* Required alignment for the stats struct within the region (ie stats_offset) */ |
| 72 | __u32 notif_stats_off_alignment; | 72 | __u32 stats_off_alignment; |
| 73 | __u32 __resv1; | 73 | __u32 __resv1; |
| 74 | __u64 __resv2[4]; | 74 | __u64 __resv2[4]; |
| 75 | }; | 75 | }; |
| @@ -76,11 +76,11 @@ enum zcrx_notification_type { · 75 unmodified lines | |||
| 76 | }; | 76 | }; |
| 77 | 77 | ||
| 78 | enum zcrx_notification_desc_flags { | 78 | enum zcrx_notification_desc_flags { |
| 79 | /* If set, stats_offset holds a valid offset to a notif_stats struct */ | 79 | /* If set, stats_offset holds a valid offset to a zcrx_stats struct */ |
| 80 | ZCRX_NOTIF_DESC_FLAG_STATS = 1 << 0, | 80 | ZCRX_NOTIF_DESC_FLAG_STATS = 1 << 0, |
| 81 | }; | 81 | }; |
| 82 | 82 | ||
| 83 | struct zcrx_notif_stats { | 83 | struct zcrx_stats { |
| 84 | __u64 copy_count; /* cumulative copy-fallback CQEs */ | 84 | __u64 copy_count; /* cumulative copy-fallback CQEs */ |
| 85 | __u64 copy_bytes; /* cumulative bytes copied */ | 85 | __u64 copy_bytes; /* cumulative bytes copied */ |
| 86 | }; | 86 | }; |