All of lore.kernel.org
 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 v4 1/6] selftests: net: fix get_refill_ring_size() to use its local variable
Date: Wed, 29 Jul 2026 17:18:20 -0500	[thread overview]
Message-ID: <20260729221825.42773-2-juanlu@fastmail.com> (raw)
In-Reply-To: <20260729221825.42773-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-29 22:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29 22:18 [PATCH net-next v4 0/6] selftests: net: multithreaded multiqueue iou-zcrx Juanlu Herrero
2026-07-29 22:18 ` Juanlu Herrero [this message]
2026-07-29 22:18 ` [PATCH net-next v4 2/6] selftests: net: remove unused variable in process_recvzc() Juanlu Herrero
2026-07-29 22:18 ` [PATCH net-next v4 3/6] selftests: net: refactor server state into struct thread_ctx Juanlu Herrero
2026-07-29 22:18 ` [PATCH net-next v4 4/6] selftests: net: add multithread client support to iou-zcrx Juanlu Herrero
2026-08-04 15:47   ` David Wei
2026-08-04 16:28     ` Juanlu Herrero
2026-07-29 22:18 ` [PATCH net-next v4 5/6] selftests: net: add multithread server " Juanlu Herrero
2026-08-04 10:42   ` Paolo Abeni
2026-08-04 16:27     ` Juanlu Herrero
2026-08-04 16:45   ` David Wei
2026-08-04 19:54     ` Juanlu Herrero
2026-07-29 22:18 ` [PATCH net-next v4 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=20260729221825.42773-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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.