From: Haiyue Wang <haiyuewa@163.com>
To: io-uring@vger.kernel.org
Cc: Haiyue Wang <haiyuewa@163.com>
Subject: [PATCH v1] selftests: io_uring/zcrx: Use PAGE_SIZE for ring refill alignment
Date: Sat, 19 Apr 2025 17:57:56 +0800 [thread overview]
Message-ID: <20250419095801.4162-1-haiyuewa@163.com> (raw)
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 <haiyuewa@163.com>
---
tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
index c26b4180eddd..b9f6eb43400a 100644
--- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
+++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
@@ -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)
--
2.49.0
next reply other threads:[~2025-04-19 9:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-19 9:57 Haiyue Wang [this message]
2025-04-19 12:53 ` [PATCH v1] selftests: io_uring/zcrx: Use PAGE_SIZE for ring refill alignment Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250419095801.4162-1-haiyuewa@163.com \
--to=haiyuewa@163.com \
--cc=io-uring@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox