Netdev List
 help / color / mirror / Atom feed
From: Juanlu Herrero <juanlu@fastmail.com>
To: David Wei <dw@davidwei.uk>, netdev@vger.kernel.org
Cc: Jakub Kicinski <kuba@kernel.org>,
	Pavel Begunkov <asml.silence@gmail.com>,
	Juanlu Herrero <juanlu@fastmail.com>
Subject: [PATCH net-next v3 1/6] selftests: net: fix get_refill_ring_size() to use its local variable
Date: Wed, 22 Jul 2026 15:39:45 -0500	[thread overview]
Message-ID: <20260722203950.58550-2-juanlu@fastmail.com> (raw)
In-Reply-To: <20260722203950.58550-1-juanlu@fastmail.com>

In preparation for multi-threaded rss selftests, fix
get_refill_ring_size() to use its local `size` variable instead of
assigning to the file-global `ring_size`.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Juanlu Herrero <juanlu@fastmail.com>
---
 tools/testing/selftests/drivers/net/hw/iou-zcrx.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
index f6a8fc5fac241..df6b622043438 100644
--- a/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
+++ b/tools/testing/selftests/drivers/net/hw/iou-zcrx.c
@@ -132,10 +132,10 @@ static inline size_t get_refill_ring_size(unsigned int rq_entries)
 {
 	size_t size;
 
-	ring_size = rq_entries * sizeof(struct io_uring_zcrx_rqe);
+	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, page_size);
+	size += page_size;
+	return ALIGN_UP(size, page_size);
 }
 
 static void setup_zcrx(struct io_uring *ring)
-- 
2.53.0-Meta


  reply	other threads:[~2026-07-22 20:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-22 20:39 [PATCH net-next v3 0/6] selftests: net: multithreaded multiqueue iou-zcrx Juanlu Herrero
2026-07-22 20:39 ` Juanlu Herrero [this message]
2026-07-22 20:39 ` [PATCH net-next v3 2/6] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 3/6] selftests: net: refactor server state into struct thread_ctx Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 4/6] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 5/6] selftests: net: add multithread server " Juanlu Herrero
2026-07-22 20:39 ` [PATCH net-next v3 6/6] selftests: net: add rss_multiqueue test variant " Juanlu Herrero

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=20260722203950.58550-2-juanlu@fastmail.com \
    --to=juanlu@fastmail.com \
    --cc=asml.silence@gmail.com \
    --cc=dw@davidwei.uk \
    --cc=kuba@kernel.org \
    --cc=netdev@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