From: Serhii Iliushyk <sil-plv@napatech.com>
To: dev@dpdk.org
Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com,
stephen@networkplumber.org
Subject: [PATCH v1 16/16] net/ntnic: rename table id functions
Date: Fri, 19 Sep 2025 11:15:01 +0200 [thread overview]
Message-ID: <20250919091504.1548351-17-sil-plv@napatech.com> (raw)
In-Reply-To: <20250919091504.1548351-1-sil-plv@napatech.com>
Extent table id functions with prefix nthw_.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/nthw/flow_api/flow_id_table.c | 10 +++++-----
drivers/net/ntnic/nthw/flow_api/flow_id_table.h | 10 +++++-----
.../profile_inline/flow_api_profile_inline.c | 16 ++++++++--------
3 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_id_table.c b/drivers/net/ntnic/nthw/flow_api/flow_id_table.c
index f22796597f..f7c983fb9f 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_id_table.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_id_table.c
@@ -64,7 +64,7 @@ static inline uint32_t ntnic_id_table_array_pop_free_id(struct ntnic_id_table_da
return id;
}
-void *ntnic_id_table_create(void)
+void *nthw_id_table_create(void)
{
struct ntnic_id_table_data *handle = calloc(1, sizeof(struct ntnic_id_table_data));
@@ -74,7 +74,7 @@ void *ntnic_id_table_create(void)
return handle;
}
-void ntnic_id_table_destroy(void *id_table)
+void nthw_id_table_destroy(void *id_table)
{
struct ntnic_id_table_data *handle = id_table;
@@ -84,7 +84,7 @@ void ntnic_id_table_destroy(void *id_table)
free(id_table);
}
-uint32_t ntnic_id_table_get_id(void *id_table, union flm_handles flm_h, uint8_t caller_id,
+uint32_t nthw_id_table_get_id(void *id_table, union flm_handles flm_h, uint8_t caller_id,
uint8_t type)
{
struct ntnic_id_table_data *handle = id_table;
@@ -106,7 +106,7 @@ uint32_t ntnic_id_table_get_id(void *id_table, union flm_handles flm_h, uint8_t
return new_id;
}
-void ntnic_id_table_free_id(void *id_table, uint32_t id)
+void nthw_id_table_free_id(void *id_table, uint32_t id)
{
struct ntnic_id_table_data *handle = id_table;
@@ -129,7 +129,7 @@ void ntnic_id_table_free_id(void *id_table, uint32_t id)
rte_spinlock_unlock(&handle->mtx);
}
-void ntnic_id_table_find(void *id_table, uint32_t id, union flm_handles *flm_h, uint8_t *caller_id,
+void nthw_id_table_find(void *id_table, uint32_t id, union flm_handles *flm_h, uint8_t *caller_id,
uint8_t *type)
{
struct ntnic_id_table_data *handle = id_table;
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_id_table.h b/drivers/net/ntnic/nthw/flow_api/flow_id_table.h
index edb4f42729..99789955bc 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_id_table.h
+++ b/drivers/net/ntnic/nthw/flow_api/flow_id_table.h
@@ -13,14 +13,14 @@ union flm_handles {
void *p;
};
-void *ntnic_id_table_create(void);
-void ntnic_id_table_destroy(void *id_table);
+void *nthw_id_table_create(void);
+void nthw_id_table_destroy(void *id_table);
-uint32_t ntnic_id_table_get_id(void *id_table, union flm_handles flm_h, uint8_t caller_id,
+uint32_t nthw_id_table_get_id(void *id_table, union flm_handles flm_h, uint8_t caller_id,
uint8_t type);
-void ntnic_id_table_free_id(void *id_table, uint32_t id);
+void nthw_id_table_free_id(void *id_table, uint32_t id);
-void ntnic_id_table_find(void *id_table, uint32_t id, union flm_handles *flm_h, uint8_t *caller_id,
+void nthw_id_table_find(void *id_table, uint32_t id, union flm_handles *flm_h, uint8_t *caller_id,
uint8_t *type);
#endif /* FLOW_ID_TABLE_H_ */
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
index 3f80e0f945..d9c10a8eab 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.c
@@ -211,7 +211,7 @@ static int flow_mtr_create_meter(struct flow_eth_dev *dev,
union flm_handles flm_h;
flm_h.idx = mtr_id;
- uint32_t flm_id = ntnic_id_table_get_id(dev->ndev->id_table_handle, flm_h, caller_id, 2);
+ uint32_t flm_id = nthw_id_table_get_id(dev->ndev->id_table_handle, flm_h, caller_id, 2);
learn_record->sw9 = flm_id;
learn_record->kid = 1;
@@ -327,7 +327,7 @@ static int flow_mtr_destroy_meter(struct flow_eth_dev *dev, uint8_t caller_id, u
mtr_stat[mtr_id].n_pkt_base = 0;
mtr_stat[mtr_id].buckets = NULL;
- ntnic_id_table_free_id(dev->ndev->id_table_handle, flm_id);
+ nthw_id_table_free_id(dev->ndev->id_table_handle, flm_id);
nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
@@ -431,7 +431,7 @@ static void flm_mtr_read_inf_records(struct flow_eth_dev *dev, uint32_t *data, u
uint8_t caller_id;
uint8_t type;
union flm_handles flm_h;
- ntnic_id_table_find(dev->ndev->id_table_handle, inf_data->id, &flm_h, &caller_id,
+ nthw_id_table_find(dev->ndev->id_table_handle, inf_data->id, &flm_h, &caller_id,
&type);
/* Check that received record hold valid meter statistics */
@@ -507,7 +507,7 @@ static void flm_mtr_read_sta_records(struct flow_eth_dev *dev, uint32_t *data, u
uint8_t caller_id;
uint8_t type;
union flm_handles flm_h;
- ntnic_id_table_find(dev->ndev->id_table_handle, sta_data->id, &flm_h, &caller_id,
+ nthw_id_table_find(dev->ndev->id_table_handle, sta_data->id, &flm_h, &caller_id,
&type);
if (type == 1) {
@@ -958,14 +958,14 @@ static int flm_flow_programming(struct flow_handle *fh, uint32_t flm_op)
if (flm_op == NT_FLM_OP_LEARN) {
union flm_handles flm_h;
flm_h.p = fh;
- fh->flm_id = ntnic_id_table_get_id(fh->dev->ndev->id_table_handle, flm_h,
+ fh->flm_id = nthw_id_table_get_id(fh->dev->ndev->id_table_handle, flm_h,
fh->caller_id, 1);
}
uint32_t flm_id = fh->flm_id;
if (flm_op == NT_FLM_OP_UNLEARN) {
- ntnic_id_table_free_id(fh->dev->ndev->id_table_handle, flm_id);
+ nthw_id_table_free_id(fh->dev->ndev->id_table_handle, flm_id);
if (rte_atomic_load_explicit(&fh->learn_ignored, rte_memory_order_seq_cst) == 1)
return 0;
@@ -4057,7 +4057,7 @@ int nthw_init_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev)
nthw_mod_flm_pst_flush(&ndev->be, 0, ALL_ENTRIES);
- ndev->id_table_handle = ntnic_id_table_create();
+ ndev->id_table_handle = nthw_id_table_create();
if (ndev->id_table_handle == NULL)
goto err_exit0;
@@ -4132,7 +4132,7 @@ int nthw_done_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev)
free(ndev->flm_mtr_handle);
nthw_flow_group_handle_destroy(&ndev->group_handle);
- ntnic_id_table_destroy(ndev->id_table_handle);
+ nthw_id_table_destroy(ndev->id_table_handle);
nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PRESET_ALL, 0, 0, 0);
nthw_mod_cat_cfn_flush(&ndev->be, 0, 1);
--
2.45.0
prev parent reply other threads:[~2025-09-19 9:22 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 01/16] net/ntnic: single file function as static Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 02/16] net/ntnic: remove unused functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 03/16] net/ntnic: move nthw_ to prefix Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 04/16] net/ntnic: change prefix hw_ to prefix nthw_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 05/16] net/ntnic: modify prefix flow_ with " Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 06/16] net/ntnic: change prefix flm_ to prefix nthw_flm_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 07/16] net/ntnic: change prefix nt_ to prefix nthw_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 08/16] net/ntnic: change prefix ntlog_ to prefix nthw_log Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 09/16] net/ntnic: change prefix km_ to prefix nthw_km_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 10/16] net/ntnic: change prefix set_ to prefix nthw_set_ Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 11/16] net/ntnic: rename common hash and flow functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 12/16] net/ntnic: rename register ops function Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 13/16] net/ntnic: rename get ops functions Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 14/16] net/ntnic: rename ops_init functions Serhii Iliushyk
2025-09-19 9:15 ` [PATCH v1 15/16] net/ntnic: rename nim agx setup function Serhii Iliushyk
2025-09-19 9:15 ` Serhii Iliushyk [this message]
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=20250919091504.1548351-17-sil-plv@napatech.com \
--to=sil-plv@napatech.com \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=mko-plv@napatech.com \
--cc=stephen@networkplumber.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).