[PATCH v1 24/24] net/ntnic: rename table ID functions
Serhii Iliushyk
sil-plv at napatech.com
Wed Sep 24 16:41:47 CEST 2025
Extent table id functions with prefix nthw_.
Signed-off-by: Serhii Iliushyk <sil-plv at 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
More information about the dev
mailing list