DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Morten Brørup" <mb@smartsharesystems.com>
To: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>,
	Bruce Richardson <bruce.richardson@intel.com>,
	dev@dpdk.org
Cc: "Morten Brørup" <mb@smartsharesystems.com>
Subject: [PATCH v2 1/4] mempool perf test: replace bare unsigned with unsigned int
Date: Mon, 31 Mar 2025 10:03:39 +0000	[thread overview]
Message-ID: <20250331100343.213430-2-mb@smartsharesystems.com> (raw)
In-Reply-To: <20250331100343.213430-1-mb@smartsharesystems.com>

Updated old code using bare "unsigned" with "unsigned int".

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
---
 app/test/test_mempool_perf.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/app/test/test_mempool_perf.c b/app/test/test_mempool_perf.c
index 4dd74ef75a..d4271a5ef9 100644
--- a/app/test/test_mempool_perf.c
+++ b/app/test/test_mempool_perf.c
@@ -89,16 +89,16 @@
 	} while (0)
 
 static int use_external_cache;
-static unsigned external_cache_size = RTE_MEMPOOL_CACHE_MAX_SIZE;
+static unsigned int external_cache_size = RTE_MEMPOOL_CACHE_MAX_SIZE;
 
 static RTE_ATOMIC(uint32_t) synchro;
 
 /* number of objects in one bulk operation (get or put) */
-static unsigned n_get_bulk;
-static unsigned n_put_bulk;
+static unsigned int n_get_bulk;
+static unsigned int n_put_bulk;
 
 /* number of objects retrieved from mempool before putting them back */
-static unsigned n_keep;
+static unsigned int n_keep;
 
 /* true if we want to test with constant n_get_bulk and n_put_bulk */
 static int use_constant_values;
@@ -118,7 +118,7 @@ static struct mempool_test_stats stats[RTE_MAX_LCORE];
  */
 static void
 my_obj_init(struct rte_mempool *mp, __rte_unused void *arg,
-	    void *obj, unsigned i)
+	    void *obj, unsigned int i)
 {
 	uint32_t *objnum = obj;
 	memset(obj, 0, mp->elt_size);
@@ -163,7 +163,7 @@ static int
 per_lcore_mempool_test(void *arg)
 {
 	struct rte_mempool *mp = arg;
-	unsigned lcore_id = rte_lcore_id();
+	unsigned int lcore_id = rte_lcore_id();
 	int ret = 0;
 	uint64_t start_cycles, end_cycles;
 	uint64_t time_diff = 0, hz = rte_get_timer_hz();
@@ -246,10 +246,10 @@ per_lcore_mempool_test(void *arg)
 static int
 launch_cores(struct rte_mempool *mp, unsigned int cores)
 {
-	unsigned lcore_id;
+	unsigned int lcore_id;
 	uint64_t rate;
 	int ret;
-	unsigned cores_save = cores;
+	unsigned int cores_save = cores;
 	double hz = rte_get_timer_hz();
 
 	rte_atomic_store_explicit(&synchro, 0, rte_memory_order_relaxed);
@@ -260,7 +260,7 @@ launch_cores(struct rte_mempool *mp, unsigned int cores)
 	printf("mempool_autotest cache=%u cores=%u n_get_bulk=%u "
 	       "n_put_bulk=%u n_keep=%u constant_n=%u ",
 	       use_external_cache ?
-		   external_cache_size : (unsigned) mp->cache_size,
+		   external_cache_size : (unsigned int) mp->cache_size,
 	       cores, n_get_bulk, n_put_bulk, n_keep, use_constant_values);
 
 	if (rte_mempool_avail_count(mp) != MEMPOOL_SIZE) {
@@ -315,9 +315,9 @@ do_one_mempool_test(struct rte_mempool *mp, unsigned int cores, int external_cac
 	unsigned int bulk_tab_put[] = { 1, 4, CACHE_LINE_BURST, 32, 64, 128, 256,
 			RTE_MEMPOOL_CACHE_MAX_SIZE, 0 };
 	unsigned int keep_tab[] = { 32, 128, 512, 2048, 8192, 32768, 0 };
-	unsigned *get_bulk_ptr;
-	unsigned *put_bulk_ptr;
-	unsigned *keep_ptr;
+	unsigned int *get_bulk_ptr;
+	unsigned int *put_bulk_ptr;
+	unsigned int *keep_ptr;
 	int ret;
 
 	for (get_bulk_ptr = bulk_tab_get; *get_bulk_ptr; get_bulk_ptr++) {
-- 
2.43.0


  reply	other threads:[~2025-03-31 10:03 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-28 16:48 [PATCH] mempool perf test: test random bulk sizes Morten Brørup
2025-03-13  8:23 ` Morten Brørup
2025-03-25  7:15   ` Morten Brørup
2025-03-30  8:29 ` Andrew Rybchenko
2025-03-30  8:57   ` Morten Brørup
2025-03-31 10:03 ` [PATCH v2 0/4] " Morten Brørup
2025-03-31 10:03   ` Morten Brørup [this message]
2025-03-31 10:03   ` [PATCH v2 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-03-31 10:03   ` [PATCH v2 3/4] mempool perf test: improve output readability Morten Brørup
2025-03-31 10:03   ` [PATCH v2 4/4] mempool perf test: test random bulk sizes Morten Brørup
2025-03-31 14:48     ` Andrew Rybchenko
2025-04-02  9:07       ` Morten Brørup
2025-03-31 14:48   ` [PATCH v2 0/4] " Andrew Rybchenko
2025-04-01 15:00 ` Morten Brørup
2025-04-01 15:00   ` [PATCH v2 1/4] mempool perf test: replace bare unsigned with unsigned int Morten Brørup
2025-04-01 15:00   ` [PATCH v2 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-04-01 15:00   ` [PATCH v2 3/4] mempool perf test: improve output readability Morten Brørup
2025-04-01 15:00   ` [PATCH v2 4/4] mempool perf test: test random bulk sizes Morten Brørup
2025-04-01 15:02 ` [PATCH v3 0/4] " Morten Brørup
2025-04-01 15:02   ` [PATCH v3 1/4] mempool perf test: replace bare unsigned with unsigned int Morten Brørup
2025-04-01 15:02   ` [PATCH v3 2/4] mempool perf test: test default mempool with cache Morten Brørup
2025-04-01 15:02   ` [PATCH v3 3/4] mempool perf test: improve output readability Morten Brørup
2025-04-01 15:02   ` [PATCH v3 4/4] mempool perf test: test random bulk sizes Morten Brørup

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=20250331100343.213430-2-mb@smartsharesystems.com \
    --to=mb@smartsharesystems.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.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;
as well as URLs for NNTP newsgroup(s).