From: Oleksandr Kolomeiets <okl-plv@napatech.com>
To: dev@dpdk.org
Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com,
stephen@networkplumber.org, thomas@monjalon.net
Subject: [PATCH v2 08/26] net/ntnic: correct misspelled variable names
Date: Mon, 5 May 2025 09:12:48 +0200 [thread overview]
Message-ID: <20250505071309.586015-9-okl-plv@napatech.com> (raw)
In-Reply-To: <20250505071309.586015-1-okl-plv@napatech.com>
Rename alloced_size to allocated_size.
Rename num_queues_alloced to num_queues_allocated.
Signed-off-by: Oleksandr Kolomeiets <okl-plv@napatech.com>
---
drivers/net/ntnic/include/hw_mod_backend.h | 2 +-
.../net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c | 4 ++--
drivers/net/ntnic/ntnic_ethdev.c | 12 ++++++------
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h
index fcf9ebef8e..f7d4085e5c 100644
--- a/drivers/net/ntnic/include/hw_mod_backend.h
+++ b/drivers/net/ntnic/include/hw_mod_backend.h
@@ -145,7 +145,7 @@ enum km_flm_if_select_e {
#define COMMON_FUNC_INFO_S \
int ver; \
void *base; \
- unsigned int alloced_size; \
+ unsigned int allocated_size; \
int debug
enum frame_offs_e {
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c
index 299b9b913a..da126fe853 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_backend.c
@@ -79,14 +79,14 @@ void *nthw_callocate_mod(struct common_func_s *mod, int sets, ...)
va_end(args);
mod->base = base;
- mod->alloced_size = total_bytes;
+ mod->allocated_size = total_bytes;
return base;
}
void nthw_zero_module_cache(struct common_func_s *mod)
{
- memset(mod->base, 0, mod->alloced_size);
+ memset(mod->base, 0, mod->allocated_size);
}
int nthw_flow_api_backend_init(struct flow_api_backend_s *dev,
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 6ba6769e47..f511d91e49 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -967,19 +967,19 @@ static void eth_rx_queue_release(struct rte_eth_dev *eth_dev, uint16_t queue_id)
deallocate_hw_virtio_queues(&rx_q->hwq);
}
-static int num_queues_alloced;
+static int num_queues_allocated;
/* Returns num queue starting at returned queue num or -1 on fail */
static int allocate_queue(int num)
{
- int next_free = num_queues_alloced;
- NT_LOG_DBGX(DBG, NTNIC, "num_queues_alloced=%u, New queues=%u, Max queues=%u",
- num_queues_alloced, num, MAX_TOTAL_QUEUES);
+ int next_free = num_queues_allocated;
+ NT_LOG_DBGX(DBG, NTNIC, "num_queues_allocated=%u, New queues=%u, Max queues=%u",
+ num_queues_allocated, num, MAX_TOTAL_QUEUES);
- if (num_queues_alloced + num > MAX_TOTAL_QUEUES)
+ if (num_queues_allocated + num > MAX_TOTAL_QUEUES)
return -1;
- num_queues_alloced += num;
+ num_queues_allocated += num;
return next_free;
}
--
2.47.1
next prev parent reply other threads:[~2025-05-05 7:14 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 7:12 [PATCH v2 00/26] net/ntnic: fixes and improvements Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 01/26] net/ntnic: remove usage of the variable-length arrays Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 02/26] net/ntnic: handle string truncations when using strlcpy Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 03/26] net/ntnic: replace pragma pack with DPDK defined macros Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 04/26] net/ntnic: remove extra memset Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 05/26] net/ntnic: include all queues into statistics Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 06/26] net/ntnic: avoid misleading variable names Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 07/26] net/ntnic: apply packing to the structure Oleksandr Kolomeiets
2025-05-05 7:12 ` Oleksandr Kolomeiets [this message]
2025-05-05 7:12 ` [PATCH v2 09/26] net/ntnic: improve logging format specifiers Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 10/26] net/ntnic: remove usless expressions Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 11/26] net/ntnic: remove unused code Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 12/26] net/ntnic: remove usless part of conditional expression Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 13/26] net/ntnic: add error logging for hsh Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 14/26] net/ntnic: add explicitly specificator Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 15/26] net/ntnic: add handle memory allocation failures Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 16/26] net/ntnic: remove redundant initialization Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 17/26] net/ntnic: enhance null checks and assertions Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 18/26] net/ntnic: add return value check Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 19/26] net/ntnic: remove redundant assignments and branching Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 20/26] net/ntnic: rework array usage Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 21/26] net/ntnic: avoid divide by zero Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 22/26] net/ntnic: remove unnecessary void cast Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 23/26] net/ntnic: remove unnecessary memset Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 24/26] net/ntnic: add null verification Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 25/26] net/ntnic: avoid possible deadlock Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 26/26] net/ntnic: fix operation with rte ring queue Oleksandr Kolomeiets
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=20250505071309.586015-9-okl-plv@napatech.com \
--to=okl-plv@napatech.com \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=mko-plv@napatech.com \
--cc=sil-plv@napatech.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/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).