selftests: io_uring/zcrx: Use PAGE_SIZE for ring refill alignment
Subsystems (3)
PATCH 1/1 selftests: io_uring/zcrx: Use PAGE_SIZE for ring refill alignment
According to the 'Create refill ring' section in [1], use the macro PAGE_SIZE instead of 4096 hard code number.
[1]: https://www.kernel.org/doc/html/latest/networking/iou-zcrx.html
Signed-off-by Haiyue Wang <[email protected]>
--- tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/drivers/net/hw/iou-zcrx.c +1 -1
@@ -115,7 +115,7 @@ static inline size_t get_refill_ring_size(unsigned int rq_entries) ring_size = rq_entries *sizeof (struct io_uring_zcrx_rqe );/* add space for the header (head/tail/etc.) */ ring_size +=PAGE_SIZE ; -return ALIGN_UP (ring_size,4096 ); +return ALIGN_UP (ring_size,PAGE_SIZE ); }static void setup_zcrx (struct io_uring *ring)
Signature · 1 line
2.49.0
Jens Axboe
maintainerQuoted 4 lines · Haiyue Wang
According to the 'Create refill ring' section in [1], use the macro
PAGE_SIZEinstead of 4096 hard code number.[1]: https://www.kernel.org/doc/html/latest/networking/iou-zcrx.html
Same here, should use a runtime query to get it. This is not like in-kernel code where PAGE_SIZE can indeed be used.
Signature · 1 line
Jens Axboe