* [PATCH v1 01/16] net/ntnic: single file function as static
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 02/16] net/ntnic: remove unused functions Serhii Iliushyk
` (14 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Refactoring: make single file functions static
to avoid namespace pollution.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/include/create_elements.h | 9 -
drivers/net/ntnic/include/flow_api.h | 2 -
drivers/net/ntnic/include/hw_mod_backend.h | 15 -
drivers/net/ntnic/nim/i2c_nim.c | 4 +-
.../net/ntnic/nthw/core/include/nthw_fpga.h | 2 -
.../net/ntnic/nthw/core/include/nthw_hif.h | 12 -
.../net/ntnic/nthw/core/include/nthw_iic.h | 9 -
.../ntnic/nthw/core/include/nthw_mac_pcs.h | 9 -
.../net/ntnic/nthw/core/include/nthw_pcie3.h | 13 -
.../nthw/core/include/nthw_pcm_nt400dxx.h | 1 -
.../ntnic/nthw/core/include/nthw_phy_tile.h | 2 -
.../net/ntnic/nthw/core/include/nthw_rpf.h | 2 -
.../net/ntnic/nthw/core/include/nthw_si5340.h | 2 -
drivers/net/ntnic/nthw/core/nthw_fpga.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_hif.c | 10 +-
drivers/net/ntnic/nthw/core/nthw_iic.c | 238 ++++-----
drivers/net/ntnic/nthw/core/nthw_mac_pcs.c | 52 +-
drivers/net/ntnic/nthw/core/nthw_pcie3.c | 11 +-
.../net/ntnic/nthw/core/nthw_pcm_nt400dxx.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_phy_tile.c | 5 +-
drivers/net/ntnic/nthw/core/nthw_rpf.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_si5340.c | 2 +-
drivers/net/ntnic/nthw/flow_api/flow_api.c | 125 ++---
.../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c | 226 ++++----
.../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c | 79 +--
.../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c | 30 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c | 4 +-
.../profile_inline/flow_api_hw_db_inline.c | 461 +++++++++--------
.../profile_inline/flow_api_hw_db_inline.h | 53 --
.../net/ntnic/nthw/model/nthw_fpga_model.c | 485 +++++++++---------
.../net/ntnic/nthw/model/nthw_fpga_model.h | 28 -
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 9 +-
drivers/net/ntnic/ntnic_vfio.c | 2 +-
drivers/net/ntnic/ntnic_vfio.h | 2 -
drivers/net/ntnic/ntutil/nt_util.c | 4 +-
drivers/net/ntnic/ntutil/nt_util.h | 3 -
36 files changed, 887 insertions(+), 1032 deletions(-)
diff --git a/drivers/net/ntnic/include/create_elements.h b/drivers/net/ntnic/include/create_elements.h
index dac2cd7cc9..7593ab4687 100644
--- a/drivers/net/ntnic/include/create_elements.h
+++ b/drivers/net/ntnic/include/create_elements.h
@@ -60,13 +60,4 @@ enum nt_rte_flow_item_type {
extern rte_spinlock_t flow_lock;
-int nthw_interpret_raw_data(uint8_t *data, uint8_t *preserve, int size, struct rte_flow_item *out);
-int nthw_create_attr(struct cnv_attr_s *attribute, const struct rte_flow_attr *attr);
-int nthw_create_match_elements(struct cnv_match_s *match, const struct rte_flow_item items[],
- int max_elem);
-int nthw_create_action_elements_inline(struct cnv_action_s *action,
- const struct rte_flow_action actions[],
- int max_elem,
- uint32_t queue_offset);
-
#endif /* __CREATE_ELEMENTS_H__ */
diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h
index f80414a185..582de3b281 100644
--- a/drivers/net/ntnic/include/flow_api.h
+++ b/drivers/net/ntnic/include/flow_api.h
@@ -27,8 +27,6 @@ struct hw_mod_resource_s {
/*
* Device Management API
*/
-int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev);
-
/**
* A structure used to configure the Receive Side Scaling (RSS) feature
* of an Ethernet port.
diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h
index f7d4085e5c..455bc7236e 100644
--- a/drivers/net/ntnic/include/hw_mod_backend.h
+++ b/drivers/net/ntnic/include/hw_mod_backend.h
@@ -415,14 +415,6 @@ int hw_mod_cat_cot_flush(struct flow_api_backend_s *be, int start_idx, int count
int hw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value);
-int hw_mod_cat_cct_flush(struct flow_api_backend_s *be, int start_idx, int count);
-
-int hw_mod_cat_kcc_flush(struct flow_api_backend_s *be, int start_idx, int count);
-
-int hw_mod_cat_exo_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_rck_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_len_flush(struct flow_api_backend_s *be, int start_idx, int count);
-
struct km_func_s {
COMMON_FUNC_INFO_S;
uint32_t nb_categories;
@@ -531,9 +523,6 @@ int hw_mod_km_tci_flush(struct flow_api_backend_s *be, int start_bank, int start
int count);
int hw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
uint32_t value);
-int hw_mod_km_tcq_flush(struct flow_api_backend_s *be, int start_bank, int start_record,
- int count);
-
struct flm_func_s {
COMMON_FUNC_INFO_S;
uint32_t nb_categories;
@@ -874,8 +863,6 @@ int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count
int hw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint32_t index,
uint32_t value);
-int hw_mod_pdb_config_flush(struct flow_api_backend_s *be);
-
struct tpe_func_s {
COMMON_FUNC_INFO_S;
uint32_t nb_rcp_categories;
@@ -961,8 +948,6 @@ int hw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
uint32_t value);
int hw_mod_tpe_ifr_counters_update(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_ifr_counters_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
- uint32_t value);
int hw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value);
diff --git a/drivers/net/ntnic/nim/i2c_nim.c b/drivers/net/ntnic/nim/i2c_nim.c
index 66729e3ab4..4fd882b8c9 100644
--- a/drivers/net/ntnic/nim/i2c_nim.c
+++ b/drivers/net/ntnic/nim/i2c_nim.c
@@ -13,7 +13,7 @@
#include "qsfp_registers.h"
#include "nim_defines.h"
-int nim_agx_read_id(struct nim_i2c_ctx *ctx);
+static int nim_agx_read_id(struct nim_i2c_ctx *ctx);
static void nim_agx_read(struct nim_i2c_ctx *ctx, uint8_t dev_addr, uint8_t reg_addr,
uint8_t data_len, void *p_data);
static void nim_agx_write(struct nim_i2c_ctx *ctx, uint8_t dev_addr, uint8_t reg_addr,
@@ -931,7 +931,7 @@ static void nim_agx_write(struct nim_i2c_ctx *ctx,
rte_spinlock_unlock(&p_nt_i2cm->i2cmmutex);
}
-int nim_agx_read_id(struct nim_i2c_ctx *ctx)
+static int nim_agx_read_id(struct nim_i2c_ctx *ctx)
{
nim_agx_read(ctx, 0xA0, 0, sizeof(ctx->nim_id), &ctx->nim_id);
return 0;
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
index 418aea8277..fb47807a2f 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
@@ -16,8 +16,6 @@
int nthw_fpga_init(struct fpga_info_s *p_fpga_info);
int nthw_fpga_shutdown(struct fpga_info_s *p_fpga_info);
-int nthw_fpga_get_param_info(struct fpga_info_s *p_fpga_info, nthw_fpga_t *p_fpga);
-
int nthw_fpga_avr_probe(nthw_fpga_t *p_fpga, const int n_instance_no);
int nthw_fpga_iic_scan(nthw_fpga_t *p_fpga, const int n_instance_no_begin,
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_hif.h b/drivers/net/ntnic/nthw/core/include/nthw_hif.h
index 7d5e1f1310..f91f7759a7 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_hif.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_hif.h
@@ -137,18 +137,6 @@ int nthw_hif_init(nthw_hif_t *p, nthw_fpga_t *p_fpga, int n_instance);
int nthw_hif_trigger_sample_time(nthw_hif_t *p);
int nthw_hif_force_soft_reset(nthw_hif_t *p);
-int nthw_hif_stat_req_enable(nthw_hif_t *p);
-int nthw_hif_stat_req_disable(nthw_hif_t *p);
-
-int nthw_hif_get_stat(nthw_hif_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
- uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
- uint64_t *p_tags_in_use, uint64_t *p_rd_err, uint64_t *p_wr_err);
-int nthw_hif_get_stat_rate(nthw_hif_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
- uint64_t *p_ref_clk_cnt, uint64_t *p_tags_in_use,
- uint64_t *p_rd_err_cnt, uint64_t *p_wr_err_cnt);
-
-int nthw_hif_end_point_counters_sample(nthw_hif_t *p, struct nthw_hif_end_point_counters *epc);
-
int nthw_hif_read_test_reg(nthw_hif_t *p, uint8_t test_reg, uint32_t *p_value);
int nthw_hif_write_test_reg(nthw_hif_t *p, uint8_t test_reg, uint32_t value);
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_iic.h b/drivers/net/ntnic/nthw/core/include/nthw_iic.h
index 41574f51f3..f6dec4a938 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_iic.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_iic.h
@@ -85,16 +85,7 @@ int nthw_iic_set_retry_params(nthw_iic_t *p, const int n_poll_delay, const int n
int nthw_iic_read_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
void *p_void);
-int nthw_iic_readbyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
- uint8_t *p_byte);
int nthw_iic_write_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
void *p_void);
-int nthw_iic_writebyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
- uint8_t *p_byte);
-bool nthw_iic_bus_ready(nthw_iic_t *p);
-bool nthw_iic_data_ready(nthw_iic_t *p);
-
int nthw_iic_scan(nthw_iic_t *p);
-int nthw_iic_scan_dev_addr(nthw_iic_t *p, int n_dev_addr, int n_reg_addr);
-
#endif /* __NTHW_IIC_H__ */
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_mac_pcs.h b/drivers/net/ntnic/nthw/core/include/nthw_mac_pcs.h
index 8d0e81bd73..a4119e4efe 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_mac_pcs.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_mac_pcs.h
@@ -198,14 +198,12 @@ typedef struct nthw_mac_pcs nthw_mac_pcs_t;
int nthw_mac_pcs_init(nthw_mac_pcs_t *p, nthw_fpga_t *p_fpga, int n_instance);
-void nthw_mac_pcs_tx_path_rst(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_rx_path_rst(nthw_mac_pcs_t *p, bool enable);
bool nthw_mac_pcs_is_rx_path_rst(nthw_mac_pcs_t *p);
/* wrapper - for ease of use */
void nthw_mac_pcs_set_rx_enable(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_set_tx_enable(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_set_tx_sel_host(nthw_mac_pcs_t *p, bool enable);
-void nthw_mac_pcs_set_tx_sel_tfg(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_set_ts_eop(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_set_host_loopback(nthw_mac_pcs_t *p, bool enable);
void nthw_mac_pcs_set_line_loopback(nthw_mac_pcs_t *p, bool enable);
@@ -240,11 +238,4 @@ void nthw_mac_pcs_swap_gty_rx_polarity(nthw_mac_pcs_t *p, uint8_t lane, bool swa
void nthw_mac_pcs_set_receiver_equalization_mode(nthw_mac_pcs_t *p, uint8_t mode);
void nthw_mac_pcs_set_led_mode(nthw_mac_pcs_t *p, uint8_t mode);
void nthw_mac_pcs_set_timestamp_comp_rx(nthw_mac_pcs_t *p, uint16_t rx_dly);
-void nthw_mac_pcs_set_port_no(nthw_mac_pcs_t *p, uint8_t port_no);
-
-uint32_t nthw_mac_pcs_get_fld_block_lock_lock(nthw_mac_pcs_t *p);
-uint32_t nthw_mac_pcs_get_fld_block_lock_lock_mask(nthw_mac_pcs_t *p);
-uint32_t nthw_mac_pcs_get_fld_lane_lock_lock(nthw_mac_pcs_t *p);
-uint32_t nthw_mac_pcs_get_fld_lane_lock_lock_mask(nthw_mac_pcs_t *p);
-
#endif /* NTHW_MAC_PCS_H_ */
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_pcie3.h b/drivers/net/ntnic/nthw/core/include/nthw_pcie3.h
index 846c09b1b9..21b5d7d22a 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_pcie3.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_pcie3.h
@@ -80,17 +80,4 @@ int nthw_pcie3_init(nthw_pcie3_t *p, nthw_fpga_t *p_fpga, int n_instance);
int nthw_pcie3_trigger_sample_time(nthw_pcie3_t *p);
-int nthw_pcie3_stat_req_enable(nthw_pcie3_t *p);
-int nthw_pcie3_stat_req_disable(nthw_pcie3_t *p);
-
-int nthw_pcie3_get_stat(nthw_pcie3_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
- uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
- uint32_t *p_tag_use_cnt, uint32_t *p_rq_rdy_cnt, uint32_t *p_rq_vld_cnt);
-int nthw_pcie3_get_stat_rate(nthw_pcie3_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
- uint64_t *p_ref_clk_cnt, uint64_t *p_tag_use_cnt,
- uint64_t *p_pci_nt_bus_util, uint64_t *p_pci_xil_bus_util);
-
-int nthw_pcie3_end_point_counters_sample_post(nthw_pcie3_t *p,
- struct nthw_hif_end_point_counters *epc);
-
#endif /* __NTHW_PCIE3_H__ */
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_pcm_nt400dxx.h b/drivers/net/ntnic/nthw/core/include/nthw_pcm_nt400dxx.h
index 47d2670cf5..312dfff974 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_pcm_nt400dxx.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_pcm_nt400dxx.h
@@ -34,7 +34,6 @@ nthw_pcm_nt400dxx_t *nthw_pcm_nt400dxx_new(void);
int nthw_pcm_nt400dxx_init(nthw_pcm_nt400dxx_t *p, nthw_fpga_t *p_fpga, int n_instance);
void nthw_pcm_nt400dxx_set_ts_pll_recal(nthw_pcm_nt400dxx_t *p, uint32_t val);
bool nthw_pcm_nt400dxx_get_ts_pll_locked_stat(nthw_pcm_nt400dxx_t *p);
-bool nthw_pcm_nt400dxx_get_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p);
void nthw_pcm_nt400dxx_set_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p, uint32_t val);
#endif /* __NTHW_PCM_NT400DXX_H__ */
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_phy_tile.h b/drivers/net/ntnic/nthw/core/include/nthw_phy_tile.h
index c4ec100c23..c35d39e61d 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_phy_tile.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_phy_tile.h
@@ -133,8 +133,6 @@ bool nthw_phy_tile_get_rx_am_lock(nthw_phy_tile_t *p, uint8_t intf_no);
void nthw_phy_tile_set_timestamp_comp_rx(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t value);
uint32_t nthw_phy_tile_get_timestamp_comp_rx(nthw_phy_tile_t *p, uint8_t intf_no);
-uint32_t nthw_phy_tile_read_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t address);
-void nthw_phy_tile_write_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t address, uint32_t data);
bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enable);
uint32_t nthw_phy_tile_read_xcvr(nthw_phy_tile_t *p, uint8_t intf_no, uint8_t lane,
uint32_t address);
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_rpf.h b/drivers/net/ntnic/nthw/core/include/nthw_rpf.h
index f893ac1c47..4916fb926e 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_rpf.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_rpf.h
@@ -37,9 +37,7 @@ typedef struct nthw_rpf nthw_rpf_t;
typedef struct nthw_rpf nt_rpf;
nthw_rpf_t *nthw_rpf_new(void);
-void nthw_rpf_delete(nthw_rpf_t *p);
int nthw_rpf_init(nthw_rpf_t *p, nthw_fpga_t *p_fpga, int n_instance);
-void nthw_rpf_administrative_block(nthw_rpf_t *p);
void nthw_rpf_block(nthw_rpf_t *p);
void nthw_rpf_unblock(nthw_rpf_t *p);
void nthw_rpf_set_maturing_delay(nthw_rpf_t *p, int32_t delay);
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_si5340.h b/drivers/net/ntnic/nthw/core/include/nthw_si5340.h
index f56883d99a..0e11855b92 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_si5340.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_si5340.h
@@ -25,8 +25,6 @@ nthw_si5340_t *nthw_si5340_new(void);
int nthw_si5340_init(nthw_si5340_t *p, nthw_iic_t *p_nthw_iic, uint8_t n_iic_addr);
void nthw_si5340_delete(nthw_si5340_t *p);
-int nthw_si5340_config(nthw_si5340_t *p, const void *p_data, int data_cnt,
- clk_profile_data_fmt_t data_format);
int nthw_si5340_config_fmt2(nthw_si5340_t *p, const clk_profile_data_fmt2_t *p_data,
const int data_cnt);
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index b74a1607fd..9153b31cea 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -18,7 +18,7 @@
#include <arpa/inet.h>
-int nthw_fpga_get_param_info(struct fpga_info_s *p_fpga_info, nthw_fpga_t *p_fpga)
+static int nthw_fpga_get_param_info(struct fpga_info_s *p_fpga_info, nthw_fpga_t *p_fpga)
{
mcu_info_t *p_mcu_info = &p_fpga_info->mcu_info;
diff --git a/drivers/net/ntnic/nthw/core/nthw_hif.c b/drivers/net/ntnic/nthw/core/nthw_hif.c
index f2d6f372b0..2899c3706b 100644
--- a/drivers/net/ntnic/nthw/core/nthw_hif.c
+++ b/drivers/net/ntnic/nthw/core/nthw_hif.c
@@ -217,7 +217,7 @@ int nthw_hif_trigger_sample_time(nthw_hif_t *p)
return 0;
}
-int nthw_hif_get_stat(nthw_hif_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
+static int nthw_hif_get_stat(nthw_hif_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
uint64_t *p_tags_in_use, uint64_t *p_rd_err, uint64_t *p_wr_err)
{
@@ -241,7 +241,7 @@ int nthw_hif_get_stat(nthw_hif_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
return 0;
}
-int nthw_hif_get_stat_rate(nthw_hif_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
+static int nthw_hif_get_stat_rate(nthw_hif_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
uint64_t *p_ref_clk_cnt, uint64_t *p_tags_in_use,
uint64_t *p_rd_err_cnt, uint64_t *p_wr_err_cnt)
{
@@ -280,7 +280,7 @@ int nthw_hif_get_stat_rate(nthw_hif_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_p
return 0;
}
-int nthw_hif_stat_req_enable(nthw_hif_t *p)
+static int nthw_hif_stat_req_enable(nthw_hif_t *p)
{
nthw_field_set_all(p->mp_fld_stat_ctrl_ena);
nthw_field_set_all(p->mp_fld_stat_ctrl_req);
@@ -288,7 +288,7 @@ int nthw_hif_stat_req_enable(nthw_hif_t *p)
return 0;
}
-int nthw_hif_stat_req_disable(nthw_hif_t *p)
+static int nthw_hif_stat_req_disable(nthw_hif_t *p)
{
nthw_field_clr_all(p->mp_fld_stat_ctrl_ena);
nthw_field_set_all(p->mp_fld_stat_ctrl_req);
@@ -296,7 +296,7 @@ int nthw_hif_stat_req_disable(nthw_hif_t *p)
return 0;
}
-int nthw_hif_end_point_counters_sample(nthw_hif_t *p, struct nthw_hif_end_point_counters *epc)
+static int nthw_hif_end_point_cntrs_sample(nthw_hif_t *p, struct nthw_hif_end_point_counters *epc)
{
RTE_ASSERT(epc);
diff --git a/drivers/net/ntnic/nthw/core/nthw_iic.c b/drivers/net/ntnic/nthw/core/nthw_iic.c
index a96d878f25..7a2247e371 100644
--- a/drivers/net/ntnic/nthw/core/nthw_iic.c
+++ b/drivers/net/ntnic/nthw/core/nthw_iic.c
@@ -271,50 +271,76 @@ int nthw_iic_set_retry_params(nthw_iic_t *p, const int n_poll_delay, const int n
return 0;
}
-int nthw_iic_read_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
- void *p_void)
+/*
+ * Support function for read/write functions below. Waits for bus ready.
+ */
+static bool nthw_iic_bus_ready(nthw_iic_t *p)
{
- const char *const p_adapter_id_str = p->mp_fpga->p_fpga_info->mp_adapter_id_str;
- const int n_debug_mode = nthw_module_get_debug_mode(p->mp_mod_iic);
+ int count = (p->mn_bus_ready_retry >= 0 ? p->mn_bus_ready_retry : 1000);
+ bool b_bus_busy = true;
- uint8_t *pb = (uint8_t *)p_void;
- int retry = (p->mn_read_data_retry >= 0 ? p->mn_read_data_retry : 10);
+ while (true) {
+ nthw_iic_reg_busbusy(p, &b_bus_busy);
- if (n_debug_mode == 0xff) {
- NT_LOG(DBG, NTHW, "%s: adr=0x%2.2x, reg=%d, len=%d", p_adapter_id_str, dev_addr,
- a_reg_addr, data_len);
- }
+ if (!b_bus_busy)
+ break;
- while (nthw_iic_readbyte(p, dev_addr, a_reg_addr, data_len, pb) != 0) {
- retry--;
+ count--;
- if (retry <= 0) {
- NT_LOG(ERR, NTHW,
- "%s: I2C%d: Read retry exhausted (dev_addr=%d a_reg_addr=%d)",
- p_adapter_id_str, p->mn_iic_instance, dev_addr, a_reg_addr);
- return -1;
+ if (count <= 0) /* Test for timeout */
+ break;
- } else {
- NT_LOG(DBG, NTHW, "%s: I2C%d: Read retry=%d (dev_addr=%d a_reg_addr=%d)",
- p_adapter_id_str, p->mn_iic_instance, retry, dev_addr, a_reg_addr);
- }
+ if (p->mn_poll_delay != 0)
+ I2C_WAIT_US(p->mn_poll_delay);
}
- if (n_debug_mode == 0xff) {
- NT_LOG(DBG, NTHW, "%s: adr=0x%2.2x, reg=%d, len=%d, retries remaining: %d",
- p_adapter_id_str, dev_addr, a_reg_addr, data_len, retry);
+ if (count == 0)
+ return false;
+
+ return true;
+}
+
+/*
+ * Support function for read function. Waits for data ready.
+ */
+static bool nthw_iic_data_ready(nthw_iic_t *p)
+{
+ int count = (p->mn_data_ready_retry >= 0 ? p->mn_data_ready_retry : 1000);
+ bool b_rx_fifo_empty = true;
+
+ while (true) {
+ nthw_iic_reg_rxfifo_empty(p, &b_rx_fifo_empty);
+
+ if (!b_rx_fifo_empty)
+ break;
+
+ count--;
+
+ if (count <= 0) /* Test for timeout */
+ break;
+
+ if (p->mn_poll_delay != 0)
+ I2C_WAIT_US(p->mn_poll_delay);
}
- return 0;
+ if (count == 0)
+ return false;
+
+ return true;
}
-int nthw_iic_readbyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
+static int nthw_iic_writebyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
uint8_t *p_byte)
{
const char *const p_adapter_id_str = p->mp_fpga->p_fpga_info->mp_adapter_id_str;
-
uint32_t value;
- uint32_t i;
+ int count;
+ int i;
+
+ if (data_len == 0)
+ return -1;
+
+ count = data_len - 1;
if (nthw_iic_bus_ready(p)) {
/* Reset TX fifo */
@@ -325,38 +351,34 @@ int nthw_iic_readbyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8
nthw_iic_reg_tx_fifo_write(p, value, 1, 0);
/* Write a_reg_addr to TX FIFO */
- nthw_iic_reg_tx_fifo_write(p, a_reg_addr, 0, 1);
+ nthw_iic_reg_tx_fifo_write(p, a_reg_addr, 0, 0);
- if (!nthw_iic_bus_ready(p)) {
- NT_LOG_DBGX(ERR, NTHW, "%s: error:", p_adapter_id_str);
- return -1;
+ for (i = 0; i < count; i++) {
+ /* Write data byte to TX fifo and set stop bit */
+ nthw_iic_reg_tx_fifo_write(p, *p_byte, 0, 0);
+ p_byte++;
}
- /* Write device address + RD bit to TX_FIFO and set start bit!! */
- value = (dev_addr << 1) | I2C_TRANSMIT_RD;
- nthw_iic_reg_tx_fifo_write(p, value, 1, 0);
-
- /* Write data_len to TX_FIFO and set stop bit!! */
- nthw_iic_reg_tx_fifo_write(p, data_len, 0, 1);
+ /* Write data byte to TX fifo and set stop bit */
+ nthw_iic_reg_tx_fifo_write(p, *p_byte, 0, 1);
- for (i = 0; i < data_len; i++) {
- /* Wait for RX FIFO not empty */
- if (!nthw_iic_data_ready(p))
- return -1;
+ if (!nthw_iic_bus_ready(p)) {
+ NT_LOG_DBGX(WRN, NTHW, "%s: warn: !busReady", p_adapter_id_str);
- /* Read data_len bytes from RX_FIFO */
- nthw_iic_reg_read_i2c_rx_fifo(p, p_byte);
- p_byte++;
+ while (true)
+ if (nthw_iic_bus_ready(p)) {
+ NT_LOG_DBGX(DBG, NTHW, "%s: info: busReady",
+ p_adapter_id_str);
+ break;
+ }
}
return 0;
} else {
- NT_LOG_DBGX(ERR, NTHW, "%s: error", p_adapter_id_str);
+ NT_LOG_DBGX(WRN, NTHW, "%s", p_adapter_id_str);
return -1;
}
-
- return 0;
}
int nthw_iic_write_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
@@ -385,18 +407,13 @@ int nthw_iic_write_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uin
return 0;
}
-int nthw_iic_writebyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
+static int nthw_iic_readbyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
uint8_t *p_byte)
{
const char *const p_adapter_id_str = p->mp_fpga->p_fpga_info->mp_adapter_id_str;
- uint32_t value;
- int count;
- int i;
-
- if (data_len == 0)
- return -1;
- count = data_len - 1;
+ uint32_t value;
+ uint32_t i;
if (nthw_iic_bus_ready(p)) {
/* Reset TX fifo */
@@ -407,95 +424,78 @@ int nthw_iic_writebyte(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint
nthw_iic_reg_tx_fifo_write(p, value, 1, 0);
/* Write a_reg_addr to TX FIFO */
- nthw_iic_reg_tx_fifo_write(p, a_reg_addr, 0, 0);
+ nthw_iic_reg_tx_fifo_write(p, a_reg_addr, 0, 1);
- for (i = 0; i < count; i++) {
- /* Write data byte to TX fifo and set stop bit */
- nthw_iic_reg_tx_fifo_write(p, *p_byte, 0, 0);
- p_byte++;
+ if (!nthw_iic_bus_ready(p)) {
+ NT_LOG_DBGX(ERR, NTHW, "%s: error:", p_adapter_id_str);
+ return -1;
}
- /* Write data byte to TX fifo and set stop bit */
- nthw_iic_reg_tx_fifo_write(p, *p_byte, 0, 1);
+ /* Write device address + RD bit to TX_FIFO and set start bit!! */
+ value = (dev_addr << 1) | I2C_TRANSMIT_RD;
+ nthw_iic_reg_tx_fifo_write(p, value, 1, 0);
- if (!nthw_iic_bus_ready(p)) {
- NT_LOG_DBGX(WRN, NTHW, "%s: warn: !busReady", p_adapter_id_str);
+ /* Write data_len to TX_FIFO and set stop bit!! */
+ nthw_iic_reg_tx_fifo_write(p, data_len, 0, 1);
- while (true)
- if (nthw_iic_bus_ready(p)) {
- NT_LOG_DBGX(DBG, NTHW, "%s: info: busReady",
- p_adapter_id_str);
- break;
- }
+ for (i = 0; i < data_len; i++) {
+ /* Wait for RX FIFO not empty */
+ if (!nthw_iic_data_ready(p))
+ return -1;
+
+ /* Read data_len bytes from RX_FIFO */
+ nthw_iic_reg_read_i2c_rx_fifo(p, p_byte);
+ p_byte++;
}
return 0;
} else {
- NT_LOG_DBGX(WRN, NTHW, "%s", p_adapter_id_str);
+ NT_LOG_DBGX(ERR, NTHW, "%s: error", p_adapter_id_str);
return -1;
}
-}
-
-/*
- * Support function for read/write functions below. Waits for bus ready.
- */
-bool nthw_iic_bus_ready(nthw_iic_t *p)
-{
- int count = (p->mn_bus_ready_retry >= 0 ? p->mn_bus_ready_retry : 1000);
- bool b_bus_busy = true;
-
- while (true) {
- nthw_iic_reg_busbusy(p, &b_bus_busy);
-
- if (!b_bus_busy)
- break;
-
- count--;
-
- if (count <= 0) /* Test for timeout */
- break;
-
- if (p->mn_poll_delay != 0)
- I2C_WAIT_US(p->mn_poll_delay);
- }
-
- if (count == 0)
- return false;
- return true;
+ return 0;
}
-/*
- * Support function for read function. Waits for data ready.
- */
-bool nthw_iic_data_ready(nthw_iic_t *p)
+int nthw_iic_read_data(nthw_iic_t *p, uint8_t dev_addr, uint8_t a_reg_addr, uint8_t data_len,
+ void *p_void)
{
- int count = (p->mn_data_ready_retry >= 0 ? p->mn_data_ready_retry : 1000);
- bool b_rx_fifo_empty = true;
+ const char *const p_adapter_id_str = p->mp_fpga->p_fpga_info->mp_adapter_id_str;
+ const int n_debug_mode = nthw_module_get_debug_mode(p->mp_mod_iic);
- while (true) {
- nthw_iic_reg_rxfifo_empty(p, &b_rx_fifo_empty);
+ uint8_t *pb = (uint8_t *)p_void;
+ int retry = (p->mn_read_data_retry >= 0 ? p->mn_read_data_retry : 10);
- if (!b_rx_fifo_empty)
- break;
+ if (n_debug_mode == 0xff) {
+ NT_LOG(DBG, NTHW, "%s: adr=0x%2.2x, reg=%d, len=%d", p_adapter_id_str, dev_addr,
+ a_reg_addr, data_len);
+ }
- count--;
+ while (nthw_iic_readbyte(p, dev_addr, a_reg_addr, data_len, pb) != 0) {
+ retry--;
- if (count <= 0) /* Test for timeout */
- break;
+ if (retry <= 0) {
+ NT_LOG(ERR, NTHW,
+ "%s: I2C%d: Read retry exhausted (dev_addr=%d a_reg_addr=%d)",
+ p_adapter_id_str, p->mn_iic_instance, dev_addr, a_reg_addr);
+ return -1;
- if (p->mn_poll_delay != 0)
- I2C_WAIT_US(p->mn_poll_delay);
+ } else {
+ NT_LOG(DBG, NTHW, "%s: I2C%d: Read retry=%d (dev_addr=%d a_reg_addr=%d)",
+ p_adapter_id_str, p->mn_iic_instance, retry, dev_addr, a_reg_addr);
+ }
}
- if (count == 0)
- return false;
+ if (n_debug_mode == 0xff) {
+ NT_LOG(DBG, NTHW, "%s: adr=0x%2.2x, reg=%d, len=%d, retries remaining: %d",
+ p_adapter_id_str, dev_addr, a_reg_addr, data_len, retry);
+ }
- return true;
+ return 0;
}
-int nthw_iic_scan_dev_addr(nthw_iic_t *p, int n_dev_addr, int n_reg_addr)
+static int nthw_iic_scan_dev_addr(nthw_iic_t *p, int n_dev_addr, int n_reg_addr)
{
const char *const p_adapter_id_str = p->mp_fpga->p_fpga_info->mp_adapter_id_str;
(void)p_adapter_id_str;
diff --git a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
index 23ed96e04d..a8d66268ff 100644
--- a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
+++ b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
@@ -16,6 +16,11 @@
static const uint8_t c_pcs_lanes = NTHW_MAC_PCS_LANES;
static const uint8_t c_mac_pcs_receiver_mode_dfe;
+static void nthw_mac_pcs_set_port_no(nthw_mac_pcs_t *p, uint8_t port_no)
+{
+ p->m_port_no = port_no;
+}
+
/*
* Parameters:
* p != NULL: init struct pointed to by p
@@ -424,7 +429,7 @@ void nthw_mac_pcs_set_tx_sel_host(nthw_mac_pcs_t *p, bool enable)
nthw_field_clr_flush(p->mp_fld_phymac_misc_tx_sel_host);
}
-void nthw_mac_pcs_set_tx_sel_tfg(nthw_mac_pcs_t *p, bool enable)
+static void nthw_mac_pcs_set_tx_sel_tfg(nthw_mac_pcs_t *p, bool enable)
{
nthw_field_get_updated(p->mp_fld_phymac_misc_tx_sel_tfg);
@@ -448,7 +453,7 @@ void nthw_mac_pcs_set_ts_eop(nthw_mac_pcs_t *p, bool enable)
}
}
-void nthw_mac_pcs_tx_path_rst(nthw_mac_pcs_t *p, bool enable)
+static void nthw_mac_pcs_tx_path_rst(nthw_mac_pcs_t *p, bool enable)
{
nthw_field_get_updated(p->mp_fld_pcs_config_tx_path_rst);
@@ -579,21 +584,6 @@ void nthw_mac_pcs_get_link_summary(nthw_mac_pcs_t *p,
*p_remote_fault = nthw_field_get_val32(p->mp_fld_link_summary_remote_fault);
}
-/*
- * Returns true if the lane/block lock bits indicate that a reset is required.
- * This is the case if Block/Lane lock is not all zero but not all set either.
- */
-bool nthw_mac_pcs_reset_required(nthw_mac_pcs_t *p)
-{
- uint32_t block_lock = nthw_mac_pcs_get_fld_block_lock_lock(p);
- uint32_t lane_lock = nthw_mac_pcs_get_fld_lane_lock_lock(p);
- uint32_t block_lock_mask = nthw_mac_pcs_get_fld_block_lock_lock_mask(p);
- uint32_t lane_lock_mask = nthw_mac_pcs_get_fld_lane_lock_lock_mask(p);
-
- return ((block_lock != 0) && (block_lock != block_lock_mask)) ||
- ((lane_lock != 0) && (lane_lock != lane_lock_mask));
-}
-
void nthw_mac_pcs_set_fec(nthw_mac_pcs_t *p, bool enable)
{
NT_LOG(DBG, NTHW, "Port %u: Set FEC: %u", p->m_port_no, enable);
@@ -838,27 +828,37 @@ void nthw_mac_pcs_set_timestamp_comp_rx(nthw_mac_pcs_t *p, uint16_t rx_dly)
}
}
-void nthw_mac_pcs_set_port_no(nthw_mac_pcs_t *p, uint8_t port_no)
-{
- p->m_port_no = port_no;
-}
-
-uint32_t nthw_mac_pcs_get_fld_block_lock_lock(nthw_mac_pcs_t *p)
+static uint32_t nthw_mac_pcs_get_fld_block_lock_lock(nthw_mac_pcs_t *p)
{
return nthw_field_get_updated(p->mp_fld_block_lock_lock);
}
-uint32_t nthw_mac_pcs_get_fld_block_lock_lock_mask(nthw_mac_pcs_t *p)
+static uint32_t nthw_mac_pcs_get_fld_block_lock_lock_mask(nthw_mac_pcs_t *p)
{
return p->m_fld_block_lock_lock_mask;
}
-uint32_t nthw_mac_pcs_get_fld_lane_lock_lock(nthw_mac_pcs_t *p)
+static uint32_t nthw_mac_pcs_get_fld_lane_lock_lock(nthw_mac_pcs_t *p)
{
return nthw_field_get_updated(p->mp_fld_vl_demuxed_lock);
}
-uint32_t nthw_mac_pcs_get_fld_lane_lock_lock_mask(nthw_mac_pcs_t *p)
+static uint32_t nthw_mac_pcs_get_fld_lane_lock_lock_mask(nthw_mac_pcs_t *p)
{
return p->m_fld_vl_demuxed_lock_mask;
}
+
+/*
+ * Returns true if the lane/block lock bits indicate that a reset is required.
+ * This is the case if Block/Lane lock is not all zero but not all set either.
+ */
+bool nthw_mac_pcs_reset_required(nthw_mac_pcs_t *p)
+{
+ uint32_t block_lock = nthw_mac_pcs_get_fld_block_lock_lock(p);
+ uint32_t lane_lock = nthw_mac_pcs_get_fld_lane_lock_lock(p);
+ uint32_t block_lock_mask = nthw_mac_pcs_get_fld_block_lock_lock_mask(p);
+ uint32_t lane_lock_mask = nthw_mac_pcs_get_fld_lane_lock_lock_mask(p);
+
+ return ((block_lock != 0) && (block_lock != block_lock_mask)) ||
+ ((lane_lock != 0) && (lane_lock != lane_lock_mask));
+}
diff --git a/drivers/net/ntnic/nthw/core/nthw_pcie3.c b/drivers/net/ntnic/nthw/core/nthw_pcie3.c
index bad1c31e35..2953896759 100644
--- a/drivers/net/ntnic/nthw/core/nthw_pcie3.c
+++ b/drivers/net/ntnic/nthw/core/nthw_pcie3.c
@@ -169,7 +169,7 @@ int nthw_pcie3_trigger_sample_time(nthw_pcie3_t *p)
return 0;
}
-int nthw_pcie3_stat_req_enable(nthw_pcie3_t *p)
+static int nthw_pcie3_stat_req_enable(nthw_pcie3_t *p)
{
nthw_field_set_all(p->mp_fld_stat_ctrl_ena);
nthw_field_set_all(p->mp_fld_stat_ctrl_req);
@@ -177,7 +177,7 @@ int nthw_pcie3_stat_req_enable(nthw_pcie3_t *p)
return 0;
}
-int nthw_pcie3_stat_req_disable(nthw_pcie3_t *p)
+static int nthw_pcie3_stat_req_disable(nthw_pcie3_t *p)
{
nthw_field_clr_all(p->mp_fld_stat_ctrl_ena);
nthw_field_set_all(p->mp_fld_stat_ctrl_req);
@@ -185,7 +185,7 @@ int nthw_pcie3_stat_req_disable(nthw_pcie3_t *p)
return 0;
}
-int nthw_pcie3_get_stat(nthw_pcie3_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
+static int nthw_pcie3_get_stat(nthw_pcie3_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
uint32_t *p_tag_use_cnt, uint32_t *p_rq_rdy_cnt, uint32_t *p_rq_vld_cnt)
{
@@ -205,7 +205,8 @@ int nthw_pcie3_get_stat(nthw_pcie3_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
return 0;
}
-int nthw_pcie3_get_stat_rate(nthw_pcie3_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
+static int nthw_pcie3_get_stat_rate(nthw_pcie3_t *p, uint64_t *p_pci_rx_rate,
+ uint64_t *p_pci_tx_rate,
uint64_t *p_ref_clk_cnt, uint64_t *p_tag_use_cnt,
uint64_t *p_pci_nt_bus_util, uint64_t *p_pci_xil_bus_util)
{
@@ -244,7 +245,7 @@ int nthw_pcie3_get_stat_rate(nthw_pcie3_t *p, uint64_t *p_pci_rx_rate, uint64_t
return 0;
}
-int nthw_pcie3_end_point_counters_sample_post(nthw_pcie3_t *p,
+static int nthw_pcie3_end_point_counters_sample_post(nthw_pcie3_t *p,
struct nthw_hif_end_point_counters *epc)
{
NT_LOG_DBGX(DBG, NTHW);
diff --git a/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c b/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
index e7be634a83..9004ebef06 100644
--- a/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
@@ -68,7 +68,7 @@ bool nthw_pcm_nt400dxx_get_ts_pll_locked_stat(nthw_pcm_nt400dxx_t *p)
return nthw_field_get_updated(p->mp_fld_stat_ts_pll_locked) != 0;
}
-bool nthw_pcm_nt400dxx_get_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p)
+static bool nthw_pcm_nt400dxx_get_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p)
{
return nthw_field_get_updated(p->mp_fld_latch_ts_pll_locked) != 0;
}
diff --git a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
index 5b2af77f7d..5e8055f0e3 100644
--- a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
+++ b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
@@ -954,7 +954,7 @@ uint32_t nthw_phy_tile_get_timestamp_comp_rx(nthw_phy_tile_t *p, uint8_t intf_no
return nthw_field_get_val32(p->mp_fld_port_comp_rx_compensation[intf_no]);
}
-uint32_t nthw_phy_tile_read_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t address)
+static uint32_t nthw_phy_tile_read_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t address)
{
nthw_register_update(p->mp_reg_port_eth_base[intf_no]);
nthw_field_set_val32(p->mp_fld_port_eth_base_cmd[intf_no], 0);
@@ -966,7 +966,8 @@ uint32_t nthw_phy_tile_read_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t ad
return nthw_field_get_updated(p->mp_fld_port_eth_data_data[intf_no]);
}
-void nthw_phy_tile_write_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint32_t address, uint32_t data)
+static void nthw_phy_tile_write_eth(nthw_phy_tile_t *p, uint8_t intf_no,
+ uint32_t address, uint32_t data)
{
nthw_field_set_val_flush32(p->mp_fld_port_eth_data_data[intf_no], data);
nthw_register_update(p->mp_reg_port_eth_base[intf_no]);
diff --git a/drivers/net/ntnic/nthw/core/nthw_rpf.c b/drivers/net/ntnic/nthw/core/nthw_rpf.c
index d5c19e312b..6f06601de8 100644
--- a/drivers/net/ntnic/nthw/core/nthw_rpf.c
+++ b/drivers/net/ntnic/nthw/core/nthw_rpf.c
@@ -20,7 +20,7 @@ nthw_rpf_t *nthw_rpf_new(void)
return p;
}
-void nthw_rpf_delete(nthw_rpf_t *p)
+static void nthw_rpf_delete(nthw_rpf_t *p)
{
free(p);
}
@@ -67,7 +67,7 @@ int nthw_rpf_init(nthw_rpf_t *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void nthw_rpf_administrative_block(nthw_rpf_t *p)
+static void nthw_rpf_administrative_block(nthw_rpf_t *p)
{
/* block all MAC ports */
nthw_register_update(p->mp_reg_control);
diff --git a/drivers/net/ntnic/nthw/core/nthw_si5340.c b/drivers/net/ntnic/nthw/core/nthw_si5340.c
index ceaa58e0f7..27f8653c9b 100644
--- a/drivers/net/ntnic/nthw/core/nthw_si5340.c
+++ b/drivers/net/ntnic/nthw/core/nthw_si5340.c
@@ -144,7 +144,7 @@ static int nthw_si5340_cfg(nthw_si5340_t *p, const void *p_data, int data_cnt,
return 0;
}
-int nthw_si5340_config(nthw_si5340_t *p, const void *p_data, int data_cnt,
+static int nthw_si5340_config(nthw_si5340_t *p, const void *p_data, int data_cnt,
clk_profile_data_fmt_t data_format)
{
const char *const p_adapter_id_str =
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index 90fc3f51a6..97594bd26d 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -375,68 +375,7 @@ static int nic_remove_eth_port_dev(struct flow_nic_dev *ndev, struct flow_eth_de
return -1;
}
-static void flow_ndev_reset(struct flow_nic_dev *ndev)
-{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
-
- if (profile_inline_ops == NULL) {
- NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
- return;
- }
-
- /* Delete all eth-port devices created on this NIC device */
- while (ndev->eth_base) {
- nthw_flow_delete_eth_dev(ndev->eth_base);
- ndev->eth_base = NULL;
- }
-
- /* Error check */
- while (ndev->flow_base) {
- NT_LOG(ERR, FILTER,
- "ERROR : Flows still defined but all eth-ports deleted. Flow %p",
- ndev->flow_base);
-
- profile_inline_ops->flow_destroy_profile_inline(ndev->flow_base->dev,
- ndev->flow_base, NULL);
- }
-
- profile_inline_ops->done_flow_management_of_ndev_profile_inline(ndev);
-
- km_free_ndev_resource_management(&ndev->km_res_handle);
- kcc_free_ndev_resource_management(&ndev->kcc_res_handle);
-
- ndev->flow_unique_id_counter = 0;
-
- /*
- * free all resources default allocated, initially for this NIC DEV
- * Is not really needed since the bitmap will be freed in a sec. Therefore
- * only in debug mode
- */
-
- /* Check if all resources has been released */
- NT_LOG(DBG, FILTER, "Delete NIC DEV Adaptor %i", ndev->adapter_no);
-
- for (unsigned int i = 0; i < RES_COUNT; i++) {
- int err = 0;
- NT_LOG(DBG, FILTER, "RES state for: %s", dbg_res_descr[i]);
-
- for (unsigned int ii = 0; ii < ndev->res[i].resource_count; ii++) {
- int ref = ndev->res[i].ref[ii];
- int used = flow_nic_is_resource_used(ndev, i, ii);
-
- if (ref || used) {
- NT_LOG(DBG, FILTER, " [%u]: ref cnt %i, used %i", ii, ref,
- used);
- err = 1;
- }
- }
-
- if (err)
- NT_LOG(DBG, FILTER, "ERROR - some resources not freed");
- }
-}
-
-int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
+static int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
{
const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
@@ -511,6 +450,68 @@ int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
return 0;
}
+static void flow_ndev_reset(struct flow_nic_dev *ndev)
+{
+ const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+
+ if (profile_inline_ops == NULL) {
+ NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
+ return;
+ }
+
+ /* Delete all eth-port devices created on this NIC device */
+ while (ndev->eth_base) {
+ nthw_flow_delete_eth_dev(ndev->eth_base);
+ ndev->eth_base = NULL;
+ }
+
+ /* Error check */
+ while (ndev->flow_base) {
+ NT_LOG(ERR, FILTER,
+ "ERROR : Flows still defined but all eth-ports deleted. Flow %p",
+ ndev->flow_base);
+
+ profile_inline_ops->flow_destroy_profile_inline(ndev->flow_base->dev,
+ ndev->flow_base, NULL);
+ }
+
+ profile_inline_ops->done_flow_management_of_ndev_profile_inline(ndev);
+
+ km_free_ndev_resource_management(&ndev->km_res_handle);
+ kcc_free_ndev_resource_management(&ndev->kcc_res_handle);
+
+ ndev->flow_unique_id_counter = 0;
+
+ /*
+ * free all resources default allocated, initially for this NIC DEV
+ * Is not really needed since the bitmap will be freed in a sec. Therefore
+ * only in debug mode
+ */
+
+ /* Check if all resources has been released */
+ NT_LOG(DBG, FILTER, "Delete NIC DEV Adaptor %i", ndev->adapter_no);
+
+ for (unsigned int i = 0; i < RES_COUNT; i++) {
+ int err = 0;
+ NT_LOG(DBG, FILTER, "RES state for: %s", dbg_res_descr[i]);
+
+ for (unsigned int ii = 0; ii < ndev->res[i].resource_count; ii++) {
+ int ref = ndev->res[i].ref[ii];
+ int used = flow_nic_is_resource_used(ndev, i, ii);
+
+ if (ref || used) {
+ NT_LOG(DBG, FILTER, " [%u]: ref cnt %i, used %i", ii, ref,
+ used);
+ err = 1;
+ }
+ }
+
+ if (err)
+ NT_LOG(DBG, FILTER, "ERROR - some resources not freed");
+ }
+}
+
+
/*
* Flow API NIC Setup
* Flow backend creation function - register and initialize common backend API to FPA modules
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
index abe09bfad2..e778c7568a 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
@@ -230,114 +230,6 @@ static int cfn_reset(struct flow_api_backend_s *be, int i)
return err;
}
-int hw_mod_cat_reset(struct flow_api_backend_s *be)
-{
- /* Zero entire cache area */
- nthw_zero_module_cache((struct common_func_s *)(&be->cat));
-
- NT_LOG(DBG, FILTER, "INIT CAT CFN");
-
- if (hw_mod_cat_cfn_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- if (_VER_ <= 18) {
- NT_LOG(DBG, FILTER, "INIT CAT KCE");
-
- if (hw_mod_cat_kce_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT KCS");
-
- if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT FTE");
-
- if (hw_mod_cat_fte_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
- return -1;
-
- } else {
- NT_LOG(DBG, FILTER, "INIT CAT KCE 0");
-
- if (hw_mod_cat_kce_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT KCS 0");
-
- if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT FTE 0");
-
- if (hw_mod_cat_fte_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
- return -1;
-
- if (be->cat.km_if_count > 1) {
- NT_LOG(DBG, FILTER, "INIT CAT KCE 1");
-
- if (hw_mod_cat_kce_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
- ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT KCS 1");
-
- if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
- ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT FTE 1");
-
- if (hw_mod_cat_fte_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
- ALL_ENTRIES))
- return -1;
- }
- }
-
- NT_LOG(DBG, FILTER, "INIT CAT CTE");
-
- if (hw_mod_cat_cte_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT CTS");
-
- if (hw_mod_cat_cts_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT COT");
-
- if (hw_mod_cat_cot_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT CCT");
-
- if (hw_mod_cat_cct_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT EXO");
-
- if (hw_mod_cat_exo_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT RCK");
-
- if (hw_mod_cat_rck_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- NT_LOG(DBG, FILTER, "INIT CAT LEN");
-
- if (hw_mod_cat_len_flush(be, 0, ALL_ENTRIES))
- return -1;
-
- if (be->cat.kcc_size) {
- NT_LOG(DBG, FILTER, "INIT CAT KCC");
-
- if (hw_mod_cat_kcc_flush(be, 0, ALL_ENTRIES))
- return -1;
- }
-
- return 0;
-}
-
int hw_mod_cat_cfn_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
switch (count) {
@@ -1449,7 +1341,7 @@ int hw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int i
return hw_mod_cat_cot_mod(be, field, index, &value, 0);
}
-int hw_mod_cat_cct_flush(struct flow_api_backend_s *be, int start_idx, int count)
+static int hw_mod_cat_cct_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.nb_cat_funcs * 4;
@@ -1462,7 +1354,7 @@ int hw_mod_cat_cct_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->cat_cct_flush(be->be_dev, &be->cat, start_idx, count);
}
-int hw_mod_cat_kcc_flush(struct flow_api_backend_s *be, int start_idx, int count)
+static int hw_mod_cat_kcc_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.kcc_size;
@@ -1475,7 +1367,7 @@ int hw_mod_cat_kcc_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->cat_kcc_flush(be->be_dev, &be->cat, start_idx, count);
}
-int hw_mod_cat_exo_flush(struct flow_api_backend_s *be, int start_idx, int count)
+static int hw_mod_cat_exo_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.nb_pm_ext;
@@ -1488,7 +1380,7 @@ int hw_mod_cat_exo_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->cat_exo_flush(be->be_dev, &be->cat, start_idx, count);
}
-int hw_mod_cat_rck_flush(struct flow_api_backend_s *be, int start_idx, int count)
+static int hw_mod_cat_rck_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.nb_pm_ext * 64;
@@ -1501,7 +1393,7 @@ int hw_mod_cat_rck_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->cat_rck_flush(be->be_dev, &be->cat, start_idx, count);
}
-int hw_mod_cat_len_flush(struct flow_api_backend_s *be, int start_idx, int count)
+static int hw_mod_cat_len_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.nb_len;
@@ -1513,3 +1405,111 @@ int hw_mod_cat_len_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->cat_len_flush(be->be_dev, &be->cat, start_idx, count);
}
+
+int hw_mod_cat_reset(struct flow_api_backend_s *be)
+{
+ /* Zero entire cache area */
+ nthw_zero_module_cache((struct common_func_s *)(&be->cat));
+
+ NT_LOG(DBG, FILTER, "INIT CAT CFN");
+
+ if (hw_mod_cat_cfn_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ if (_VER_ <= 18) {
+ NT_LOG(DBG, FILTER, "INIT CAT KCE");
+
+ if (hw_mod_cat_kce_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT KCS");
+
+ if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT FTE");
+
+ if (hw_mod_cat_fte_flush(be, KM_FLM_IF_FIRST, 0, 0, ALL_ENTRIES))
+ return -1;
+
+ } else {
+ NT_LOG(DBG, FILTER, "INIT CAT KCE 0");
+
+ if (hw_mod_cat_kce_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT KCS 0");
+
+ if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT FTE 0");
+
+ if (hw_mod_cat_fte_flush(be, KM_FLM_IF_FIRST, be->cat.km_if_m0, 0, ALL_ENTRIES))
+ return -1;
+
+ if (be->cat.km_if_count > 1) {
+ NT_LOG(DBG, FILTER, "INIT CAT KCE 1");
+
+ if (hw_mod_cat_kce_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
+ ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT KCS 1");
+
+ if (hw_mod_cat_kcs_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
+ ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT FTE 1");
+
+ if (hw_mod_cat_fte_flush(be, KM_FLM_IF_SECOND, be->cat.km_if_m1, 0,
+ ALL_ENTRIES))
+ return -1;
+ }
+ }
+
+ NT_LOG(DBG, FILTER, "INIT CAT CTE");
+
+ if (hw_mod_cat_cte_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT CTS");
+
+ if (hw_mod_cat_cts_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT COT");
+
+ if (hw_mod_cat_cot_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT CCT");
+
+ if (hw_mod_cat_cct_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT EXO");
+
+ if (hw_mod_cat_exo_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT RCK");
+
+ if (hw_mod_cat_rck_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ NT_LOG(DBG, FILTER, "INIT CAT LEN");
+
+ if (hw_mod_cat_len_flush(be, 0, ALL_ENTRIES))
+ return -1;
+
+ if (be->cat.kcc_size) {
+ NT_LOG(DBG, FILTER, "INIT CAT KCC");
+
+ if (hw_mod_cat_kcc_flush(be, 0, ALL_ENTRIES))
+ return -1;
+ }
+
+ return 0;
+}
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
index e1c97f62f5..a1b9abae66 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
@@ -114,44 +114,6 @@ void hw_mod_km_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_km_reset(struct flow_api_backend_s *be)
-{
- uint32_t tcam_v_set[3] = { 0x00000000, 0x00000000, 0x00000000 };
-
- /* Zero entire cache area */
- nthw_zero_module_cache((struct common_func_s *)(&be->km));
-
- NT_LOG(DBG, FILTER, "INIT KM RCP");
- hw_mod_km_rcp_flush(be, 0, ALL_ENTRIES);
-
- /* init CAM - all zero */
- NT_LOG(DBG, FILTER, "INIT KM CAM");
- hw_mod_km_cam_flush(be, 0, 0, ALL_ENTRIES);
-
- /* init TCAM - all zero */
- NT_LOG(DBG, FILTER, "INIT KM TCAM");
-
- for (unsigned int i = 0; i < be->km.nb_tcam_banks; i++) {
- /* TCAM entries are cache controlled,
- * thus need to hard reset initially to sync cache with HW
- */
- hw_mod_km_tcam_set(be, HW_KM_TCAM_BANK_RESET, i, 0, 0, tcam_v_set);
- }
-
- hw_mod_km_tcam_flush(be, 0, ALL_ENTRIES);
-
- /* init TCI - all zero */
- NT_LOG(DBG, FILTER, "INIT KM TCI");
- hw_mod_km_tci_flush(be, 0, 0, ALL_ENTRIES);
-
- NT_LOG(DBG, FILTER, "INIT KM TCQ");
-
- for (unsigned int i = 0; i < be->km.nb_tcam_bank_width; i++)
- hw_mod_km_tcq_flush(be, 0, i, be->km.nb_tcam_banks);
-
- return 0;
-}
-
int hw_mod_km_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
@@ -668,7 +630,8 @@ int hw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int ban
return hw_mod_km_tci_mod(be, field, bank, record, &value, 0);
}
-int hw_mod_km_tcq_flush(struct flow_api_backend_s *be, int start_bank, int start_record, int count)
+static int hw_mod_km_tcq_flush(struct flow_api_backend_s *be, int start_bank,
+ int start_record, int count)
{
if (count == ALL_ENTRIES)
count = be->km.nb_tcam_banks * be->km.nb_tcam_bank_width;
@@ -682,3 +645,41 @@ int hw_mod_km_tcq_flush(struct flow_api_backend_s *be, int start_bank, int start
return be->iface->km_tcq_flush(be->be_dev, &be->km, start_bank, start_record, count);
}
+
+int hw_mod_km_reset(struct flow_api_backend_s *be)
+{
+ uint32_t tcam_v_set[3] = { 0x00000000, 0x00000000, 0x00000000 };
+
+ /* Zero entire cache area */
+ nthw_zero_module_cache((struct common_func_s *)(&be->km));
+
+ NT_LOG(DBG, FILTER, "INIT KM RCP");
+ hw_mod_km_rcp_flush(be, 0, ALL_ENTRIES);
+
+ /* init CAM - all zero */
+ NT_LOG(DBG, FILTER, "INIT KM CAM");
+ hw_mod_km_cam_flush(be, 0, 0, ALL_ENTRIES);
+
+ /* init TCAM - all zero */
+ NT_LOG(DBG, FILTER, "INIT KM TCAM");
+
+ for (unsigned int i = 0; i < be->km.nb_tcam_banks; i++) {
+ /* TCAM entries are cache controlled,
+ * thus need to hard reset initially to sync cache with HW
+ */
+ hw_mod_km_tcam_set(be, HW_KM_TCAM_BANK_RESET, i, 0, 0, tcam_v_set);
+ }
+
+ hw_mod_km_tcam_flush(be, 0, ALL_ENTRIES);
+
+ /* init TCI - all zero */
+ NT_LOG(DBG, FILTER, "INIT KM TCI");
+ hw_mod_km_tci_flush(be, 0, 0, ALL_ENTRIES);
+
+ NT_LOG(DBG, FILTER, "INIT KM TCQ");
+
+ for (unsigned int i = 0; i < be->km.nb_tcam_bank_width; i++)
+ hw_mod_km_tcq_flush(be, 0, i, be->km.nb_tcam_banks);
+
+ return 0;
+}
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
index 4e8bd73d90..c5357a98c5 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
@@ -58,20 +58,6 @@ void hw_mod_pdb_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_pdb_reset(struct flow_api_backend_s *be)
-{
- int err = 0;
- /* Zero entire cache area */
- nthw_zero_module_cache((struct common_func_s *)(&be->hsh));
-
- NT_LOG(DBG, FILTER, "INIT PDB RCP");
- err |= hw_mod_pdb_rcp_flush(be, 0, ALL_ENTRIES);
-
- NT_LOG(DBG, FILTER, "INIT PDB CONFIG");
- err |= hw_mod_pdb_config_flush(be);
- return err;
-}
-
int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
@@ -243,7 +229,21 @@ int hw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint3
return hw_mod_pdb_rcp_mod(be, field, index, &value, 0);
}
-int hw_mod_pdb_config_flush(struct flow_api_backend_s *be)
+static int hw_mod_pdb_config_flush(struct flow_api_backend_s *be)
{
return be->iface->pdb_config_flush(be->be_dev, &be->pdb);
}
+
+int hw_mod_pdb_reset(struct flow_api_backend_s *be)
+{
+ int err = 0;
+ /* Zero entire cache area */
+ nthw_zero_module_cache((struct common_func_s *)(&be->hsh));
+
+ NT_LOG(DBG, FILTER, "INIT PDB RCP");
+ err |= hw_mod_pdb_rcp_flush(be, 0, ALL_ENTRIES);
+
+ NT_LOG(DBG, FILTER, "INIT PDB CONFIG");
+ err |= hw_mod_pdb_config_flush(be);
+ return err;
+}
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
index b2915efce5..d55adc6687 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
@@ -402,8 +402,8 @@ static int hw_mod_tpe_ifr_counters_mod(struct flow_api_backend_s *be, enum hw_tp
return 0;
}
-int hw_mod_tpe_ifr_counters_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
- uint32_t value)
+static int hw_mod_tpe_ifr_counters_set(struct flow_api_backend_s *be, enum hw_tpe_e field,
+ int index, uint32_t value)
{
return hw_mod_tpe_ifr_counters_mod(be, field, index, &value, 0);
}
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
index 52ca79f104..18d550a327 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
@@ -319,82 +319,6 @@ void hw_db_inline_destroy(void *db_handle)
free(db);
}
-void hw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
- uint32_t size)
-{
- for (uint32_t i = 0; i < size; ++i) {
- switch (idxs[i].type) {
- case HW_DB_IDX_TYPE_NONE:
- break;
-
- case HW_DB_IDX_TYPE_MATCH_SET:
- hw_db_inline_match_set_deref(ndev, db_handle,
- *(struct hw_db_match_set_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_ACTION_SET:
- hw_db_inline_action_set_deref(ndev, db_handle,
- *(struct hw_db_action_set_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_CAT:
- hw_db_inline_cat_deref(ndev, db_handle, *(struct hw_db_cat_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_COT:
- hw_db_inline_cot_deref(ndev, db_handle, *(struct hw_db_cot_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_QSL:
- hw_db_inline_qsl_deref(ndev, db_handle, *(struct hw_db_qsl_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_SLC_LR:
- hw_db_inline_slc_lr_deref(ndev, db_handle,
- *(struct hw_db_slc_lr_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_TPE:
- hw_db_inline_tpe_deref(ndev, db_handle, *(struct hw_db_tpe_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_TPE_EXT:
- hw_db_inline_tpe_ext_deref(ndev, db_handle,
- *(struct hw_db_tpe_ext_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_FLM_RCP:
- hw_db_inline_flm_deref(ndev, db_handle, *(struct hw_db_flm_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_FLM_FT:
- hw_db_inline_flm_ft_deref(ndev, db_handle,
- *(struct hw_db_flm_ft *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_KM_RCP:
- hw_db_inline_km_deref(ndev, db_handle, *(struct hw_db_km_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_KM_FT:
- hw_db_inline_km_ft_deref(ndev, db_handle, *(struct hw_db_km_ft *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_HSH:
- hw_db_inline_hsh_deref(ndev, db_handle, *(struct hw_db_hsh_idx *)&idxs[i]);
- break;
-
- case HW_DB_IDX_TYPE_FLM_SCRUB:
- hw_db_inline_scrub_deref(ndev, db_handle,
- *(struct hw_db_flm_scrub_idx *)&idxs[i]);
- break;
-
- default:
- break;
- }
- }
-}
-
struct hw_db_idx *hw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_handle,
enum hw_db_idx_type type, struct hw_db_idx *idxs, uint32_t size)
{
@@ -1508,6 +1432,16 @@ static int hw_db_inline_match_set_compare(const struct hw_db_inline_match_set_da
data1->km_ft.raw == data2->km_ft.raw && data1->jump == data2->jump;
}
+static void hw_db_inline_match_set_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_match_set_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->match_set[idx.ids].ref += 1;
+}
+
struct hw_db_match_set_idx
hw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_match_set_data *data)
@@ -1563,17 +1497,7 @@ hw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
return idx;
}
-void hw_db_inline_match_set_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_match_set_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->match_set[idx.ids].ref += 1;
-}
-
-void hw_db_inline_match_set_deref(struct flow_nic_dev *ndev, void *db_handle,
+static void hw_db_inline_match_set_deref(struct flow_nic_dev *ndev, void *db_handle,
struct hw_db_match_set_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1619,6 +1543,16 @@ static int hw_db_inline_action_set_compare(const struct hw_db_inline_action_set_
data1->hsh.raw == data2->hsh.raw && data1->scrub.raw == data2->scrub.raw;
}
+static void hw_db_inline_action_set_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_action_set_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->action_set[idx.ids].ref += 1;
+}
+
struct hw_db_action_set_idx
hw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_action_set_data *data)
@@ -1654,17 +1588,7 @@ hw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
return idx;
}
-void hw_db_inline_action_set_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_action_set_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->action_set[idx.ids].ref += 1;
-}
-
-void hw_db_inline_action_set_deref(struct flow_nic_dev *ndev, void *db_handle,
+static void hw_db_inline_action_set_deref(struct flow_nic_dev *ndev, void *db_handle,
struct hw_db_action_set_idx idx)
{
(void)ndev;
@@ -1693,6 +1617,15 @@ static int hw_db_inline_cot_compare(const struct hw_db_inline_cot_data *data1,
data1->frag_rcp == data2->frag_rcp;
}
+static void hw_db_inline_cot_ref(struct flow_nic_dev *ndev __rte_unused, void *db_handle,
+ struct hw_db_cot_idx idx)
+{
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->cot[idx.ids].ref += 1;
+}
+
struct hw_db_cot_idx hw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cot_data *data)
{
@@ -1728,16 +1661,7 @@ struct hw_db_cot_idx hw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_cot_ref(struct flow_nic_dev *ndev __rte_unused, void *db_handle,
- struct hw_db_cot_idx idx)
-{
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->cot[idx.ids].ref += 1;
-}
-
-void hw_db_inline_cot_deref(struct flow_nic_dev *ndev __rte_unused, void *db_handle,
+static void hw_db_inline_cot_deref(struct flow_nic_dev *ndev __rte_unused, void *db_handle,
struct hw_db_cot_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1791,6 +1715,15 @@ static int hw_db_inline_qsl_compare(const struct hw_db_inline_qsl_data *data1,
return 1;
}
+static void hw_db_inline_qsl_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_qsl_idx idx)
+{
+ (void)db_handle;
+
+ if (!idx.error && idx.ids != 0)
+ nthw_flow_nic_ref_resource(ndev, RES_QSL_RCP, idx.ids);
+}
+
struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_qsl_data *data)
{
@@ -1884,15 +1817,8 @@ struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_ha
return qsl_idx;
}
-void hw_db_inline_qsl_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_qsl_idx idx)
-{
- (void)db_handle;
-
- if (!idx.error && idx.ids != 0)
- nthw_flow_nic_ref_resource(ndev, RES_QSL_RCP, idx.ids);
-}
-
-void hw_db_inline_qsl_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_qsl_idx idx)
+static void hw_db_inline_qsl_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_qsl_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1937,6 +1863,16 @@ static int hw_db_inline_slc_lr_compare(const struct hw_db_inline_slc_lr_data *da
data1->head_slice_ofs == data2->head_slice_ofs;
}
+static void hw_db_inline_slc_lr_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_slc_lr_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->slc_lr[idx.ids].ref += 1;
+}
+
struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_slc_lr_data *data)
{
@@ -1977,17 +1913,7 @@ struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void
return idx;
}
-void hw_db_inline_slc_lr_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_slc_lr_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->slc_lr[idx.ids].ref += 1;
-}
-
-void hw_db_inline_slc_lr_deref(struct flow_nic_dev *ndev, void *db_handle,
+static void hw_db_inline_slc_lr_deref(struct flow_nic_dev *ndev, void *db_handle,
struct hw_db_slc_lr_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2044,6 +1970,16 @@ static int hw_db_inline_tpe_compare(const struct hw_db_inline_tpe_data *data1,
data1->len_c_sub_dyn == data2->len_c_sub_dyn;
}
+static void hw_db_inline_tpe_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_tpe_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->tpe[idx.ids].ref += 1;
+}
+
struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_data *data)
{
@@ -2173,16 +2109,8 @@ struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_tpe_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_tpe_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->tpe[idx.ids].ref += 1;
-}
-
-void hw_db_inline_tpe_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_tpe_idx idx)
+static void hw_db_inline_tpe_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_tpe_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2229,6 +2157,16 @@ static int hw_db_inline_tpe_ext_compare(const struct hw_db_inline_tpe_ext_data *
memcmp(data1->hdr8, data2->hdr8, HW_DB_INLINE_MAX_ENCAP_SIZE) == 0;
}
+static void hw_db_inline_tpe_ext_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_tpe_ext_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->tpe_ext[idx.ids].ref += 1;
+}
+
struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_ext_data *data)
{
@@ -2291,17 +2229,7 @@ struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, voi
return idx;
}
-void hw_db_inline_tpe_ext_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_tpe_ext_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->tpe_ext[idx.ids].ref += 1;
-}
-
-void hw_db_inline_tpe_ext_deref(struct flow_nic_dev *ndev, void *db_handle,
+static void hw_db_inline_tpe_ext_deref(struct flow_nic_dev *ndev, void *db_handle,
struct hw_db_tpe_ext_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2337,6 +2265,16 @@ void hw_db_inline_tpe_ext_deref(struct flow_nic_dev *ndev, void *db_handle,
/* CAT */
/******************************************************************************/
+static void hw_db_inline_cat_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_cat_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->cat[idx.ids].ref += 1;
+}
+
static int hw_db_inline_cat_compare(const struct hw_db_inline_cat_data *data1,
const struct hw_db_inline_cat_data *data2)
{
@@ -2389,16 +2327,8 @@ struct hw_db_cat_idx hw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_cat_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cat_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->cat[idx.ids].ref += 1;
-}
-
-void hw_db_inline_cat_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cat_idx idx)
+static void hw_db_inline_cat_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_cat_idx idx)
{
(void)ndev;
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2424,6 +2354,15 @@ static int hw_db_inline_km_compare(const struct hw_db_inline_km_rcp_data *data1,
return data1->rcp == data2->rcp;
}
+static void hw_db_inline_km_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->km[idx.id1].ref += 1;
+}
+
struct hw_db_km_idx hw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_rcp_data *data)
{
@@ -2457,16 +2396,8 @@ struct hw_db_km_idx hw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_hand
return idx;
}
-void hw_db_inline_km_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->km[idx.id1].ref += 1;
-}
-
-void hw_db_inline_km_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_idx idx)
+static void hw_db_inline_km_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_km_idx idx)
{
(void)ndev;
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2493,6 +2424,18 @@ static int hw_db_inline_km_ft_compare(const struct hw_db_inline_km_ft_data *data
data1->action_set.raw == data2->action_set.raw;
}
+static void hw_db_inline_km_ft_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_km_ft idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error) {
+ uint32_t cat_offset = idx.id3 * db->nb_cat;
+ db->km[idx.id2].ft[cat_offset + idx.id1].ref += 1;
+ }
+}
+
struct hw_db_km_ft hw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_ft_data *data)
{
@@ -2538,18 +2481,8 @@ struct hw_db_km_ft hw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_km_ft_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_ft idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error) {
- uint32_t cat_offset = idx.id3 * db->nb_cat;
- db->km[idx.id2].ft[cat_offset + idx.id1].ref += 1;
- }
-}
-
-void hw_db_inline_km_ft_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_ft idx)
+static void hw_db_inline_km_ft_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_km_ft idx)
{
(void)ndev;
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2590,6 +2523,16 @@ static int hw_db_inline_flm_compare(const struct hw_db_inline_flm_rcp_data *data
return 1;
}
+static void hw_db_inline_flm_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_flm_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->flm[idx.id1].ref += 1;
+}
+
struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_rcp_data *data, int group)
{
@@ -2653,16 +2596,8 @@ struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_flm_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->flm[idx.id1].ref += 1;
-}
-
-void hw_db_inline_flm_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_idx idx)
+static void hw_db_inline_flm_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_flm_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2693,6 +2628,16 @@ static int hw_db_inline_flm_ft_compare(const struct hw_db_inline_flm_ft_data *da
data1->action_set.raw == data2->action_set.raw;
}
+static void hw_db_inline_flm_ft_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_flm_ft idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error && idx.id3 == 0)
+ db->flm[idx.id2].ft[idx.id1].ref += 1;
+}
+
struct hw_db_flm_ft hw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data)
{
@@ -2784,16 +2729,8 @@ struct hw_db_flm_ft hw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_
return idx;
}
-void hw_db_inline_flm_ft_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_ft idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error && idx.id3 == 0)
- db->flm[idx.id2].ft[idx.id1].ref += 1;
-}
-
-void hw_db_inline_flm_ft_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_ft idx)
+static void hw_db_inline_flm_ft_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_flm_ft idx)
{
(void)ndev;
(void)db_handle;
@@ -2829,6 +2766,16 @@ static int hw_db_inline_hsh_compare(const struct hw_db_inline_hsh_data *data1,
return data1->func == data2->func && data1->hash_mask == data2->hash_mask;
}
+static void hw_db_inline_hsh_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_hsh_idx idx)
+{
+ (void)ndev;
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->hsh[idx.ids].ref += 1;
+}
+
struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_hsh_data *data)
{
@@ -2890,16 +2837,8 @@ struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_ha
return idx;
}
-void hw_db_inline_hsh_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_hsh_idx idx)
-{
- (void)ndev;
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->hsh[idx.ids].ref += 1;
-}
-
-void hw_db_inline_hsh_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_hsh_idx idx)
+static void hw_db_inline_hsh_deref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_hsh_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2938,6 +2877,17 @@ static int hw_db_inline_scrub_compare(const struct hw_db_inline_scrub_data *data
return data1->timeout == data2->timeout;
}
+static void hw_db_inline_scrub_ref(struct flow_nic_dev *ndev, void *db_handle,
+ struct hw_db_flm_scrub_idx idx)
+{
+ (void)ndev;
+
+ struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
+
+ if (!idx.error)
+ db->scrub[idx.ids].ref += 1;
+}
+
struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_scrub_data *data)
{
@@ -2994,18 +2944,7 @@ struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, voi
return idx;
}
-void hw_db_inline_scrub_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_flm_scrub_idx idx)
-{
- (void)ndev;
-
- struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
-
- if (!idx.error)
- db->scrub[idx.ids].ref += 1;
-}
-
-void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
+static void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
struct hw_db_flm_scrub_idx idx)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -3030,3 +2969,79 @@ void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
db->scrub[idx.ids].ref = 0;
}
}
+
+void hw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
+ uint32_t size)
+{
+ for (uint32_t i = 0; i < size; ++i) {
+ switch (idxs[i].type) {
+ case HW_DB_IDX_TYPE_NONE:
+ break;
+
+ case HW_DB_IDX_TYPE_MATCH_SET:
+ hw_db_inline_match_set_deref(ndev, db_handle,
+ *(struct hw_db_match_set_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_ACTION_SET:
+ hw_db_inline_action_set_deref(ndev, db_handle,
+ *(struct hw_db_action_set_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_CAT:
+ hw_db_inline_cat_deref(ndev, db_handle, *(struct hw_db_cat_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_COT:
+ hw_db_inline_cot_deref(ndev, db_handle, *(struct hw_db_cot_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_QSL:
+ hw_db_inline_qsl_deref(ndev, db_handle, *(struct hw_db_qsl_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_SLC_LR:
+ hw_db_inline_slc_lr_deref(ndev, db_handle,
+ *(struct hw_db_slc_lr_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_TPE:
+ hw_db_inline_tpe_deref(ndev, db_handle, *(struct hw_db_tpe_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_TPE_EXT:
+ hw_db_inline_tpe_ext_deref(ndev, db_handle,
+ *(struct hw_db_tpe_ext_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_FLM_RCP:
+ hw_db_inline_flm_deref(ndev, db_handle, *(struct hw_db_flm_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_FLM_FT:
+ hw_db_inline_flm_ft_deref(ndev, db_handle,
+ *(struct hw_db_flm_ft *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_KM_RCP:
+ hw_db_inline_km_deref(ndev, db_handle, *(struct hw_db_km_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_KM_FT:
+ hw_db_inline_km_ft_deref(ndev, db_handle, *(struct hw_db_km_ft *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_HSH:
+ hw_db_inline_hsh_deref(ndev, db_handle, *(struct hw_db_hsh_idx *)&idxs[i]);
+ break;
+
+ case HW_DB_IDX_TYPE_FLM_SCRUB:
+ hw_db_inline_scrub_deref(ndev, db_handle,
+ *(struct hw_db_flm_scrub_idx *)&idxs[i]);
+ break;
+
+ default:
+ break;
+ }
+ }
+}
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
index aa046b68a7..e7f66dc075 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
@@ -298,96 +298,43 @@ void hw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *fil
struct hw_db_match_set_idx
hw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_match_set_data *data);
-void hw_db_inline_match_set_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_match_set_idx idx);
-void hw_db_inline_match_set_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_match_set_idx idx);
-
struct hw_db_action_set_idx
hw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_action_set_data *data);
-void hw_db_inline_action_set_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_action_set_idx idx);
-void hw_db_inline_action_set_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_action_set_idx idx);
-
/**/
struct hw_db_cot_idx hw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cot_data *data);
-void hw_db_inline_cot_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cot_idx idx);
-void hw_db_inline_cot_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cot_idx idx);
-
struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_qsl_data *data);
-void hw_db_inline_qsl_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_qsl_idx idx);
-void hw_db_inline_qsl_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_qsl_idx idx);
-
struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_slc_lr_data *data);
-void hw_db_inline_slc_lr_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_slc_lr_idx idx);
-void hw_db_inline_slc_lr_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_slc_lr_idx idx);
-
struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_data *data);
-void hw_db_inline_tpe_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_tpe_idx idx);
-void hw_db_inline_tpe_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_tpe_idx idx);
-
struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_ext_data *data);
-void hw_db_inline_tpe_ext_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_tpe_ext_idx idx);
-void hw_db_inline_tpe_ext_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_tpe_ext_idx idx);
-
struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_hsh_data *data);
-void hw_db_inline_hsh_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_hsh_idx idx);
-void hw_db_inline_hsh_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_hsh_idx idx);
-
/**/
struct hw_db_cat_idx hw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cat_data *data);
-void hw_db_inline_cat_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cat_idx idx);
-void hw_db_inline_cat_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_cat_idx idx);
-
/**/
struct hw_db_km_idx hw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_rcp_data *data);
-void hw_db_inline_km_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_idx idx);
-void hw_db_inline_km_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_idx idx);
-
struct hw_db_km_ft hw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_ft_data *data);
-void hw_db_inline_km_ft_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_ft idx);
-void hw_db_inline_km_ft_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_km_ft idx);
-
/**/
struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_rcp_data *data, int group);
-void hw_db_inline_flm_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_idx idx);
-void hw_db_inline_flm_deref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_idx idx);
-
struct hw_db_flm_ft hw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data);
struct hw_db_flm_ft hw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data);
-void hw_db_inline_flm_ft_ref(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_flm_ft idx);
-void hw_db_inline_flm_ft_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_flm_ft idx);
-
struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_scrub_data *data);
-void hw_db_inline_scrub_ref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_flm_scrub_idx idx);
-void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
- struct hw_db_flm_scrub_idx idx);
-
int hw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id, uint32_t ft,
uint32_t qsl_hw_id);
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index 5256adc648..3655c86f51 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -171,6 +171,191 @@ int nthw_fpga_extract_rev_id(const uint64_t n_fpga_ident)
{
return (uint16_t)(n_fpga_ident & 0xFF);
}
+/*
+ * Field
+ */
+nthw_field_t *nthw_field_new(void)
+{
+ nthw_field_t *p = malloc(sizeof(nthw_field_t));
+
+ return p;
+}
+
+static void nthw_field_init(nthw_field_t *p, nthw_register_t *p_reg,
+ const nthw_fpga_field_init_s *p_init)
+{
+ p->mp_owner = p_reg;
+
+ p->mn_debug_mode = p_reg->mn_debug_mode;
+
+ p->mn_id = p_init->id;
+ p->mn_bit_width = p_init->bw;
+ p->mn_bit_pos_low = p_init->low;
+ p->mn_reset_val = (uint32_t)p_init->reset_val;
+ p->mn_first_word = p_init->low / 32;
+ p->mn_first_bit = p_init->low % 32;
+ p->mn_front_mask = 0;
+ p->mn_body_length = 0;
+ p->mn_words = (p_init->bw + 0x1f) / 0x20;
+ p->mn_tail_mask = 0;
+
+ {
+ int bits_remaining = p_init->bw;
+ int front_mask_length = 32 - p->mn_first_bit;
+
+ if (front_mask_length > bits_remaining)
+ front_mask_length = bits_remaining;
+
+ bits_remaining -= front_mask_length;
+
+ p->mn_front_mask =
+ (uint32_t)(((1ULL << front_mask_length) - 1) << p->mn_first_bit);
+
+ p->mn_body_length = bits_remaining / 32;
+ bits_remaining -= p->mn_body_length * 32;
+ p->mn_tail_mask = (1 << bits_remaining) - 1;
+
+ if (p->mn_debug_mode >= 0x100) {
+ NT_LOG_DBGX(DBG, NTHW,
+ "fldid=%08" PRIu32 ": [%08" PRIu16 ":%08" PRIu16 "] %08" PRIu16 "/%08"
+ PRIu16 ": (%08i ,%08" PRIu32 ") (0x%08" PRIx32 ",%08"
+ PRIu32 ",0x%08" PRIx32 ")",
+ p_init->id, p_init->low, (p_init->low + p_init->bw),
+ p_init->bw, ((p_init->bw + 31) / 32), p->mn_first_word,
+ p->mn_first_bit, p->mn_front_mask, p->mn_body_length,
+ p->mn_tail_mask);
+ }
+ }
+}
+
+static void nthw_field_reset(const nthw_field_t *p)
+{
+ nthw_field_set_val32(p, (uint32_t)p->mn_reset_val);
+}
+
+/*
+ * Register
+ */
+nthw_register_t *nthw_register_new(void)
+{
+ nthw_register_t *p = malloc(sizeof(nthw_register_t));
+
+ return p;
+}
+
+static void nthw_register_init(nthw_register_t *p, nthw_module_t *p_module,
+ nthw_fpga_register_init_s *p_init)
+{
+ int i;
+
+ p->mp_owner = p_module;
+
+ p->mn_id = p_init->id;
+ p->mn_bit_width = p_init->bw;
+ p->mn_addr_rel = p_init->addr_rel;
+ p->mn_addr = p_module->mn_addr_base + p_init->addr_rel;
+ p->mn_type = p_init->type;
+ /* Old P200 registers have no bw at register level - default to BW=-1 */
+ p->mn_len = ((p_init->bw != (uint16_t)-1) ? ((p_init->bw + 31) >> 5) : 1);
+ p->mn_debug_mode = p_module->mn_debug_mode;
+
+ p->mn_fields = p_init->nb_fields;
+
+ if (p->mn_fields) {
+ p->mpa_fields = malloc(p->mn_fields * sizeof(nthw_field_t *));
+
+ if (p->mpa_fields) {
+ memset(p->mpa_fields, 0, (p->mn_fields * sizeof(nthw_field_t *)));
+
+ for (i = 0; i < p->mn_fields; i++) {
+ nthw_field_t *p_field = nthw_field_new();
+
+ nthw_field_init(p_field, p, &p_init->fields[i]);
+ p->mpa_fields[i] = p_field;
+ }
+
+ p->mp_shadow = malloc(p->mn_len * sizeof(uint32_t));
+
+ if (p->mp_shadow)
+ memset(p->mp_shadow, 0x00, (p->mn_len * sizeof(uint32_t)));
+
+ p->mp_dirty = malloc(p->mn_len * sizeof(bool));
+
+ if (p->mp_dirty)
+ memset(p->mp_dirty, 0x00, (p->mn_len * sizeof(bool)));
+ }
+ }
+}
+
+/*
+ * Param
+ */
+nthw_param_t *nthw_param_new(void)
+{
+ nthw_param_t *p = malloc(sizeof(nthw_param_t));
+
+ return p;
+}
+
+static void nthw_param_init(nthw_param_t *p, nthw_fpga_t *p_fpga, nthw_fpga_prod_param_s *p_init)
+{
+ p->mp_owner = p_fpga;
+ p->mp_init = p_init;
+
+ p->mn_param_id = p_init->id;
+ p->mn_param_value = p_init->value;
+}
+
+/*
+ * Module
+ */
+nthw_module_t *nthw_module_new(void)
+{
+ nthw_module_t *p = malloc(sizeof(nthw_module_t));
+
+ return p;
+}
+
+static void nthw_module_init(nthw_module_t *p, nthw_fpga_t *p_fpga, nthw_fpga_module_init_s *p_init)
+{
+ int i;
+
+ p->mp_owner = p_fpga;
+ p->mp_init = p_init;
+
+ p->mn_mod_id = p_init->id;
+ p->mn_instance = p_init->instance;
+
+ /* Copy debug mode from owner */
+ if (p->mp_owner)
+ p->mn_debug_mode = p->mp_owner->m_debug_mode;
+
+ else
+ p->mn_debug_mode = 0;
+
+ p->mn_mod_def_id = p_init->def_id;
+ p->mn_major_version = p_init->major_version;
+ p->mn_minor_version = p_init->minor_version;
+ p->mn_bus = p_init->bus_id;
+ p->mn_addr_base = p_init->addr_base;
+
+ p->mn_registers = p_init->nb_registers;
+
+ if (p->mn_registers) {
+ p->mpa_registers = malloc(p->mn_registers * sizeof(nthw_register_t *));
+
+ if (p->mpa_registers) {
+ memset(p->mpa_registers, 0, (p->mn_registers * sizeof(nthw_register_t *)));
+
+ for (i = 0; i < p->mn_registers; i++) {
+ nthw_register_t *p_reg = nthw_register_new();
+
+ nthw_register_init(p_reg, p, &p_init->registers[i]);
+ p->mpa_registers[i] = p_reg;
+ }
+ }
+ }
+}
/*
* FpgaMgr
@@ -204,47 +389,6 @@ void nthw_fpga_mgr_init(nthw_fpga_mgr_t *p, struct nthw_fpga_prod_init **pa_nthw
p->mn_fpgas = (int)i;
}
-static nthw_fpga_t *nthw_fpga_mgr_lookup_fpga(nthw_fpga_mgr_t *p, uint64_t n_fpga_id,
- struct fpga_info_s *p_fpga_info)
-{
- const int n_fpga_prod_id = nthw_fpga_extract_prod_id(n_fpga_id);
- const int n_fpga_ver = nthw_fpga_extract_ver_id(n_fpga_id);
- const int n_fpga_rev = nthw_fpga_extract_rev_id(n_fpga_id);
- int i;
-
- for (i = 0; i < p->mn_fpgas; i++) {
- nthw_fpga_prod_init_s *p_init = p->mpa_fpga_prod_init[i];
-
- if (p_init->fpga_product_id == n_fpga_prod_id &&
- p_init->fpga_version == n_fpga_ver && p_init->fpga_revision == n_fpga_rev) {
- nthw_fpga_t *p_fpga = nthw_fpga_model_new();
- nthw_fpga_model_init(p_fpga, p_init, p_fpga_info);
- return p_fpga;
- }
- }
-
- return NULL;
-}
-
-nthw_fpga_t *nthw_fpga_mgr_query_fpga(nthw_fpga_mgr_t *p_fpga_mgr, uint64_t n_fpga_id,
- struct fpga_info_s *p_fpga_info)
-{
- const int n_fpga_prod_id = nthw_fpga_extract_prod_id(n_fpga_id);
- const int n_fpga_ver = nthw_fpga_extract_ver_id(n_fpga_id);
- const int n_fpga_rev = nthw_fpga_extract_rev_id(n_fpga_id);
-
- nthw_fpga_t *p_fpga = nthw_fpga_mgr_lookup_fpga(p_fpga_mgr, n_fpga_id, p_fpga_info);
-
- if (p_fpga) {
- } else {
- NT_LOG(ERR, NTHW, "FPGA Id 0x%" PRIX64 ": %04d: %d.%d: no match found",
- n_fpga_id, n_fpga_prod_id, n_fpga_ver, n_fpga_rev);
- }
-
- return p_fpga;
-}
-
-
void nthw_fpga_mgr_log_dump(nthw_fpga_mgr_t *p)
{
int i;
@@ -272,7 +416,7 @@ nthw_fpga_t *nthw_fpga_model_new(void)
return p;
}
-void nthw_fpga_model_init(nthw_fpga_t *p, nthw_fpga_prod_init_s *p_init,
+static void nthw_fpga_model_init(nthw_fpga_t *p, nthw_fpga_prod_init_s *p_init,
struct fpga_info_s *p_fpga_info)
{
int i;
@@ -323,7 +467,7 @@ void nthw_fpga_model_init(nthw_fpga_t *p, nthw_fpga_prod_init_s *p_init,
}
}
-void nthw_fpga_set_debug_mode(nthw_fpga_t *p, int debug_mode)
+static void nthw_fpga_set_debug_mode(nthw_fpga_t *p, int debug_mode)
{
int i;
@@ -376,76 +520,6 @@ int nthw_fpga_get_product_id(const nthw_fpga_t *p)
return p->mn_product_id;
}
-/*
- * Param
- */
-nthw_param_t *nthw_param_new(void)
-{
- nthw_param_t *p = malloc(sizeof(nthw_param_t));
-
- return p;
-}
-
-void nthw_param_init(nthw_param_t *p, nthw_fpga_t *p_fpga, nthw_fpga_prod_param_s *p_init)
-{
- p->mp_owner = p_fpga;
- p->mp_init = p_init;
-
- p->mn_param_id = p_init->id;
- p->mn_param_value = p_init->value;
-}
-
-/*
- * Module
- */
-nthw_module_t *nthw_module_new(void)
-{
- nthw_module_t *p = malloc(sizeof(nthw_module_t));
-
- return p;
-}
-
-void nthw_module_init(nthw_module_t *p, nthw_fpga_t *p_fpga, nthw_fpga_module_init_s *p_init)
-{
- int i;
-
- p->mp_owner = p_fpga;
- p->mp_init = p_init;
-
- p->mn_mod_id = p_init->id;
- p->mn_instance = p_init->instance;
-
- /* Copy debug mode from owner */
- if (p->mp_owner)
- p->mn_debug_mode = p->mp_owner->m_debug_mode;
-
- else
- p->mn_debug_mode = 0;
-
- p->mn_mod_def_id = p_init->def_id;
- p->mn_major_version = p_init->major_version;
- p->mn_minor_version = p_init->minor_version;
- p->mn_bus = p_init->bus_id;
- p->mn_addr_base = p_init->addr_base;
-
- p->mn_registers = p_init->nb_registers;
-
- if (p->mn_registers) {
- p->mpa_registers = malloc(p->mn_registers * sizeof(nthw_register_t *));
-
- if (p->mpa_registers) {
- memset(p->mpa_registers, 0, (p->mn_registers * sizeof(nthw_register_t *)));
-
- for (i = 0; i < p->mn_registers; i++) {
- nthw_register_t *p_reg = nthw_register_new();
-
- nthw_register_init(p_reg, p, &p_init->registers[i]);
- p->mpa_registers[i] = p_reg;
- }
- }
- }
-}
-
int nthw_module_get_major_version(const nthw_module_t *p)
{
return p->mn_major_version;
@@ -528,71 +602,17 @@ void nthw_module_set_debug_mode(nthw_module_t *p, unsigned int debug_mode)
}
}
-int nthw_module_get_bus(const nthw_module_t *p)
+static int nthw_module_get_bus(const nthw_module_t *p)
{
return p->mn_bus;
}
-/*
- * Register
- */
-nthw_register_t *nthw_register_new(void)
-{
- nthw_register_t *p = malloc(sizeof(nthw_register_t));
-
- return p;
-}
-
-void nthw_register_init(nthw_register_t *p, nthw_module_t *p_module,
- nthw_fpga_register_init_s *p_init)
-{
- int i;
-
- p->mp_owner = p_module;
-
- p->mn_id = p_init->id;
- p->mn_bit_width = p_init->bw;
- p->mn_addr_rel = p_init->addr_rel;
- p->mn_addr = p_module->mn_addr_base + p_init->addr_rel;
- p->mn_type = p_init->type;
- /* Old P200 registers have no bw at register level - default to BW=-1 */
- p->mn_len = ((p_init->bw != (uint16_t)-1) ? ((p_init->bw + 31) >> 5) : 1);
- p->mn_debug_mode = p_module->mn_debug_mode;
-
- p->mn_fields = p_init->nb_fields;
-
- if (p->mn_fields) {
- p->mpa_fields = malloc(p->mn_fields * sizeof(nthw_field_t *));
-
- if (p->mpa_fields) {
- memset(p->mpa_fields, 0, (p->mn_fields * sizeof(nthw_field_t *)));
-
- for (i = 0; i < p->mn_fields; i++) {
- nthw_field_t *p_field = nthw_field_new();
-
- nthw_field_init(p_field, p, &p_init->fields[i]);
- p->mpa_fields[i] = p_field;
- }
-
- p->mp_shadow = malloc(p->mn_len * sizeof(uint32_t));
-
- if (p->mp_shadow)
- memset(p->mp_shadow, 0x00, (p->mn_len * sizeof(uint32_t)));
-
- p->mp_dirty = malloc(p->mn_len * sizeof(bool));
-
- if (p->mp_dirty)
- memset(p->mp_dirty, 0x00, (p->mn_len * sizeof(bool)));
- }
- }
-}
-
uint32_t nthw_register_get_address(const nthw_register_t *p)
{
return p->mn_addr;
}
-void nthw_register_reset(const nthw_register_t *p)
+static void nthw_register_reset(const nthw_register_t *p)
{
int i;
nthw_field_t *p_field = NULL;
@@ -647,12 +667,12 @@ nthw_field_t *nthw_register_get_field(const nthw_register_t *p, nthw_id_t id)
return p_field;
}
-int nthw_register_get_bit_width(const nthw_register_t *p)
+static int nthw_register_get_bit_width(const nthw_register_t *p)
{
return p->mn_bit_width;
}
-int nthw_register_get_debug_mode(const nthw_register_t *p)
+static int nthw_register_get_debug_mode(const nthw_register_t *p)
{
return p->mn_debug_mode;
}
@@ -660,6 +680,11 @@ int nthw_register_get_debug_mode(const nthw_register_t *p)
/*
* NOTE: do not set debug on fields - as register operation dumps typically are enough
*/
+static void nthw_field_set_debug_mode(nthw_field_t *p, unsigned int debug_mode)
+{
+ p->mn_debug_mode = debug_mode;
+}
+
void nthw_register_set_debug_mode(nthw_register_t *p, unsigned int debug_mode)
{
int i;
@@ -725,7 +750,7 @@ static int nthw_register_write_data(const nthw_register_t *p, uint32_t cnt)
return rc;
}
-void nthw_register_get_val(const nthw_register_t *p, uint32_t *p_data, uint32_t len)
+static void nthw_register_get_val(const nthw_register_t *p, uint32_t *p_data, uint32_t len)
{
uint32_t i;
@@ -739,7 +764,7 @@ void nthw_register_get_val(const nthw_register_t *p, uint32_t *p_data, uint32_t
p_data[i] = p->mp_shadow[i];
}
-uint32_t nthw_register_get_val32(const nthw_register_t *p)
+static uint32_t nthw_register_get_val32(const nthw_register_t *p)
{
uint32_t val = 0;
@@ -781,7 +806,7 @@ void nthw_register_update(const nthw_register_t *p)
}
}
-uint32_t nthw_register_get_val_updated32(const nthw_register_t *p)
+static uint32_t nthw_register_get_val_updated32(const nthw_register_t *p)
{
uint32_t val = 0;
@@ -852,7 +877,7 @@ void nthw_register_flush(const nthw_register_t *p, uint32_t cnt)
}
}
-void nthw_register_clr(nthw_register_t *p)
+static void nthw_register_clr(nthw_register_t *p)
{
if (p->mp_shadow) {
memset(p->mp_shadow, 0, p->mn_len * sizeof(uint32_t));
@@ -860,72 +885,11 @@ void nthw_register_clr(nthw_register_t *p)
}
}
-/*
- * Field
- */
-nthw_field_t *nthw_field_new(void)
-{
- nthw_field_t *p = malloc(sizeof(nthw_field_t));
-
- return p;
-}
-
-void nthw_field_init(nthw_field_t *p, nthw_register_t *p_reg, const nthw_fpga_field_init_s *p_init)
-{
- p->mp_owner = p_reg;
-
- p->mn_debug_mode = p_reg->mn_debug_mode;
-
- p->mn_id = p_init->id;
- p->mn_bit_width = p_init->bw;
- p->mn_bit_pos_low = p_init->low;
- p->mn_reset_val = (uint32_t)p_init->reset_val;
- p->mn_first_word = p_init->low / 32;
- p->mn_first_bit = p_init->low % 32;
- p->mn_front_mask = 0;
- p->mn_body_length = 0;
- p->mn_words = (p_init->bw + 0x1f) / 0x20;
- p->mn_tail_mask = 0;
-
- {
- int bits_remaining = p_init->bw;
- int front_mask_length = 32 - p->mn_first_bit;
-
- if (front_mask_length > bits_remaining)
- front_mask_length = bits_remaining;
-
- bits_remaining -= front_mask_length;
-
- p->mn_front_mask =
- (uint32_t)(((1ULL << front_mask_length) - 1) << p->mn_first_bit);
-
- p->mn_body_length = bits_remaining / 32;
- bits_remaining -= p->mn_body_length * 32;
- p->mn_tail_mask = (1 << bits_remaining) - 1;
-
- if (p->mn_debug_mode >= 0x100) {
- NT_LOG_DBGX(DBG, NTHW,
- "fldid=%08" PRIu32 ": [%08" PRIu16 ":%08" PRIu16 "] %08" PRIu16 "/%08"
- PRIu16 ": (%08i ,%08" PRIu32 ") (0x%08" PRIx32 ",%08"
- PRIu32 ",0x%08" PRIx32 ")",
- p_init->id, p_init->low, (p_init->low + p_init->bw),
- p_init->bw, ((p_init->bw + 31) / 32), p->mn_first_word,
- p->mn_first_bit, p->mn_front_mask, p->mn_body_length,
- p->mn_tail_mask);
- }
- }
-}
-
-int nthw_field_get_debug_mode(const nthw_field_t *p)
+static int nthw_field_get_debug_mode(const nthw_field_t *p)
{
return p->mn_debug_mode;
}
-void nthw_field_set_debug_mode(nthw_field_t *p, unsigned int debug_mode)
-{
- p->mn_debug_mode = debug_mode;
-}
-
int nthw_field_get_bit_width(const nthw_field_t *p)
{
return p->mn_bit_width;
@@ -936,7 +900,7 @@ int nthw_field_get_bit_pos_low(const nthw_field_t *p)
return p->mn_bit_pos_low;
}
-int nthw_field_get_bit_pos_high(const nthw_field_t *p)
+static int nthw_field_get_bit_pos_high(const nthw_field_t *p)
{
return p->mn_bit_pos_low + p->mn_bit_width - 1;
}
@@ -946,11 +910,6 @@ uint32_t nthw_field_get_mask(const nthw_field_t *p)
return p->mn_front_mask;
}
-void nthw_field_reset(const nthw_field_t *p)
-{
- nthw_field_set_val32(p, (uint32_t)p->mn_reset_val);
-}
-
void nthw_field_get_val(const nthw_field_t *p, uint32_t *p_data, uint32_t len)
{
uint32_t i;
@@ -1210,3 +1169,43 @@ int nthw_field_wait_set_any32(const nthw_field_t *p, int n_poll_iterations, int
return nthw_field_wait_cond32(p, NTHW_FIELD_MATCH_SET_ANY, n_poll_iterations,
n_poll_interval);
}
+
+static nthw_fpga_t *nthw_fpga_mgr_lookup_fpga(nthw_fpga_mgr_t *p, uint64_t n_fpga_id,
+ struct fpga_info_s *p_fpga_info)
+{
+ const int n_fpga_prod_id = nthw_fpga_extract_prod_id(n_fpga_id);
+ const int n_fpga_ver = nthw_fpga_extract_ver_id(n_fpga_id);
+ const int n_fpga_rev = nthw_fpga_extract_rev_id(n_fpga_id);
+ int i;
+
+ for (i = 0; i < p->mn_fpgas; i++) {
+ nthw_fpga_prod_init_s *p_init = p->mpa_fpga_prod_init[i];
+
+ if (p_init->fpga_product_id == n_fpga_prod_id &&
+ p_init->fpga_version == n_fpga_ver && p_init->fpga_revision == n_fpga_rev) {
+ nthw_fpga_t *p_fpga = nthw_fpga_model_new();
+ nthw_fpga_model_init(p_fpga, p_init, p_fpga_info);
+ return p_fpga;
+ }
+ }
+
+ return NULL;
+}
+
+nthw_fpga_t *nthw_fpga_mgr_query_fpga(nthw_fpga_mgr_t *p_fpga_mgr, uint64_t n_fpga_id,
+ struct fpga_info_s *p_fpga_info)
+{
+ const int n_fpga_prod_id = nthw_fpga_extract_prod_id(n_fpga_id);
+ const int n_fpga_ver = nthw_fpga_extract_ver_id(n_fpga_id);
+ const int n_fpga_rev = nthw_fpga_extract_rev_id(n_fpga_id);
+
+ nthw_fpga_t *p_fpga = nthw_fpga_mgr_lookup_fpga(p_fpga_mgr, n_fpga_id, p_fpga_info);
+
+ if (p_fpga) {
+ } else {
+ NT_LOG(ERR, NTHW, "FPGA Id 0x%" PRIX64 ": %04d: %d.%d: no match found",
+ n_fpga_id, n_fpga_prod_id, n_fpga_ver, n_fpga_rev);
+ }
+
+ return p_fpga;
+}
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.h b/drivers/net/ntnic/nthw/model/nthw_fpga_model.h
index d4e7ab3edd..459c9f081d 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.h
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.h
@@ -159,21 +159,13 @@ nthw_fpga_t *nthw_fpga_mgr_query_fpga(nthw_fpga_mgr_t *p, uint64_t n_fpga_id,
void nthw_fpga_mgr_log_dump(nthw_fpga_mgr_t *p);
nthw_fpga_t *nthw_fpga_model_new(void);
-void nthw_fpga_model_init(nthw_fpga_t *p, nthw_fpga_prod_init_s *p_init,
- struct fpga_info_s *p_fpga_info);
-
int nthw_fpga_get_product_param(const nthw_fpga_t *p, const nthw_id_t n_param_id,
const int default_value);
int nthw_fpga_get_product_id(const nthw_fpga_t *p);
nthw_module_t *nthw_fpga_query_module(const nthw_fpga_t *p, nthw_id_t id, int instance);
-void nthw_fpga_set_debug_mode(nthw_fpga_t *p, int n_debug_mode);
-
nthw_param_t *nthw_param_new(void);
-void nthw_param_init(nthw_param_t *p, nthw_fpga_t *p_fpga, nthw_fpga_prod_param_s *p_init);
-
nthw_module_t *nthw_module_new(void);
-void nthw_module_init(nthw_module_t *p, nthw_fpga_t *p_fpga, nthw_fpga_module_init_s *p_init);
void nthw_module_init2(nthw_module_t *p, nthw_fpga_t *p_fpga, nthw_id_t mod_id, int instance,
int debug_mode);
@@ -182,47 +174,27 @@ int nthw_module_get_minor_version(const nthw_module_t *p);
uint64_t nthw_module_get_version_packed64(const nthw_module_t *p);
bool nthw_module_is_version_newer(const nthw_module_t *p, int major_version, int minor_version);
-int nthw_module_get_bus(const nthw_module_t *p);
nthw_register_t *nthw_module_query_register(nthw_module_t *p, nthw_id_t id);
nthw_register_t *nthw_module_get_register(nthw_module_t *p, nthw_id_t id);
int nthw_module_get_debug_mode(const nthw_module_t *p);
void nthw_module_set_debug_mode(nthw_module_t *p, unsigned int debug_mode);
nthw_register_t *nthw_register_new(void);
-void nthw_register_init(nthw_register_t *p, nthw_module_t *p_module,
- nthw_fpga_register_init_s *p_init);
-
nthw_field_t *nthw_register_query_field(const nthw_register_t *p, nthw_id_t id);
nthw_field_t *nthw_register_get_field(const nthw_register_t *p, nthw_id_t id);
uint32_t nthw_register_get_address(const nthw_register_t *p);
-int nthw_register_get_bit_width(const nthw_register_t *p);
-int nthw_register_get_debug_mode(const nthw_register_t *p);
void nthw_register_set_debug_mode(nthw_register_t *p, unsigned int debug_mode);
-void nthw_register_get_val(const nthw_register_t *p, uint32_t *p_data, uint32_t len);
-uint32_t nthw_register_get_val32(const nthw_register_t *p);
-uint32_t nthw_register_get_val_updated32(const nthw_register_t *p);
-
void nthw_register_set_val(nthw_register_t *p, const uint32_t *p_data, uint32_t len);
void nthw_register_make_dirty(nthw_register_t *p);
void nthw_register_update(const nthw_register_t *p);
-void nthw_register_reset(const nthw_register_t *p);
void nthw_register_flush(const nthw_register_t *p, uint32_t cnt);
-void nthw_register_clr(nthw_register_t *p);
-
nthw_field_t *nthw_field_new(void);
-void nthw_field_init(nthw_field_t *p, nthw_register_t *p_reg,
- const nthw_fpga_field_init_s *p_init);
-
-int nthw_field_get_debug_mode(const nthw_field_t *p);
-void nthw_field_set_debug_mode(nthw_field_t *p, unsigned int n_debug_mode);
int nthw_field_get_bit_width(const nthw_field_t *p);
int nthw_field_get_bit_pos_low(const nthw_field_t *p);
-int nthw_field_get_bit_pos_high(const nthw_field_t *p);
uint32_t nthw_field_get_mask(const nthw_field_t *p);
-void nthw_field_reset(const nthw_field_t *p);
void nthw_field_get_val(const nthw_field_t *p, uint32_t *p_data, uint32_t len);
void nthw_field_set_val(const nthw_field_t *p, const uint32_t *p_data, uint32_t len);
void nthw_field_set_val_flush(const nthw_field_t *p, const uint32_t *p_data, uint32_t len);
diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index c6c448312f..f498551e8d 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -31,7 +31,8 @@ static struct rte_flow nt_flows[MAX_RTE_FLOWS];
rte_spinlock_t flow_lock = RTE_SPINLOCK_INITIALIZER;
static struct rte_flow nt_flows[MAX_RTE_FLOWS];
-int nthw_interpret_raw_data(uint8_t *data, uint8_t *preserve, int size, struct rte_flow_item *out)
+static int nthw_interpret_raw_data(uint8_t *data, uint8_t *preserve, int size,
+ struct rte_flow_item *out)
{
int hdri = 0;
int pkti = 0;
@@ -249,7 +250,7 @@ int nthw_interpret_raw_data(uint8_t *data, uint8_t *preserve, int size, struct r
return hdri + 1;
}
-int nthw_create_attr(struct cnv_attr_s *attribute, const struct rte_flow_attr *attr)
+static int nthw_create_attr(struct cnv_attr_s *attribute, const struct rte_flow_attr *attr)
{
if (!attribute) {
NT_LOG(ERR, FILTER, "ERROR no attribute to iterate!");
@@ -266,7 +267,7 @@ int nthw_create_attr(struct cnv_attr_s *attribute, const struct rte_flow_attr *a
return 0;
}
-int nthw_create_match_elements(struct cnv_match_s *match, const struct rte_flow_item items[],
+static int nthw_create_match_elements(struct cnv_match_s *match, const struct rte_flow_item items[],
int max_elem)
{
int eidx = 0;
@@ -316,7 +317,7 @@ int nthw_create_match_elements(struct cnv_match_s *match, const struct rte_flow_
return (type >= 0) ? 0 : -1;
}
-int nthw_create_action_elements_inline(struct cnv_action_s *action,
+static int nthw_create_action_elements_inline(struct cnv_action_s *action,
const struct rte_flow_action actions[],
int max_elem,
uint32_t queue_offset)
diff --git a/drivers/net/ntnic/ntnic_vfio.c b/drivers/net/ntnic/ntnic_vfio.c
index 1031b3cf67..b1e807d6fa 100644
--- a/drivers/net/ntnic/ntnic_vfio.c
+++ b/drivers/net/ntnic/ntnic_vfio.c
@@ -20,7 +20,7 @@
#define ONE_G_MASK (ONE_G_SIZE - 1)
#define START_VF_IOVA 0x220000000000
-int
+static int
nt_vfio_vf_num(const struct rte_pci_device *pdev)
{
return ((pdev->addr.devid & 0x1f) << 3) + ((pdev->addr.function) & 0x7);
diff --git a/drivers/net/ntnic/ntnic_vfio.h b/drivers/net/ntnic/ntnic_vfio.h
index 69fef7923d..e070e9460c 100644
--- a/drivers/net/ntnic/ntnic_vfio.h
+++ b/drivers/net/ntnic/ntnic_vfio.h
@@ -24,6 +24,4 @@ int
nt_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size);
/* Find device (PF/VF) number from device address */
-int
-nt_vfio_vf_num(const struct rte_pci_device *dev);
#endif /* _NTNIC_VFIO_H_ */
diff --git a/drivers/net/ntnic/ntutil/nt_util.c b/drivers/net/ntnic/ntutil/nt_util.c
index a4d30d8ca4..c4a49d8358 100644
--- a/drivers/net/ntnic/ntutil/nt_util.c
+++ b/drivers/net/ntnic/ntutil/nt_util.c
@@ -85,7 +85,7 @@ struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
return vfio_addr;
}
-void nt_dma_free(struct nt_dma_s *vfio_addr)
+static void nt_dma_free(struct nt_dma_s *vfio_addr)
{
NT_LOG(DBG, GENERAL, "VFIO DMA free addr=%" PRIX64 ", iova=%" PRIX64 ", size=%" PRIX64,
vfio_addr->addr, vfio_addr->iova, vfio_addr->size);
@@ -181,7 +181,7 @@ uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa)
}
/* Converts link speed provided in Mbps to NT specific definitions.*/
-nt_link_speed_t nthw_convert_link_speed(int link_speed_mbps)
+static nt_link_speed_t nthw_convert_link_speed(int link_speed_mbps)
{
switch (link_speed_mbps) {
case 10:
diff --git a/drivers/net/ntnic/ntutil/nt_util.h b/drivers/net/ntnic/ntutil/nt_util.h
index 5be84be9c3..39a4956187 100644
--- a/drivers/net/ntnic/ntutil/nt_util.h
+++ b/drivers/net/ntnic/ntutil/nt_util.h
@@ -55,8 +55,6 @@ struct port_link_speed {
};
struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa);
-void nt_dma_free(struct nt_dma_s *vfio_addr);
-
struct nt_util_vfio_impl {
int (*vfio_dma_map)(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size);
int (*vfio_dma_unmap)(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size);
@@ -66,7 +64,6 @@ void nt_util_vfio_init(struct nt_util_vfio_impl *impl);
int nt_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed);
uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa);
-nt_link_speed_t nthw_convert_link_speed(int link_speed_mbps);
int nt_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex);
int nthw_string_to_u32(const char *key_str __rte_unused, const char *value_str, void *extra_args);
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 02/16] net/ntnic: remove unused functions
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 03/16] net/ntnic: move nthw_ to prefix Serhii Iliushyk
` (13 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Remove unused functions from various files in the ntnic PMD.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/nthw/core/nthw_hif.c | 90 -------------------
drivers/net/ntnic/nthw/core/nthw_mac_pcs.c | 11 ---
drivers/net/ntnic/nthw/core/nthw_pcie3.c | 87 ------------------
.../net/ntnic/nthw/core/nthw_pcm_nt400dxx.c | 5 --
drivers/net/ntnic/nthw/core/nthw_rpf.c | 14 ---
.../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c | 6 --
.../net/ntnic/nthw/model/nthw_fpga_model.c | 86 ------------------
drivers/net/ntnic/ntutil/nt_util.c | 51 -----------
8 files changed, 350 deletions(-)
diff --git a/drivers/net/ntnic/nthw/core/nthw_hif.c b/drivers/net/ntnic/nthw/core/nthw_hif.c
index 2899c3706b..015dee1bcf 100644
--- a/drivers/net/ntnic/nthw/core/nthw_hif.c
+++ b/drivers/net/ntnic/nthw/core/nthw_hif.c
@@ -217,96 +217,6 @@ int nthw_hif_trigger_sample_time(nthw_hif_t *p)
return 0;
}
-static int nthw_hif_get_stat(nthw_hif_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
- uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
- uint64_t *p_tags_in_use, uint64_t *p_rd_err, uint64_t *p_wr_err)
-{
- *p_rx_cnt = nthw_field_get_updated(p->mp_fld_stat_rx_counter);
- *p_tx_cnt = nthw_field_get_updated(p->mp_fld_stat_tx_counter);
-
- *p_ref_clk_cnt = nthw_field_get_updated(p->mp_fld_stat_ref_clk_ref_clk);
-
- *p_tg_unit_size = NTHW_TG_CNT_SIZE;
- *p_tg_ref_freq = p->mn_fpga_hif_ref_clk_freq;
-
- *p_tags_in_use = (p->mp_fld_status_tags_in_use
- ? nthw_field_get_updated(p->mp_fld_status_tags_in_use)
- : 0);
-
- *p_rd_err =
- (p->mp_fld_status_rd_err ? nthw_field_get_updated(p->mp_fld_status_rd_err) : 0);
- *p_wr_err =
- (p->mp_fld_status_wr_err ? nthw_field_get_updated(p->mp_fld_status_wr_err) : 0);
-
- return 0;
-}
-
-static int nthw_hif_get_stat_rate(nthw_hif_t *p, uint64_t *p_pci_rx_rate, uint64_t *p_pci_tx_rate,
- uint64_t *p_ref_clk_cnt, uint64_t *p_tags_in_use,
- uint64_t *p_rd_err_cnt, uint64_t *p_wr_err_cnt)
-{
- uint32_t rx_cnt, tx_cnt, ref_clk_cnt, tg_unit_size, tg_ref_freq;
- uint64_t n_tags_in_use, n_rd_err, n_wr_err;
-
- nthw_hif_get_stat(p, &rx_cnt, &tx_cnt, &ref_clk_cnt, &tg_unit_size, &tg_ref_freq,
- &n_tags_in_use, &n_rd_err, &n_wr_err);
-
- *p_tags_in_use = n_tags_in_use;
-
- if (n_rd_err)
- (*p_rd_err_cnt)++;
-
- if (n_wr_err)
- (*p_wr_err_cnt)++;
-
- if (ref_clk_cnt) {
- uint64_t rx_rate;
- uint64_t tx_rate;
-
- *p_ref_clk_cnt = ref_clk_cnt;
-
- rx_rate = ((uint64_t)rx_cnt * tg_unit_size * tg_ref_freq) / (uint64_t)ref_clk_cnt;
- *p_pci_rx_rate = rx_rate;
-
- tx_rate = ((uint64_t)tx_cnt * tg_unit_size * tg_ref_freq) / (uint64_t)ref_clk_cnt;
- *p_pci_tx_rate = tx_rate;
-
- } else {
- *p_pci_rx_rate = 0;
- *p_pci_tx_rate = 0;
- *p_ref_clk_cnt = 0;
- }
-
- return 0;
-}
-
-static int nthw_hif_stat_req_enable(nthw_hif_t *p)
-{
- nthw_field_set_all(p->mp_fld_stat_ctrl_ena);
- nthw_field_set_all(p->mp_fld_stat_ctrl_req);
- nthw_field_flush_register(p->mp_fld_stat_ctrl_req);
- return 0;
-}
-
-static int nthw_hif_stat_req_disable(nthw_hif_t *p)
-{
- nthw_field_clr_all(p->mp_fld_stat_ctrl_ena);
- nthw_field_set_all(p->mp_fld_stat_ctrl_req);
- nthw_field_flush_register(p->mp_fld_stat_ctrl_req);
- return 0;
-}
-
-static int nthw_hif_end_point_cntrs_sample(nthw_hif_t *p, struct nthw_hif_end_point_counters *epc)
-{
- RTE_ASSERT(epc);
-
- /* Get stat rate and maintain rx/tx min/max */
- nthw_hif_get_stat_rate(p, &epc->cur_tx, &epc->cur_rx, &epc->n_ref_clk_cnt,
- &epc->n_tags_in_use, &epc->n_rd_err, &epc->n_wr_err);
-
- return 0;
-}
-
int nthw_hif_read_test_reg(nthw_hif_t *p, uint8_t test_reg, uint32_t *p_value)
{
uint32_t data;
diff --git a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
index a8d66268ff..4a7b7b9549 100644
--- a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
+++ b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
@@ -429,17 +429,6 @@ void nthw_mac_pcs_set_tx_sel_host(nthw_mac_pcs_t *p, bool enable)
nthw_field_clr_flush(p->mp_fld_phymac_misc_tx_sel_host);
}
-static void nthw_mac_pcs_set_tx_sel_tfg(nthw_mac_pcs_t *p, bool enable)
-{
- nthw_field_get_updated(p->mp_fld_phymac_misc_tx_sel_tfg);
-
- if (enable)
- nthw_field_set_flush(p->mp_fld_phymac_misc_tx_sel_tfg);
-
- else
- nthw_field_clr_flush(p->mp_fld_phymac_misc_tx_sel_tfg);
-}
-
void nthw_mac_pcs_set_ts_eop(nthw_mac_pcs_t *p, bool enable)
{
if (p->mp_fld_phymac_misc_ts_eop) {
diff --git a/drivers/net/ntnic/nthw/core/nthw_pcie3.c b/drivers/net/ntnic/nthw/core/nthw_pcie3.c
index 2953896759..763bf9e554 100644
--- a/drivers/net/ntnic/nthw/core/nthw_pcie3.c
+++ b/drivers/net/ntnic/nthw/core/nthw_pcie3.c
@@ -168,90 +168,3 @@ int nthw_pcie3_trigger_sample_time(nthw_pcie3_t *p)
return 0;
}
-
-static int nthw_pcie3_stat_req_enable(nthw_pcie3_t *p)
-{
- nthw_field_set_all(p->mp_fld_stat_ctrl_ena);
- nthw_field_set_all(p->mp_fld_stat_ctrl_req);
- nthw_field_flush_register(p->mp_fld_stat_ctrl_req);
- return 0;
-}
-
-static int nthw_pcie3_stat_req_disable(nthw_pcie3_t *p)
-{
- nthw_field_clr_all(p->mp_fld_stat_ctrl_ena);
- nthw_field_set_all(p->mp_fld_stat_ctrl_req);
- nthw_field_flush_register(p->mp_fld_stat_ctrl_req);
- return 0;
-}
-
-static int nthw_pcie3_get_stat(nthw_pcie3_t *p, uint32_t *p_rx_cnt, uint32_t *p_tx_cnt,
- uint32_t *p_ref_clk_cnt, uint32_t *p_tg_unit_size, uint32_t *p_tg_ref_freq,
- uint32_t *p_tag_use_cnt, uint32_t *p_rq_rdy_cnt, uint32_t *p_rq_vld_cnt)
-{
- *p_rx_cnt = nthw_field_get_updated(p->mp_fld_stat_rx_counter);
- *p_tx_cnt = nthw_field_get_updated(p->mp_fld_stat_tx_counter);
-
- *p_ref_clk_cnt = nthw_field_get_updated(p->mp_fld_stat_ref_clk_ref_clk);
-
- *p_tg_unit_size = NTHW_TG_CNT_SIZE;
- *p_tg_ref_freq = NTHW_TG_REF_FREQ;
-
- *p_tag_use_cnt = nthw_field_get_updated(p->mp_fld_status0_tags_in_use);
-
- *p_rq_rdy_cnt = nthw_field_get_updated(p->mp_fld_stat_rq_rdy_counter);
- *p_rq_vld_cnt = nthw_field_get_updated(p->mp_fld_stat_rq_vld_counter);
-
- return 0;
-}
-
-static int nthw_pcie3_get_stat_rate(nthw_pcie3_t *p, uint64_t *p_pci_rx_rate,
- uint64_t *p_pci_tx_rate,
- uint64_t *p_ref_clk_cnt, uint64_t *p_tag_use_cnt,
- uint64_t *p_pci_nt_bus_util, uint64_t *p_pci_xil_bus_util)
-{
- uint32_t rx_cnt, tx_cnt, ref_clk_cnt;
- uint32_t tg_unit_size, tg_ref_freq;
- uint32_t tag_use_cnt, rq_rdy_cnt, rq_vld_cnt;
-
- nthw_pcie3_get_stat(p, &rx_cnt, &tx_cnt, &ref_clk_cnt, &tg_unit_size, &tg_ref_freq,
- &tag_use_cnt, &rq_rdy_cnt, &rq_vld_cnt);
-
- if (ref_clk_cnt) {
- uint64_t nt_bus_util, xil_bus_util;
- uint64_t rx_rate, tx_rate;
-
- rx_rate = ((uint64_t)rx_cnt * tg_unit_size * tg_ref_freq) / (uint64_t)ref_clk_cnt;
- *p_pci_rx_rate = rx_rate;
-
- tx_rate = ((uint64_t)tx_cnt * tg_unit_size * tg_ref_freq) / (uint64_t)ref_clk_cnt;
- *p_pci_tx_rate = tx_rate;
-
- *p_ref_clk_cnt = ref_clk_cnt;
-
- *p_tag_use_cnt = tag_use_cnt;
-
- nt_bus_util = ((uint64_t)rq_vld_cnt * 1000000ULL) / (uint64_t)ref_clk_cnt;
- *p_pci_nt_bus_util = nt_bus_util;
- xil_bus_util = ((uint64_t)rq_rdy_cnt * 1000000ULL) / (uint64_t)ref_clk_cnt;
- *p_pci_xil_bus_util = xil_bus_util;
-
- } else {
- *p_ref_clk_cnt = 0;
- *p_pci_nt_bus_util = 0;
- *p_pci_xil_bus_util = 0;
- }
-
- return 0;
-}
-
-static int nthw_pcie3_end_point_counters_sample_post(nthw_pcie3_t *p,
- struct nthw_hif_end_point_counters *epc)
-{
- NT_LOG_DBGX(DBG, NTHW);
- RTE_ASSERT(epc);
- nthw_pcie3_get_stat_rate(p, &epc->cur_tx, &epc->cur_rx, &epc->n_ref_clk_cnt,
- &epc->n_tags_in_use, &epc->cur_pci_nt_util,
- &epc->cur_pci_xil_util);
- return 0;
-}
diff --git a/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c b/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
index 9004ebef06..e98378e154 100644
--- a/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nthw_pcm_nt400dxx.c
@@ -68,11 +68,6 @@ bool nthw_pcm_nt400dxx_get_ts_pll_locked_stat(nthw_pcm_nt400dxx_t *p)
return nthw_field_get_updated(p->mp_fld_stat_ts_pll_locked) != 0;
}
-static bool nthw_pcm_nt400dxx_get_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p)
-{
- return nthw_field_get_updated(p->mp_fld_latch_ts_pll_locked) != 0;
-}
-
void nthw_pcm_nt400dxx_set_ts_pll_locked_latch(nthw_pcm_nt400dxx_t *p, uint32_t val)
{
nthw_field_update_register(p->mp_fld_latch_ts_pll_locked);
diff --git a/drivers/net/ntnic/nthw/core/nthw_rpf.c b/drivers/net/ntnic/nthw/core/nthw_rpf.c
index 6f06601de8..7184aedc04 100644
--- a/drivers/net/ntnic/nthw/core/nthw_rpf.c
+++ b/drivers/net/ntnic/nthw/core/nthw_rpf.c
@@ -20,11 +20,6 @@ nthw_rpf_t *nthw_rpf_new(void)
return p;
}
-static void nthw_rpf_delete(nthw_rpf_t *p)
-{
- free(p);
-}
-
int nthw_rpf_init(nthw_rpf_t *p, nthw_fpga_t *p_fpga, int n_instance)
{
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_RPF, n_instance);
@@ -67,15 +62,6 @@ int nthw_rpf_init(nthw_rpf_t *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-static void nthw_rpf_administrative_block(nthw_rpf_t *p)
-{
- /* block all MAC ports */
- nthw_register_update(p->mp_reg_control);
- nthw_field_set_val_flush32(p->mp_fld_control_pen, 0);
-
- p->m_administrative_block = true;
-}
-
void nthw_rpf_block(nthw_rpf_t *p)
{
nthw_register_update(p->mp_reg_control);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
index d55adc6687..1862d77350 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
@@ -402,12 +402,6 @@ static int hw_mod_tpe_ifr_counters_mod(struct flow_api_backend_s *be, enum hw_tp
return 0;
}
-static int hw_mod_tpe_ifr_counters_set(struct flow_api_backend_s *be, enum hw_tpe_e field,
- int index, uint32_t value)
-{
- return hw_mod_tpe_ifr_counters_mod(be, field, index, &value, 0);
-}
-
int hw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value)
{
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index 3655c86f51..0b8958c4c1 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -228,11 +228,6 @@ static void nthw_field_init(nthw_field_t *p, nthw_register_t *p_reg,
}
}
-static void nthw_field_reset(const nthw_field_t *p)
-{
- nthw_field_set_val32(p, (uint32_t)p->mn_reset_val);
-}
-
/*
* Register
*/
@@ -467,20 +462,6 @@ static void nthw_fpga_model_init(nthw_fpga_t *p, nthw_fpga_prod_init_s *p_init,
}
}
-static void nthw_fpga_set_debug_mode(nthw_fpga_t *p, int debug_mode)
-{
- int i;
-
- p->m_debug_mode = debug_mode;
-
- for (i = 0; i < p->mn_modules; i++) {
- nthw_module_t *p_mod = p->mpa_modules[i];
-
- if (p_mod)
- nthw_module_set_debug_mode(p_mod, debug_mode);
- }
-}
-
static nthw_module_t *nthw_fpga_lookup_module(const nthw_fpga_t *p, nthw_id_t id, int instance)
{
int i;
@@ -612,19 +593,6 @@ uint32_t nthw_register_get_address(const nthw_register_t *p)
return p->mn_addr;
}
-static void nthw_register_reset(const nthw_register_t *p)
-{
- int i;
- nthw_field_t *p_field = NULL;
-
- for (i = 0; i < p->mn_fields; i++) {
- p_field = p->mpa_fields[i];
-
- if (p_field)
- nthw_field_reset(p_field);
- }
-}
-
static nthw_field_t *nthw_register_lookup_field(const nthw_register_t *p, nthw_id_t id)
{
int i;
@@ -667,16 +635,6 @@ nthw_field_t *nthw_register_get_field(const nthw_register_t *p, nthw_id_t id)
return p_field;
}
-static int nthw_register_get_bit_width(const nthw_register_t *p)
-{
- return p->mn_bit_width;
-}
-
-static int nthw_register_get_debug_mode(const nthw_register_t *p)
-{
- return p->mn_debug_mode;
-}
-
/*
* NOTE: do not set debug on fields - as register operation dumps typically are enough
*/
@@ -750,28 +708,6 @@ static int nthw_register_write_data(const nthw_register_t *p, uint32_t cnt)
return rc;
}
-static void nthw_register_get_val(const nthw_register_t *p, uint32_t *p_data, uint32_t len)
-{
- uint32_t i;
-
- if (len == (uint32_t)-1 || len > p->mn_len)
- len = p->mn_len;
-
- RTE_ASSERT(len <= p->mn_len);
- RTE_ASSERT(p_data);
-
- for (i = 0; i < len; i++)
- p_data[i] = p->mp_shadow[i];
-}
-
-static uint32_t nthw_register_get_val32(const nthw_register_t *p)
-{
- uint32_t val = 0;
-
- nthw_register_get_val(p, &val, 1);
- return val;
-}
-
void nthw_register_update(const nthw_register_t *p)
{
if (p && p->mn_type != NTHW_FPGA_REG_TYPE_WO) {
@@ -806,15 +742,6 @@ void nthw_register_update(const nthw_register_t *p)
}
}
-static uint32_t nthw_register_get_val_updated32(const nthw_register_t *p)
-{
- uint32_t val = 0;
-
- nthw_register_update(p);
- nthw_register_get_val(p, &val, 1);
- return val;
-}
-
void nthw_register_make_dirty(nthw_register_t *p)
{
uint32_t i;
@@ -877,19 +804,6 @@ void nthw_register_flush(const nthw_register_t *p, uint32_t cnt)
}
}
-static void nthw_register_clr(nthw_register_t *p)
-{
- if (p->mp_shadow) {
- memset(p->mp_shadow, 0, p->mn_len * sizeof(uint32_t));
- nthw_register_make_dirty(p);
- }
-}
-
-static int nthw_field_get_debug_mode(const nthw_field_t *p)
-{
- return p->mn_debug_mode;
-}
-
int nthw_field_get_bit_width(const nthw_field_t *p)
{
return p->mn_bit_width;
diff --git a/drivers/net/ntnic/ntutil/nt_util.c b/drivers/net/ntnic/ntutil/nt_util.c
index c4a49d8358..18133570bb 100644
--- a/drivers/net/ntnic/ntutil/nt_util.c
+++ b/drivers/net/ntnic/ntutil/nt_util.c
@@ -85,24 +85,6 @@ struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
return vfio_addr;
}
-static void nt_dma_free(struct nt_dma_s *vfio_addr)
-{
- NT_LOG(DBG, GENERAL, "VFIO DMA free addr=%" PRIX64 ", iova=%" PRIX64 ", size=%" PRIX64,
- vfio_addr->addr, vfio_addr->iova, vfio_addr->size);
-
- int res = vfio_cb.vfio_dma_unmap(0, (void *)vfio_addr->addr, vfio_addr->iova,
- vfio_addr->size);
-
- if (res != 0) {
- NT_LOG(WRN, GENERAL,
- "VFIO DMA free FAILED addr=%" PRIX64 ", iova=%" PRIX64 ", size=%" PRIX64,
- vfio_addr->addr, vfio_addr->iova, vfio_addr->size);
- }
-
- rte_free((void *)(vfio_addr->addr));
- rte_free(vfio_addr);
-}
-
/* NOTE: please note the difference between RTE_ETH_SPEED_NUM_xxx and RTE_ETH_LINK_SPEED_xxx */
int nt_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed)
{
@@ -180,39 +162,6 @@ uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa)
return eth_speed_capa;
}
-/* Converts link speed provided in Mbps to NT specific definitions.*/
-static nt_link_speed_t nthw_convert_link_speed(int link_speed_mbps)
-{
- switch (link_speed_mbps) {
- case 10:
- return NT_LINK_SPEED_10M;
-
- case 100:
- return NT_LINK_SPEED_100M;
-
- case 1000:
- return NT_LINK_SPEED_1G;
-
- case 10000:
- return NT_LINK_SPEED_10G;
-
- case 40000:
- return NT_LINK_SPEED_40G;
-
- case 100000:
- return NT_LINK_SPEED_100G;
-
- case 50000:
- return NT_LINK_SPEED_50G;
-
- case 25000:
- return NT_LINK_SPEED_25G;
-
- default:
- return NT_LINK_SPEED_UNKNOWN;
- }
-}
-
int nt_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex)
{
int eth_link_duplex = 0;
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 03/16] net/ntnic: move nthw_ to prefix
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 04/16] net/ntnic: change prefix hw_ to prefix nthw_ Serhii Iliushyk
` (12 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Move nthw_ from function names to a prefix to specify
NapaTech Hardware-related functions.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/adapter/nt4ga_adapter.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_fpga.c | 2 +-
.../nthw/flow_api/flow_backend/flow_backend.c | 1336 ++++++++---------
.../ntnic/nthw/flow_filter/flow_nthw_cat.c | 230 +--
.../ntnic/nthw/flow_filter/flow_nthw_cat.h | 230 +--
.../ntnic/nthw/flow_filter/flow_nthw_csu.c | 22 +-
.../ntnic/nthw/flow_filter/flow_nthw_csu.h | 24 +-
.../ntnic/nthw/flow_filter/flow_nthw_flm.c | 278 ++--
.../ntnic/nthw/flow_filter/flow_nthw_flm.h | 278 ++--
.../ntnic/nthw/flow_filter/flow_nthw_hfu.c | 58 +-
.../ntnic/nthw/flow_filter/flow_nthw_hfu.h | 58 +-
.../ntnic/nthw/flow_filter/flow_nthw_hsh.c | 60 +-
.../ntnic/nthw/flow_filter/flow_nthw_hsh.h | 60 +-
.../ntnic/nthw/flow_filter/flow_nthw_ifr.c | 30 +-
.../ntnic/nthw/flow_filter/flow_nthw_ifr.h | 30 +-
.../ntnic/nthw/flow_filter/flow_nthw_info.c | 88 +-
.../ntnic/nthw/flow_filter/flow_nthw_info.h | 88 +-
.../net/ntnic/nthw/flow_filter/flow_nthw_km.c | 160 +-
.../net/ntnic/nthw/flow_filter/flow_nthw_km.h | 162 +-
.../ntnic/nthw/flow_filter/flow_nthw_pdb.c | 54 +-
.../ntnic/nthw/flow_filter/flow_nthw_pdb.h | 56 +-
.../ntnic/nthw/flow_filter/flow_nthw_qsl.c | 68 +-
.../ntnic/nthw/flow_filter/flow_nthw_qsl.h | 68 +-
.../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c | 32 +-
.../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h | 32 +-
.../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c | 28 +-
.../ntnic/nthw/flow_filter/flow_nthw_slc_lr.h | 28 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c | 22 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h | 22 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c | 20 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_ins.h | 20 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c | 42 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h | 46 +-
.../net/ntnic/nthw/model/nthw_fpga_model.c | 12 +-
drivers/net/ntnic/nthw/nthw_platform.c | 2 +-
drivers/net/ntnic/nthw/nthw_platform_drv.h | 2 +-
.../nthw/supported/nthw_fpga_mod_str_map.c | 2 +-
.../nthw/supported/nthw_fpga_mod_str_map.h | 2 +-
38 files changed, 1877 insertions(+), 1877 deletions(-)
diff --git a/drivers/net/ntnic/adapter/nt4ga_adapter.c b/drivers/net/ntnic/adapter/nt4ga_adapter.c
index de4e8707bf..98725879b9 100644
--- a/drivers/net/ntnic/adapter/nt4ga_adapter.c
+++ b/drivers/net/ntnic/adapter/nt4ga_adapter.c
@@ -71,7 +71,7 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
int res = -1;
nthw_fpga_t *p_fpga = NULL;
- p_hw_info->n_nthw_adapter_id = nthw_platform_get_nthw_adapter_id(p_hw_info->pci_device_id);
+ p_hw_info->n_nthw_adapter_id = nthw_platform_get_adapter_id(p_hw_info->pci_device_id);
fpga_info->n_nthw_adapter_id = p_hw_info->n_nthw_adapter_id;
/* ref: DN-0060 section 9 */
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index 9153b31cea..f9e8f90e8a 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -388,7 +388,7 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info)
p_fpga_mgr = nthw_fpga_mgr_new();
if (p_fpga_mgr) {
nthw_fpga_mgr_init(p_fpga_mgr, nthw_fpga_instances,
- (const void *)sa_nthw_fpga_mod_str_map);
+ (const void *)nthw_sa_fpga_mod_str_map);
nthw_fpga_mgr_log_dump(p_fpga_mgr);
p_fpga = nthw_fpga_mgr_query_fpga(p_fpga_mgr, n_fpga_ident, p_fpga_info);
p_fpga_info->mp_fpga = p_fpga;
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
index 360cbc155a..cb6489b3ac 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
@@ -55,14 +55,14 @@ static struct backend_dev_s {
int __debug__ = 0; \
if (((be)->dmode & FLOW_BACKEND_DEBUG_MODE_WRITE) || (mod)->debug) \
do { \
- mod##_nthw_set_debug_mode((inst), 0xFF); \
+ nthw_##mod ##_set_debug_mode((inst), 0xFF); \
__debug__ = 1; \
} while (0)
#define CHECK_DEBUG_OFF(mod, inst) \
do { \
if (__debug__) \
- mod##_nthw_set_debug_mode((inst), 0); \
+ nthw_##mod ##_set_debug_mode((inst), 0); \
} while (0)
const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpga, void **be_dev);
@@ -82,247 +82,247 @@ static int set_debug_mode(void *be_dev, enum debug_mode_e mode)
static int get_nb_phy_ports(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_phy_ports(be->p_info_nthw);
+ return nthw_info_get_nb_phy_ports(be->p_info_nthw);
}
static int get_nb_rx_ports(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_rx_ports(be->p_info_nthw);
+ return nthw_info_get_nb_rx_ports(be->p_info_nthw);
}
static int get_ltx_avail(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_ltx_avail(be->p_info_nthw);
+ return nthw_info_get_ltx_avail(be->p_info_nthw);
}
static int get_nb_cat_funcs(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_cat_funcs(be->p_info_nthw);
+ return nthw_info_get_nb_cat_funcs(be->p_info_nthw);
}
static int get_nb_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_categories(be->p_info_nthw);
+ return nthw_info_get_nb_categories(be->p_info_nthw);
}
static int get_nb_cat_km_if_cnt(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_cat_km_if_cnt(be->p_info_nthw);
+ return nthw_info_get_nb_cat_km_if_cnt(be->p_info_nthw);
}
static int get_nb_cat_km_if_m0(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_cat_km_if_m0(be->p_info_nthw);
+ return nthw_info_get_nb_cat_km_if_m0(be->p_info_nthw);
}
static int get_nb_cat_km_if_m1(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_cat_km_if_m1(be->p_info_nthw);
+ return nthw_info_get_nb_cat_km_if_m1(be->p_info_nthw);
}
static int get_nb_queues(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_queues(be->p_info_nthw);
+ return nthw_info_get_nb_queues(be->p_info_nthw);
}
static int get_nb_km_flow_types(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_flow_types(be->p_info_nthw);
+ return nthw_info_get_nb_km_flow_types(be->p_info_nthw);
}
static int get_nb_pm_ext(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_pm_ext(be->p_info_nthw);
+ return nthw_info_get_nb_pm_ext(be->p_info_nthw);
}
static int get_nb_len(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_len(be->p_info_nthw);
+ return nthw_info_get_nb_len(be->p_info_nthw);
}
static int get_kcc_size(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_kcc_size(be->p_info_nthw);
+ return nthw_info_get_kcc_size(be->p_info_nthw);
}
static int get_kcc_banks(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_kcc_banks(be->p_info_nthw);
+ return nthw_info_get_kcc_banks(be->p_info_nthw);
}
static int get_nb_km_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_categories(be->p_info_nthw);
+ return nthw_info_get_nb_km_categories(be->p_info_nthw);
}
static int get_nb_km_cam_banks(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_cam_banks(be->p_info_nthw);
+ return nthw_info_get_nb_km_cam_banks(be->p_info_nthw);
}
static int get_nb_km_cam_record_words(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_cam_record_words(be->p_info_nthw);
+ return nthw_info_get_nb_km_cam_record_words(be->p_info_nthw);
}
static int get_nb_km_cam_records(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_cam_records(be->p_info_nthw);
+ return nthw_info_get_nb_km_cam_records(be->p_info_nthw);
}
static int get_nb_km_tcam_banks(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_tcam_banks(be->p_info_nthw);
+ return nthw_info_get_nb_km_tcam_banks(be->p_info_nthw);
}
static int get_nb_km_tcam_bank_width(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_km_tcam_bank_width(be->p_info_nthw);
+ return nthw_info_get_nb_km_tcam_bank_width(be->p_info_nthw);
}
static int get_nb_flm_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_categories(be->p_info_nthw);
+ return nthw_info_get_nb_flm_categories(be->p_info_nthw);
}
static int get_nb_flm_size_mb(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_size_mb(be->p_info_nthw);
+ return nthw_info_get_nb_flm_size_mb(be->p_info_nthw);
}
static int get_nb_flm_entry_size(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_entry_size(be->p_info_nthw);
+ return nthw_info_get_nb_flm_entry_size(be->p_info_nthw);
}
static int get_nb_flm_variant(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_variant(be->p_info_nthw);
+ return nthw_info_get_nb_flm_variant(be->p_info_nthw);
}
static int get_nb_flm_prios(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_prios(be->p_info_nthw);
+ return nthw_info_get_nb_flm_prios(be->p_info_nthw);
}
static int get_nb_flm_pst_profiles(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_pst_profiles(be->p_info_nthw);
+ return nthw_info_get_nb_flm_pst_profiles(be->p_info_nthw);
}
static int get_nb_flm_scrub_profiles(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_scrub_profiles(be->p_info_nthw);
+ return nthw_info_get_nb_flm_scrub_profiles(be->p_info_nthw);
}
static int get_nb_flm_load_aps_max(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_flm_load_aps_max(be->p_info_nthw);
+ return nthw_info_get_nb_flm_load_aps_max(be->p_info_nthw);
}
static int get_nb_qsl_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_qsl_categories(be->p_info_nthw);
+ return nthw_info_get_nb_qsl_categories(be->p_info_nthw);
}
static int get_nb_qsl_qst_entries(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_qsl_qst_entries(be->p_info_nthw);
+ return nthw_info_get_nb_qsl_qst_entries(be->p_info_nthw);
}
static int get_nb_pdb_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_pdb_categories(be->p_info_nthw);
+ return nthw_info_get_nb_pdb_categories(be->p_info_nthw);
}
static int get_nb_roa_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_roa_categories(be->p_info_nthw);
+ return nthw_info_get_nb_roa_categories(be->p_info_nthw);
}
static int get_nb_tpe_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tpe_categories(be->p_info_nthw);
+ return nthw_info_get_nb_tpe_categories(be->p_info_nthw);
}
static int get_nb_tx_cpy_writers(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tx_cpy_writers(be->p_info_nthw);
+ return nthw_info_get_nb_tx_cpy_writers(be->p_info_nthw);
}
static int get_nb_tx_cpy_mask_mem(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tx_cpy_mask_mem(be->p_info_nthw);
+ return nthw_info_get_nb_tx_cpy_mask_mem(be->p_info_nthw);
}
static int get_nb_tx_rpl_depth(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tx_rpl_depth(be->p_info_nthw);
+ return nthw_info_get_nb_tx_rpl_depth(be->p_info_nthw);
}
static int get_nb_tx_rpl_ext_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tx_rpl_ext_categories(be->p_info_nthw);
+ return nthw_info_get_nb_tx_rpl_ext_categories(be->p_info_nthw);
}
static int get_nb_tpe_ifr_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_tpe_ifr_categories(be->p_info_nthw);
+ return nthw_info_get_nb_tpe_ifr_categories(be->p_info_nthw);
}
static int get_nb_rpp_per_ps(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_rpp_per_ps(be->p_info_nthw);
+ return nthw_info_get_nb_rpp_per_ps(be->p_info_nthw);
}
static int get_nb_hsh_categories(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_hsh_categories(be->p_info_nthw);
+ return nthw_info_get_nb_hsh_categories(be->p_info_nthw);
}
static int get_nb_hsh_toeplitz(void *be_dev)
{
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
- return info_nthw_get_nb_hsh_toeplitz(be->p_info_nthw);
+ return nthw_info_get_nb_hsh_toeplitz(be->p_info_nthw);
}
/*
@@ -349,128 +349,128 @@ static int cat_cfn_flush(void *be_dev, const struct cat_func_s *cat, int cat_fun
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18) {
- cat_nthw_cfn_cnt(be->p_cat_nthw, 1U);
+ nthw_cat_cfn_cnt(be->p_cat_nthw, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cfn_select(be->p_cat_nthw, cat_func);
- cat_nthw_cfn_enable(be->p_cat_nthw, cat->v18.cfn[cat_func].enable);
- cat_nthw_cfn_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].inv);
- cat_nthw_cfn_ptc_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_inv);
- cat_nthw_cfn_ptc_isl(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_isl);
- cat_nthw_cfn_ptc_cfp(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_cfp);
- cat_nthw_cfn_ptc_mac(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_mac);
- cat_nthw_cfn_ptc_l2(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l2);
- cat_nthw_cfn_ptc_vn_tag(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_vntag);
- cat_nthw_cfn_ptc_vlan(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_vlan);
- cat_nthw_cfn_ptc_mpls(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_mpls);
- cat_nthw_cfn_ptc_l3(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l3);
- cat_nthw_cfn_ptc_frag(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_frag);
- cat_nthw_cfn_ptc_ip_prot(be->p_cat_nthw,
+ nthw_cat_cfn_select(be->p_cat_nthw, cat_func);
+ nthw_cat_cfn_enable(be->p_cat_nthw, cat->v18.cfn[cat_func].enable);
+ nthw_cat_cfn_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].inv);
+ nthw_cat_cfn_ptc_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_inv);
+ nthw_cat_cfn_ptc_isl(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_isl);
+ nthw_cat_cfn_ptc_cfp(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_cfp);
+ nthw_cat_cfn_ptc_mac(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_mac);
+ nthw_cat_cfn_ptc_l2(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l2);
+ nthw_cat_cfn_ptc_vn_tag(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_vntag);
+ nthw_cat_cfn_ptc_vlan(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_vlan);
+ nthw_cat_cfn_ptc_mpls(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_mpls);
+ nthw_cat_cfn_ptc_l3(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l3);
+ nthw_cat_cfn_ptc_frag(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_frag);
+ nthw_cat_cfn_ptc_ip_prot(be->p_cat_nthw,
cat->v18.cfn[cat_func].ptc_ip_prot);
- cat_nthw_cfn_ptc_l4(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l4);
- cat_nthw_cfn_ptc_tunnel(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tunnel);
- cat_nthw_cfn_ptc_tnl_l2(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l2);
- cat_nthw_cfn_ptc_tnl_vlan(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_l4(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_l4);
+ nthw_cat_cfn_ptc_tunnel(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tunnel);
+ nthw_cat_cfn_ptc_tnl_l2(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l2);
+ nthw_cat_cfn_ptc_tnl_vlan(be->p_cat_nthw,
cat->v18.cfn[cat_func].ptc_tnl_vlan);
- cat_nthw_cfn_ptc_tnl_mpls(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_mpls(be->p_cat_nthw,
cat->v18.cfn[cat_func].ptc_tnl_mpls);
- cat_nthw_cfn_ptc_tnl_l3(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l3);
- cat_nthw_cfn_ptc_tnl_frag(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_l3(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l3);
+ nthw_cat_cfn_ptc_tnl_frag(be->p_cat_nthw,
cat->v18.cfn[cat_func].ptc_tnl_frag);
- cat_nthw_cfn_ptc_tnl_ip_prot(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_ip_prot(be->p_cat_nthw,
cat->v18.cfn[cat_func].ptc_tnl_ip_prot);
- cat_nthw_cfn_ptc_tnl_l4(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l4);
-
- cat_nthw_cfn_err_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].err_inv);
- cat_nthw_cfn_err_cv(be->p_cat_nthw, cat->v18.cfn[cat_func].err_cv);
- cat_nthw_cfn_err_fcs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_fcs);
- cat_nthw_cfn_err_trunc(be->p_cat_nthw, cat->v18.cfn[cat_func].err_trunc);
- cat_nthw_cfn_err_l3_cs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_l3_cs);
- cat_nthw_cfn_err_l4_cs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_l4_cs);
-
- cat_nthw_cfn_mac_port(be->p_cat_nthw, cat->v18.cfn[cat_func].mac_port);
-
- cat_nthw_cfn_pm_cmp(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_cmp);
- cat_nthw_cfn_pm_dct(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_dct);
- cat_nthw_cfn_pm_ext_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_ext_inv);
- cat_nthw_cfn_pm_cmb(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_cmb);
- cat_nthw_cfn_pm_and_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_and_inv);
- cat_nthw_cfn_pm_or_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_or_inv);
- cat_nthw_cfn_pm_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_inv);
-
- cat_nthw_cfn_lc(be->p_cat_nthw, cat->v18.cfn[cat_func].lc);
- cat_nthw_cfn_lc_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].lc_inv);
- cat_nthw_cfn_km0_or(be->p_cat_nthw, cat->v18.cfn[cat_func].km_or);
- cat_nthw_cfn_flush(be->p_cat_nthw);
+ nthw_cat_cfn_ptc_tnl_l4(be->p_cat_nthw, cat->v18.cfn[cat_func].ptc_tnl_l4);
+
+ nthw_cat_cfn_err_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].err_inv);
+ nthw_cat_cfn_err_cv(be->p_cat_nthw, cat->v18.cfn[cat_func].err_cv);
+ nthw_cat_cfn_err_fcs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_fcs);
+ nthw_cat_cfn_err_trunc(be->p_cat_nthw, cat->v18.cfn[cat_func].err_trunc);
+ nthw_cat_cfn_err_l3_cs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_l3_cs);
+ nthw_cat_cfn_err_l4_cs(be->p_cat_nthw, cat->v18.cfn[cat_func].err_l4_cs);
+
+ nthw_cat_cfn_mac_port(be->p_cat_nthw, cat->v18.cfn[cat_func].mac_port);
+
+ nthw_cat_cfn_pm_cmp(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_cmp);
+ nthw_cat_cfn_pm_dct(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_dct);
+ nthw_cat_cfn_pm_ext_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_ext_inv);
+ nthw_cat_cfn_pm_cmb(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_cmb);
+ nthw_cat_cfn_pm_and_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_and_inv);
+ nthw_cat_cfn_pm_or_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_or_inv);
+ nthw_cat_cfn_pm_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].pm_inv);
+
+ nthw_cat_cfn_lc(be->p_cat_nthw, cat->v18.cfn[cat_func].lc);
+ nthw_cat_cfn_lc_inv(be->p_cat_nthw, cat->v18.cfn[cat_func].lc_inv);
+ nthw_cat_cfn_km0_or(be->p_cat_nthw, cat->v18.cfn[cat_func].km_or);
+ nthw_cat_cfn_flush(be->p_cat_nthw);
cat_func++;
}
} else if (cat->ver == 21) {
- cat_nthw_cfn_cnt(be->p_cat_nthw, 1U);
+ nthw_cat_cfn_cnt(be->p_cat_nthw, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cfn_select(be->p_cat_nthw, cat_func);
- cat_nthw_cfn_enable(be->p_cat_nthw, cat->v21.cfn[cat_func].enable);
- cat_nthw_cfn_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].inv);
- cat_nthw_cfn_ptc_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_inv);
- cat_nthw_cfn_ptc_isl(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_isl);
- cat_nthw_cfn_ptc_cfp(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_cfp);
- cat_nthw_cfn_ptc_mac(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_mac);
- cat_nthw_cfn_ptc_l2(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l2);
- cat_nthw_cfn_ptc_vn_tag(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_vntag);
- cat_nthw_cfn_ptc_vlan(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_vlan);
- cat_nthw_cfn_ptc_mpls(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_mpls);
- cat_nthw_cfn_ptc_l3(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l3);
- cat_nthw_cfn_ptc_frag(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_frag);
- cat_nthw_cfn_ptc_ip_prot(be->p_cat_nthw,
+ nthw_cat_cfn_select(be->p_cat_nthw, cat_func);
+ nthw_cat_cfn_enable(be->p_cat_nthw, cat->v21.cfn[cat_func].enable);
+ nthw_cat_cfn_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].inv);
+ nthw_cat_cfn_ptc_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_inv);
+ nthw_cat_cfn_ptc_isl(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_isl);
+ nthw_cat_cfn_ptc_cfp(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_cfp);
+ nthw_cat_cfn_ptc_mac(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_mac);
+ nthw_cat_cfn_ptc_l2(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l2);
+ nthw_cat_cfn_ptc_vn_tag(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_vntag);
+ nthw_cat_cfn_ptc_vlan(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_vlan);
+ nthw_cat_cfn_ptc_mpls(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_mpls);
+ nthw_cat_cfn_ptc_l3(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l3);
+ nthw_cat_cfn_ptc_frag(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_frag);
+ nthw_cat_cfn_ptc_ip_prot(be->p_cat_nthw,
cat->v21.cfn[cat_func].ptc_ip_prot);
- cat_nthw_cfn_ptc_l4(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l4);
- cat_nthw_cfn_ptc_tunnel(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tunnel);
- cat_nthw_cfn_ptc_tnl_l2(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l2);
- cat_nthw_cfn_ptc_tnl_vlan(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_l4(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_l4);
+ nthw_cat_cfn_ptc_tunnel(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tunnel);
+ nthw_cat_cfn_ptc_tnl_l2(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l2);
+ nthw_cat_cfn_ptc_tnl_vlan(be->p_cat_nthw,
cat->v21.cfn[cat_func].ptc_tnl_vlan);
- cat_nthw_cfn_ptc_tnl_mpls(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_mpls(be->p_cat_nthw,
cat->v21.cfn[cat_func].ptc_tnl_mpls);
- cat_nthw_cfn_ptc_tnl_l3(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l3);
- cat_nthw_cfn_ptc_tnl_frag(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_l3(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l3);
+ nthw_cat_cfn_ptc_tnl_frag(be->p_cat_nthw,
cat->v21.cfn[cat_func].ptc_tnl_frag);
- cat_nthw_cfn_ptc_tnl_ip_prot(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_ip_prot(be->p_cat_nthw,
cat->v21.cfn[cat_func].ptc_tnl_ip_prot);
- cat_nthw_cfn_ptc_tnl_l4(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l4);
-
- cat_nthw_cfn_err_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].err_inv);
- cat_nthw_cfn_err_cv(be->p_cat_nthw, cat->v21.cfn[cat_func].err_cv);
- cat_nthw_cfn_err_fcs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_fcs);
- cat_nthw_cfn_err_trunc(be->p_cat_nthw, cat->v21.cfn[cat_func].err_trunc);
- cat_nthw_cfn_err_l3_cs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_l3_cs);
- cat_nthw_cfn_err_l4_cs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_l4_cs);
- cat_nthw_cfn_err_tnl_l3_cs(be->p_cat_nthw,
+ nthw_cat_cfn_ptc_tnl_l4(be->p_cat_nthw, cat->v21.cfn[cat_func].ptc_tnl_l4);
+
+ nthw_cat_cfn_err_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].err_inv);
+ nthw_cat_cfn_err_cv(be->p_cat_nthw, cat->v21.cfn[cat_func].err_cv);
+ nthw_cat_cfn_err_fcs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_fcs);
+ nthw_cat_cfn_err_trunc(be->p_cat_nthw, cat->v21.cfn[cat_func].err_trunc);
+ nthw_cat_cfn_err_l3_cs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_l3_cs);
+ nthw_cat_cfn_err_l4_cs(be->p_cat_nthw, cat->v21.cfn[cat_func].err_l4_cs);
+ nthw_cat_cfn_err_tnl_l3_cs(be->p_cat_nthw,
cat->v21.cfn[cat_func].err_tnl_l3_cs);
- cat_nthw_cfn_err_tnl_l4_cs(be->p_cat_nthw,
+ nthw_cat_cfn_err_tnl_l4_cs(be->p_cat_nthw,
cat->v21.cfn[cat_func].err_tnl_l4_cs);
- cat_nthw_cfn_err_ttl_exp(be->p_cat_nthw,
+ nthw_cat_cfn_err_ttl_exp(be->p_cat_nthw,
cat->v21.cfn[cat_func].err_ttl_exp);
- cat_nthw_cfn_err_tnl_ttl_exp(be->p_cat_nthw,
+ nthw_cat_cfn_err_tnl_ttl_exp(be->p_cat_nthw,
cat->v21.cfn[cat_func].err_tnl_ttl_exp);
- cat_nthw_cfn_mac_port(be->p_cat_nthw, cat->v21.cfn[cat_func].mac_port);
+ nthw_cat_cfn_mac_port(be->p_cat_nthw, cat->v21.cfn[cat_func].mac_port);
- cat_nthw_cfn_pm_cmp(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_cmp);
- cat_nthw_cfn_pm_dct(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_dct);
- cat_nthw_cfn_pm_ext_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_ext_inv);
- cat_nthw_cfn_pm_cmb(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_cmb);
- cat_nthw_cfn_pm_and_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_and_inv);
- cat_nthw_cfn_pm_or_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_or_inv);
- cat_nthw_cfn_pm_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_inv);
+ nthw_cat_cfn_pm_cmp(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_cmp);
+ nthw_cat_cfn_pm_dct(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_dct);
+ nthw_cat_cfn_pm_ext_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_ext_inv);
+ nthw_cat_cfn_pm_cmb(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_cmb);
+ nthw_cat_cfn_pm_and_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_and_inv);
+ nthw_cat_cfn_pm_or_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_or_inv);
+ nthw_cat_cfn_pm_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].pm_inv);
- cat_nthw_cfn_lc(be->p_cat_nthw, cat->v21.cfn[cat_func].lc);
- cat_nthw_cfn_lc_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].lc_inv);
- cat_nthw_cfn_km0_or(be->p_cat_nthw, cat->v21.cfn[cat_func].km0_or);
+ nthw_cat_cfn_lc(be->p_cat_nthw, cat->v21.cfn[cat_func].lc);
+ nthw_cat_cfn_lc_inv(be->p_cat_nthw, cat->v21.cfn[cat_func].lc_inv);
+ nthw_cat_cfn_km0_or(be->p_cat_nthw, cat->v21.cfn[cat_func].km0_or);
if (be->p_cat_nthw->m_km_if_cnt > 1)
- cat_nthw_cfn_km1_or(be->p_cat_nthw, cat->v21.cfn[cat_func].km1_or);
+ nthw_cat_cfn_km1_or(be->p_cat_nthw, cat->v21.cfn[cat_func].km1_or);
- cat_nthw_cfn_flush(be->p_cat_nthw);
+ nthw_cat_cfn_flush(be->p_cat_nthw);
cat_func++;
}
}
@@ -486,22 +486,22 @@ static int cat_kce_flush(void *be_dev, const struct cat_func_s *cat, int km_if_i
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18) {
- cat_nthw_kce_cnt(be->p_cat_nthw, 0, 1U);
+ nthw_cat_kce_cnt(be->p_cat_nthw, 0, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_kce_select(be->p_cat_nthw, 0, index + i);
- cat_nthw_kce_enable(be->p_cat_nthw, 0, cat->v18.kce[index + i].enable_bm);
- cat_nthw_kce_flush(be->p_cat_nthw, 0);
+ nthw_cat_kce_select(be->p_cat_nthw, 0, index + i);
+ nthw_cat_kce_enable(be->p_cat_nthw, 0, cat->v18.kce[index + i].enable_bm);
+ nthw_cat_kce_flush(be->p_cat_nthw, 0);
}
} else if (cat->ver == 21) {
- cat_nthw_kce_cnt(be->p_cat_nthw, km_if_idx, 1U);
+ nthw_cat_kce_cnt(be->p_cat_nthw, km_if_idx, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_kce_select(be->p_cat_nthw, km_if_idx, index + i);
- cat_nthw_kce_enable(be->p_cat_nthw, km_if_idx,
+ nthw_cat_kce_select(be->p_cat_nthw, km_if_idx, index + i);
+ nthw_cat_kce_enable(be->p_cat_nthw, km_if_idx,
cat->v21.kce[index + i].enable_bm[km_if_idx]);
- cat_nthw_kce_flush(be->p_cat_nthw, km_if_idx);
+ nthw_cat_kce_flush(be->p_cat_nthw, km_if_idx);
}
}
@@ -516,23 +516,23 @@ static int cat_kcs_flush(void *be_dev, const struct cat_func_s *cat, int km_if_i
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18) {
- cat_nthw_kcs_cnt(be->p_cat_nthw, 0, 1U);
+ nthw_cat_kcs_cnt(be->p_cat_nthw, 0, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_kcs_select(be->p_cat_nthw, 0, cat_func);
- cat_nthw_kcs_category(be->p_cat_nthw, 0, cat->v18.kcs[cat_func].category);
- cat_nthw_kcs_flush(be->p_cat_nthw, 0);
+ nthw_cat_kcs_select(be->p_cat_nthw, 0, cat_func);
+ nthw_cat_kcs_category(be->p_cat_nthw, 0, cat->v18.kcs[cat_func].category);
+ nthw_cat_kcs_flush(be->p_cat_nthw, 0);
cat_func++;
}
} else if (cat->ver == 21) {
- cat_nthw_kcs_cnt(be->p_cat_nthw, km_if_idx, 1U);
+ nthw_cat_kcs_cnt(be->p_cat_nthw, km_if_idx, 1U);
for (int i = 0; i < cnt; i++) {
- cat_nthw_kcs_select(be->p_cat_nthw, km_if_idx, cat_func);
- cat_nthw_kcs_category(be->p_cat_nthw, km_if_idx,
+ nthw_cat_kcs_select(be->p_cat_nthw, km_if_idx, cat_func);
+ nthw_cat_kcs_category(be->p_cat_nthw, km_if_idx,
cat->v21.kcs[cat_func].category[km_if_idx]);
- cat_nthw_kcs_flush(be->p_cat_nthw, km_if_idx);
+ nthw_cat_kcs_flush(be->p_cat_nthw, km_if_idx);
cat_func++;
}
}
@@ -548,22 +548,22 @@ static int cat_fte_flush(void *be_dev, const struct cat_func_s *cat, int km_if_i
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18) {
- cat_nthw_fte_cnt(be->p_cat_nthw, 0, 1);
+ nthw_cat_fte_cnt(be->p_cat_nthw, 0, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_fte_select(be->p_cat_nthw, 0, index + i);
- cat_nthw_fte_enable(be->p_cat_nthw, 0, cat->v18.fte[index + i].enable_bm);
- cat_nthw_fte_flush(be->p_cat_nthw, 0);
+ nthw_cat_fte_select(be->p_cat_nthw, 0, index + i);
+ nthw_cat_fte_enable(be->p_cat_nthw, 0, cat->v18.fte[index + i].enable_bm);
+ nthw_cat_fte_flush(be->p_cat_nthw, 0);
}
} else if (cat->ver == 21) {
- cat_nthw_fte_cnt(be->p_cat_nthw, km_if_idx, 1);
+ nthw_cat_fte_cnt(be->p_cat_nthw, km_if_idx, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_fte_select(be->p_cat_nthw, km_if_idx, index + i);
- cat_nthw_fte_enable(be->p_cat_nthw, km_if_idx,
+ nthw_cat_fte_select(be->p_cat_nthw, km_if_idx, index + i);
+ nthw_cat_fte_enable(be->p_cat_nthw, km_if_idx,
cat->v21.fte[index + i].enable_bm[km_if_idx]);
- cat_nthw_fte_flush(be->p_cat_nthw, km_if_idx);
+ nthw_cat_fte_flush(be->p_cat_nthw, km_if_idx);
}
}
@@ -577,23 +577,23 @@ static int cat_cte_flush(void *be_dev, const struct cat_func_s *cat, int cat_fun
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_cte_cnt(be->p_cat_nthw, 1);
+ nthw_cat_cte_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cte_select(be->p_cat_nthw, cat_func);
- cat_nthw_cte_enable_col(be->p_cat_nthw, cat->v18.cte[cat_func].b.col);
- cat_nthw_cte_enable_cor(be->p_cat_nthw, cat->v18.cte[cat_func].b.cor);
- cat_nthw_cte_enable_hsh(be->p_cat_nthw, cat->v18.cte[cat_func].b.hsh);
- cat_nthw_cte_enable_qsl(be->p_cat_nthw, cat->v18.cte[cat_func].b.qsl);
- cat_nthw_cte_enable_ipf(be->p_cat_nthw, cat->v18.cte[cat_func].b.ipf);
- cat_nthw_cte_enable_slc(be->p_cat_nthw, cat->v18.cte[cat_func].b.slc);
- cat_nthw_cte_enable_pdb(be->p_cat_nthw, cat->v18.cte[cat_func].b.pdb);
- cat_nthw_cte_enable_msk(be->p_cat_nthw, cat->v18.cte[cat_func].b.msk);
- cat_nthw_cte_enable_hst(be->p_cat_nthw, cat->v18.cte[cat_func].b.hst);
- cat_nthw_cte_enable_epp(be->p_cat_nthw, cat->v18.cte[cat_func].b.epp);
- cat_nthw_cte_enable_tpe(be->p_cat_nthw, cat->v18.cte[cat_func].b.tpe);
-
- cat_nthw_cte_flush(be->p_cat_nthw);
+ nthw_cat_cte_select(be->p_cat_nthw, cat_func);
+ nthw_cat_cte_enable_col(be->p_cat_nthw, cat->v18.cte[cat_func].b.col);
+ nthw_cat_cte_enable_cor(be->p_cat_nthw, cat->v18.cte[cat_func].b.cor);
+ nthw_cat_cte_enable_hsh(be->p_cat_nthw, cat->v18.cte[cat_func].b.hsh);
+ nthw_cat_cte_enable_qsl(be->p_cat_nthw, cat->v18.cte[cat_func].b.qsl);
+ nthw_cat_cte_enable_ipf(be->p_cat_nthw, cat->v18.cte[cat_func].b.ipf);
+ nthw_cat_cte_enable_slc(be->p_cat_nthw, cat->v18.cte[cat_func].b.slc);
+ nthw_cat_cte_enable_pdb(be->p_cat_nthw, cat->v18.cte[cat_func].b.pdb);
+ nthw_cat_cte_enable_msk(be->p_cat_nthw, cat->v18.cte[cat_func].b.msk);
+ nthw_cat_cte_enable_hst(be->p_cat_nthw, cat->v18.cte[cat_func].b.hst);
+ nthw_cat_cte_enable_epp(be->p_cat_nthw, cat->v18.cte[cat_func].b.epp);
+ nthw_cat_cte_enable_tpe(be->p_cat_nthw, cat->v18.cte[cat_func].b.tpe);
+
+ nthw_cat_cte_flush(be->p_cat_nthw);
cat_func++;
}
}
@@ -608,13 +608,13 @@ static int cat_cts_flush(void *be_dev, const struct cat_func_s *cat, int index,
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_cts_cnt(be->p_cat_nthw, 1);
+ nthw_cat_cts_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cts_select(be->p_cat_nthw, index + i);
- cat_nthw_cts_cat_a(be->p_cat_nthw, cat->v18.cts[index + i].cat_a);
- cat_nthw_cts_cat_b(be->p_cat_nthw, cat->v18.cts[index + i].cat_b);
- cat_nthw_cts_flush(be->p_cat_nthw);
+ nthw_cat_cts_select(be->p_cat_nthw, index + i);
+ nthw_cat_cts_cat_a(be->p_cat_nthw, cat->v18.cts[index + i].cat_a);
+ nthw_cat_cts_cat_b(be->p_cat_nthw, cat->v18.cts[index + i].cat_b);
+ nthw_cat_cts_flush(be->p_cat_nthw);
}
}
@@ -628,13 +628,13 @@ static int cat_cot_flush(void *be_dev, const struct cat_func_s *cat, int cat_fun
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_cot_cnt(be->p_cat_nthw, 1);
+ nthw_cat_cot_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cot_select(be->p_cat_nthw, cat_func + i);
- cat_nthw_cot_color(be->p_cat_nthw, cat->v18.cot[cat_func + i].color);
- cat_nthw_cot_km(be->p_cat_nthw, cat->v18.cot[cat_func + i].km);
- cat_nthw_cot_flush(be->p_cat_nthw);
+ nthw_cat_cot_select(be->p_cat_nthw, cat_func + i);
+ nthw_cat_cot_color(be->p_cat_nthw, cat->v18.cot[cat_func + i].color);
+ nthw_cat_cot_km(be->p_cat_nthw, cat->v18.cot[cat_func + i].km);
+ nthw_cat_cot_flush(be->p_cat_nthw);
}
}
@@ -648,13 +648,13 @@ static int cat_cct_flush(void *be_dev, const struct cat_func_s *cat, int index,
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_cct_cnt(be->p_cat_nthw, 1);
+ nthw_cat_cct_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_cct_select(be->p_cat_nthw, index + i);
- cat_nthw_cct_color(be->p_cat_nthw, cat->v18.cct[index + i].color);
- cat_nthw_cct_km(be->p_cat_nthw, cat->v18.cct[index + i].km);
- cat_nthw_cct_flush(be->p_cat_nthw);
+ nthw_cat_cct_select(be->p_cat_nthw, index + i);
+ nthw_cat_cct_color(be->p_cat_nthw, cat->v18.cct[index + i].color);
+ nthw_cat_cct_km(be->p_cat_nthw, cat->v18.cct[index + i].km);
+ nthw_cat_cct_flush(be->p_cat_nthw);
}
}
@@ -668,13 +668,13 @@ static int cat_exo_flush(void *be_dev, const struct cat_func_s *cat, int ext_ind
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_exo_cnt(be->p_cat_nthw, 1);
+ nthw_cat_exo_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_exo_select(be->p_cat_nthw, ext_index + i);
- cat_nthw_exo_dyn(be->p_cat_nthw, cat->v18.exo[ext_index + i].dyn);
- cat_nthw_exo_ofs(be->p_cat_nthw, cat->v18.exo[ext_index + i].ofs);
- cat_nthw_exo_flush(be->p_cat_nthw);
+ nthw_cat_exo_select(be->p_cat_nthw, ext_index + i);
+ nthw_cat_exo_dyn(be->p_cat_nthw, cat->v18.exo[ext_index + i].dyn);
+ nthw_cat_exo_ofs(be->p_cat_nthw, cat->v18.exo[ext_index + i].ofs);
+ nthw_cat_exo_flush(be->p_cat_nthw);
}
}
@@ -688,12 +688,12 @@ static int cat_rck_flush(void *be_dev, const struct cat_func_s *cat, int index,
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_rck_cnt(be->p_cat_nthw, 1);
+ nthw_cat_rck_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_rck_select(be->p_cat_nthw, index + i);
- cat_nthw_rck_data(be->p_cat_nthw, cat->v18.rck[index + i].rck_data);
- cat_nthw_rck_flush(be->p_cat_nthw);
+ nthw_cat_rck_select(be->p_cat_nthw, index + i);
+ nthw_cat_rck_data(be->p_cat_nthw, cat->v18.rck[index + i].rck_data);
+ nthw_cat_rck_flush(be->p_cat_nthw);
}
}
@@ -707,16 +707,16 @@ static int cat_len_flush(void *be_dev, const struct cat_func_s *cat, int len_ind
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_len_cnt(be->p_cat_nthw, 1);
+ nthw_cat_len_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_len_select(be->p_cat_nthw, len_index + i);
- cat_nthw_len_lower(be->p_cat_nthw, cat->v18.len[len_index + i].lower);
- cat_nthw_len_upper(be->p_cat_nthw, cat->v18.len[len_index + i].upper);
- cat_nthw_len_dyn1(be->p_cat_nthw, cat->v18.len[len_index + i].dyn1);
- cat_nthw_len_dyn2(be->p_cat_nthw, cat->v18.len[len_index + i].dyn2);
- cat_nthw_len_inv(be->p_cat_nthw, cat->v18.len[len_index + i].inv);
- cat_nthw_len_flush(be->p_cat_nthw);
+ nthw_cat_len_select(be->p_cat_nthw, len_index + i);
+ nthw_cat_len_lower(be->p_cat_nthw, cat->v18.len[len_index + i].lower);
+ nthw_cat_len_upper(be->p_cat_nthw, cat->v18.len[len_index + i].upper);
+ nthw_cat_len_dyn1(be->p_cat_nthw, cat->v18.len[len_index + i].dyn1);
+ nthw_cat_len_dyn2(be->p_cat_nthw, cat->v18.len[len_index + i].dyn2);
+ nthw_cat_len_inv(be->p_cat_nthw, cat->v18.len[len_index + i].inv);
+ nthw_cat_len_flush(be->p_cat_nthw);
}
}
@@ -730,15 +730,15 @@ static int cat_kcc_flush(void *be_dev, const struct cat_func_s *cat, int len_ind
CHECK_DEBUG_ON(be, cat, be->p_cat_nthw);
if (cat->ver == 18 || cat->ver == 21) {
- cat_nthw_kcc_cnt(be->p_cat_nthw, 1);
+ nthw_cat_kcc_cnt(be->p_cat_nthw, 1);
for (int i = 0; i < cnt; i++) {
- cat_nthw_kcc_select(be->p_cat_nthw, len_index + i);
- cat_nthw_kcc_key(be->p_cat_nthw, cat->v18.kcc_cam[len_index + i].key);
- cat_nthw_kcc_category(be->p_cat_nthw,
+ nthw_cat_kcc_select(be->p_cat_nthw, len_index + i);
+ nthw_cat_kcc_key(be->p_cat_nthw, cat->v18.kcc_cam[len_index + i].key);
+ nthw_cat_kcc_category(be->p_cat_nthw,
cat->v18.kcc_cam[len_index + i].category);
- cat_nthw_kcc_id(be->p_cat_nthw, cat->v18.kcc_cam[len_index + i].id);
- cat_nthw_kcc_flush(be->p_cat_nthw);
+ nthw_cat_kcc_id(be->p_cat_nthw, cat->v18.kcc_cam[len_index + i].id);
+ nthw_cat_kcc_flush(be->p_cat_nthw);
}
}
@@ -770,56 +770,56 @@ static int km_rcp_flush(void *be_dev, const struct km_func_s *km, int category,
CHECK_DEBUG_ON(be, km, be->p_km_nthw);
if (km->ver == 7) {
- km_nthw_rcp_cnt(be->p_km_nthw, 1);
+ nthw_km_rcp_cnt(be->p_km_nthw, 1);
for (int i = 0; i < cnt; i++) {
- km_nthw_rcp_select(be->p_km_nthw, category + i);
- km_nthw_rcp_qw0_dyn(be->p_km_nthw, km->v7.rcp[category + i].qw0_dyn);
- km_nthw_rcp_qw0_ofs(be->p_km_nthw, km->v7.rcp[category + i].qw0_ofs);
- km_nthw_rcp_qw0_sel_a(be->p_km_nthw, km->v7.rcp[category + i].qw0_sel_a);
- km_nthw_rcp_qw0_sel_b(be->p_km_nthw, km->v7.rcp[category + i].qw0_sel_b);
- km_nthw_rcp_qw4_dyn(be->p_km_nthw, km->v7.rcp[category + i].qw4_dyn);
- km_nthw_rcp_qw4_ofs(be->p_km_nthw, km->v7.rcp[category + i].qw4_ofs);
- km_nthw_rcp_qw4_sel_a(be->p_km_nthw, km->v7.rcp[category + i].qw4_sel_a);
- km_nthw_rcp_qw4_sel_b(be->p_km_nthw, km->v7.rcp[category + i].qw4_sel_b);
- km_nthw_rcp_dw8_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw8_dyn);
- km_nthw_rcp_dw8_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw8_ofs);
- km_nthw_rcp_dw8_sel_a(be->p_km_nthw, km->v7.rcp[category + i].dw8_sel_a);
- km_nthw_rcp_dw8_sel_b(be->p_km_nthw, km->v7.rcp[category + i].dw8_sel_b);
- km_nthw_rcp_dw10_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw10_dyn);
- km_nthw_rcp_dw10_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw10_ofs);
- km_nthw_rcp_dw10_sel_a(be->p_km_nthw, km->v7.rcp[category + i].dw10_sel_a);
- km_nthw_rcp_dw10_sel_b(be->p_km_nthw, km->v7.rcp[category + i].dw10_sel_b);
- km_nthw_rcp_swx_cch(be->p_km_nthw, km->v7.rcp[category + i].swx_cch);
- km_nthw_rcp_swx_sel_a(be->p_km_nthw, km->v7.rcp[category + i].swx_sel_a);
- km_nthw_rcp_swx_sel_b(be->p_km_nthw, km->v7.rcp[category + i].swx_sel_b);
- km_nthw_rcp_mask_da(be->p_km_nthw, km->v7.rcp[category + i].mask_d_a);
- km_nthw_rcp_mask_b(be->p_km_nthw, km->v7.rcp[category + i].mask_b);
- km_nthw_rcp_dual(be->p_km_nthw, km->v7.rcp[category + i].dual);
- km_nthw_rcp_paired(be->p_km_nthw, km->v7.rcp[category + i].paired);
- km_nthw_rcp_el_a(be->p_km_nthw, km->v7.rcp[category + i].el_a);
- km_nthw_rcp_el_b(be->p_km_nthw, km->v7.rcp[category + i].el_b);
- km_nthw_rcp_info_a(be->p_km_nthw, km->v7.rcp[category + i].info_a);
- km_nthw_rcp_info_b(be->p_km_nthw, km->v7.rcp[category + i].info_b);
- km_nthw_rcp_ftm_a(be->p_km_nthw, km->v7.rcp[category + i].ftm_a);
- km_nthw_rcp_ftm_b(be->p_km_nthw, km->v7.rcp[category + i].ftm_b);
- km_nthw_rcp_bank_a(be->p_km_nthw, km->v7.rcp[category + i].bank_a);
- km_nthw_rcp_bank_b(be->p_km_nthw, km->v7.rcp[category + i].bank_b);
- km_nthw_rcp_kl_a(be->p_km_nthw, km->v7.rcp[category + i].kl_a);
- km_nthw_rcp_kl_b(be->p_km_nthw, km->v7.rcp[category + i].kl_b);
- km_nthw_rcp_keyway_a(be->p_km_nthw, km->v7.rcp[category + i].keyway_a);
- km_nthw_rcp_keyway_b(be->p_km_nthw, km->v7.rcp[category + i].keyway_b);
- km_nthw_rcp_synergy_mode(be->p_km_nthw,
+ nthw_km_rcp_select(be->p_km_nthw, category + i);
+ nthw_km_rcp_qw0_dyn(be->p_km_nthw, km->v7.rcp[category + i].qw0_dyn);
+ nthw_km_rcp_qw0_ofs(be->p_km_nthw, km->v7.rcp[category + i].qw0_ofs);
+ nthw_km_rcp_qw0_sel_a(be->p_km_nthw, km->v7.rcp[category + i].qw0_sel_a);
+ nthw_km_rcp_qw0_sel_b(be->p_km_nthw, km->v7.rcp[category + i].qw0_sel_b);
+ nthw_km_rcp_qw4_dyn(be->p_km_nthw, km->v7.rcp[category + i].qw4_dyn);
+ nthw_km_rcp_qw4_ofs(be->p_km_nthw, km->v7.rcp[category + i].qw4_ofs);
+ nthw_km_rcp_qw4_sel_a(be->p_km_nthw, km->v7.rcp[category + i].qw4_sel_a);
+ nthw_km_rcp_qw4_sel_b(be->p_km_nthw, km->v7.rcp[category + i].qw4_sel_b);
+ nthw_km_rcp_dw8_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw8_dyn);
+ nthw_km_rcp_dw8_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw8_ofs);
+ nthw_km_rcp_dw8_sel_a(be->p_km_nthw, km->v7.rcp[category + i].dw8_sel_a);
+ nthw_km_rcp_dw8_sel_b(be->p_km_nthw, km->v7.rcp[category + i].dw8_sel_b);
+ nthw_km_rcp_dw10_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw10_dyn);
+ nthw_km_rcp_dw10_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw10_ofs);
+ nthw_km_rcp_dw10_sel_a(be->p_km_nthw, km->v7.rcp[category + i].dw10_sel_a);
+ nthw_km_rcp_dw10_sel_b(be->p_km_nthw, km->v7.rcp[category + i].dw10_sel_b);
+ nthw_km_rcp_swx_cch(be->p_km_nthw, km->v7.rcp[category + i].swx_cch);
+ nthw_km_rcp_swx_sel_a(be->p_km_nthw, km->v7.rcp[category + i].swx_sel_a);
+ nthw_km_rcp_swx_sel_b(be->p_km_nthw, km->v7.rcp[category + i].swx_sel_b);
+ nthw_km_rcp_mask_da(be->p_km_nthw, km->v7.rcp[category + i].mask_d_a);
+ nthw_km_rcp_mask_b(be->p_km_nthw, km->v7.rcp[category + i].mask_b);
+ nthw_km_rcp_dual(be->p_km_nthw, km->v7.rcp[category + i].dual);
+ nthw_km_rcp_paired(be->p_km_nthw, km->v7.rcp[category + i].paired);
+ nthw_km_rcp_el_a(be->p_km_nthw, km->v7.rcp[category + i].el_a);
+ nthw_km_rcp_el_b(be->p_km_nthw, km->v7.rcp[category + i].el_b);
+ nthw_km_rcp_info_a(be->p_km_nthw, km->v7.rcp[category + i].info_a);
+ nthw_km_rcp_info_b(be->p_km_nthw, km->v7.rcp[category + i].info_b);
+ nthw_km_rcp_ftm_a(be->p_km_nthw, km->v7.rcp[category + i].ftm_a);
+ nthw_km_rcp_ftm_b(be->p_km_nthw, km->v7.rcp[category + i].ftm_b);
+ nthw_km_rcp_bank_a(be->p_km_nthw, km->v7.rcp[category + i].bank_a);
+ nthw_km_rcp_bank_b(be->p_km_nthw, km->v7.rcp[category + i].bank_b);
+ nthw_km_rcp_kl_a(be->p_km_nthw, km->v7.rcp[category + i].kl_a);
+ nthw_km_rcp_kl_b(be->p_km_nthw, km->v7.rcp[category + i].kl_b);
+ nthw_km_rcp_keyway_a(be->p_km_nthw, km->v7.rcp[category + i].keyway_a);
+ nthw_km_rcp_keyway_b(be->p_km_nthw, km->v7.rcp[category + i].keyway_b);
+ nthw_km_rcp_synergy_mode(be->p_km_nthw,
km->v7.rcp[category + i].synergy_mode);
- km_nthw_rcp_dw0_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw0_b_dyn);
- km_nthw_rcp_dw0_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw0_b_ofs);
- km_nthw_rcp_dw2_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw2_b_dyn);
- km_nthw_rcp_dw2_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw2_b_ofs);
- km_nthw_rcp_sw4_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].sw4_b_dyn);
- km_nthw_rcp_sw4_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].sw4_b_ofs);
- km_nthw_rcp_sw5_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].sw5_b_dyn);
- km_nthw_rcp_sw5_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].sw5_b_ofs);
- km_nthw_rcp_flush(be->p_km_nthw);
+ nthw_km_rcp_dw0_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw0_b_dyn);
+ nthw_km_rcp_dw0_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw0_b_ofs);
+ nthw_km_rcp_dw2_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].dw2_b_dyn);
+ nthw_km_rcp_dw2_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].dw2_b_ofs);
+ nthw_km_rcp_sw4_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].sw4_b_dyn);
+ nthw_km_rcp_sw4_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].sw4_b_ofs);
+ nthw_km_rcp_sw5_b_dyn(be->p_km_nthw, km->v7.rcp[category + i].sw5_b_dyn);
+ nthw_km_rcp_sw5_b_ofs(be->p_km_nthw, km->v7.rcp[category + i].sw5_b_ofs);
+ nthw_km_rcp_flush(be->p_km_nthw);
}
}
@@ -833,23 +833,23 @@ static int km_cam_flush(void *be_dev, const struct km_func_s *km, int bank, int
CHECK_DEBUG_ON(be, km, be->p_km_nthw);
if (km->ver == 7) {
- km_nthw_cam_cnt(be->p_km_nthw, 1);
+ nthw_km_cam_cnt(be->p_km_nthw, 1);
for (int i = 0; i < cnt; i++) {
- km_nthw_cam_select(be->p_km_nthw, (bank << 11) + record + i);
- km_nthw_cam_w0(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w0);
- km_nthw_cam_w1(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w1);
- km_nthw_cam_w2(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w2);
- km_nthw_cam_w3(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w3);
- km_nthw_cam_w4(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w4);
- km_nthw_cam_w5(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w5);
- km_nthw_cam_ft0(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft0);
- km_nthw_cam_ft1(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft1);
- km_nthw_cam_ft2(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft2);
- km_nthw_cam_ft3(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft3);
- km_nthw_cam_ft4(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft4);
- km_nthw_cam_ft5(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft5);
- km_nthw_cam_flush(be->p_km_nthw);
+ nthw_km_cam_select(be->p_km_nthw, (bank << 11) + record + i);
+ nthw_km_cam_w0(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w0);
+ nthw_km_cam_w1(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w1);
+ nthw_km_cam_w2(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w2);
+ nthw_km_cam_w3(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w3);
+ nthw_km_cam_w4(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w4);
+ nthw_km_cam_w5(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].w5);
+ nthw_km_cam_ft0(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft0);
+ nthw_km_cam_ft1(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft1);
+ nthw_km_cam_ft2(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft2);
+ nthw_km_cam_ft3(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft3);
+ nthw_km_cam_ft4(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft4);
+ nthw_km_cam_ft5(be->p_km_nthw, km->v7.cam[(bank << 11) + record + i].ft5);
+ nthw_km_cam_flush(be->p_km_nthw);
}
}
@@ -865,13 +865,13 @@ static int km_tcam_flush(void *be_dev, const struct km_func_s *km, int bank, int
if (km->ver == 7) {
int start_idx = bank * 4 * 256 + byte * 256 + value;
- km_nthw_tcam_cnt(be->p_km_nthw, 1);
+ nthw_km_tcam_cnt(be->p_km_nthw, 1);
for (int i = 0; i < cnt; i++) {
if (km->v7.tcam[start_idx + i].dirty) {
- km_nthw_tcam_select(be->p_km_nthw, start_idx + i);
- km_nthw_tcam_t(be->p_km_nthw, km->v7.tcam[start_idx + i].t);
- km_nthw_tcam_flush(be->p_km_nthw);
+ nthw_km_tcam_select(be->p_km_nthw, start_idx + i);
+ nthw_km_tcam_t(be->p_km_nthw, km->v7.tcam[start_idx + i].t);
+ nthw_km_tcam_flush(be->p_km_nthw);
km->v7.tcam[start_idx + i].dirty = 0;
}
}
@@ -891,13 +891,13 @@ static int km_tci_flush(void *be_dev, const struct km_func_s *km, int bank, int
if (km->ver == 7) {
/* TCAM bank width in version 3 = 72 */
- km_nthw_tci_cnt(be->p_km_nthw, 1);
+ nthw_km_tci_cnt(be->p_km_nthw, 1);
for (int i = 0; i < cnt; i++) {
- km_nthw_tci_select(be->p_km_nthw, bank * 72 + index + i);
- km_nthw_tci_color(be->p_km_nthw, km->v7.tci[bank * 72 + index + i].color);
- km_nthw_tci_ft(be->p_km_nthw, km->v7.tci[bank * 72 + index + i].ft);
- km_nthw_tci_flush(be->p_km_nthw);
+ nthw_km_tci_select(be->p_km_nthw, bank * 72 + index + i);
+ nthw_km_tci_color(be->p_km_nthw, km->v7.tci[bank * 72 + index + i].color);
+ nthw_km_tci_ft(be->p_km_nthw, km->v7.tci[bank * 72 + index + i].ft);
+ nthw_km_tci_flush(be->p_km_nthw);
}
}
@@ -915,15 +915,15 @@ static int km_tcq_flush(void *be_dev, const struct km_func_s *km, int bank, int
if (km->ver == 7) {
/* TCAM bank width in version 3 = 72 */
- km_nthw_tcq_cnt(be->p_km_nthw, 1);
+ nthw_km_tcq_cnt(be->p_km_nthw, 1);
for (int i = 0; i < cnt; i++) {
/* adr = lover 4 bits = bank, upper 7 bits = index */
- km_nthw_tcq_select(be->p_km_nthw, bank + (index << 4) + i);
- km_nthw_tcq_bank_mask(be->p_km_nthw,
+ nthw_km_tcq_select(be->p_km_nthw, bank + (index << 4) + i);
+ nthw_km_tcq_bank_mask(be->p_km_nthw,
km->v7.tcq[bank + (index << 4) + i].bank_mask);
- km_nthw_tcq_qual(be->p_km_nthw, km->v7.tcq[bank + (index << 4) + i].qual);
- km_nthw_tcq_flush(be->p_km_nthw);
+ nthw_km_tcq_qual(be->p_km_nthw, km->v7.tcq[bank + (index << 4) + i].qual);
+ nthw_km_tcq_flush(be->p_km_nthw);
}
}
@@ -954,24 +954,24 @@ static int flm_control_flush(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_control_enable(be->p_flm_nthw, flm->v25.control->enable);
- flm_nthw_control_init(be->p_flm_nthw, flm->v25.control->init);
- flm_nthw_control_lds(be->p_flm_nthw, flm->v25.control->lds);
- flm_nthw_control_lfs(be->p_flm_nthw, flm->v25.control->lfs);
- flm_nthw_control_lis(be->p_flm_nthw, flm->v25.control->lis);
- flm_nthw_control_uds(be->p_flm_nthw, flm->v25.control->uds);
- flm_nthw_control_uis(be->p_flm_nthw, flm->v25.control->uis);
- flm_nthw_control_rds(be->p_flm_nthw, flm->v25.control->rds);
- flm_nthw_control_ris(be->p_flm_nthw, flm->v25.control->ris);
- flm_nthw_control_pds(be->p_flm_nthw, flm->v25.control->pds);
- flm_nthw_control_pis(be->p_flm_nthw, flm->v25.control->pis);
- flm_nthw_control_crcwr(be->p_flm_nthw, flm->v25.control->crcwr);
- flm_nthw_control_crcrd(be->p_flm_nthw, flm->v25.control->crcrd);
- flm_nthw_control_rbl(be->p_flm_nthw, flm->v25.control->rbl);
- flm_nthw_control_eab(be->p_flm_nthw, flm->v25.control->eab);
- flm_nthw_control_split_sdram_usage(be->p_flm_nthw,
+ nthw_flm_control_enable(be->p_flm_nthw, flm->v25.control->enable);
+ nthw_flm_control_init(be->p_flm_nthw, flm->v25.control->init);
+ nthw_flm_control_lds(be->p_flm_nthw, flm->v25.control->lds);
+ nthw_flm_control_lfs(be->p_flm_nthw, flm->v25.control->lfs);
+ nthw_flm_control_lis(be->p_flm_nthw, flm->v25.control->lis);
+ nthw_flm_control_uds(be->p_flm_nthw, flm->v25.control->uds);
+ nthw_flm_control_uis(be->p_flm_nthw, flm->v25.control->uis);
+ nthw_flm_control_rds(be->p_flm_nthw, flm->v25.control->rds);
+ nthw_flm_control_ris(be->p_flm_nthw, flm->v25.control->ris);
+ nthw_flm_control_pds(be->p_flm_nthw, flm->v25.control->pds);
+ nthw_flm_control_pis(be->p_flm_nthw, flm->v25.control->pis);
+ nthw_flm_control_crcwr(be->p_flm_nthw, flm->v25.control->crcwr);
+ nthw_flm_control_crcrd(be->p_flm_nthw, flm->v25.control->crcrd);
+ nthw_flm_control_rbl(be->p_flm_nthw, flm->v25.control->rbl);
+ nthw_flm_control_eab(be->p_flm_nthw, flm->v25.control->eab);
+ nthw_flm_control_split_sdram_usage(be->p_flm_nthw,
flm->v25.control->split_sdram_usage);
- flm_nthw_control_flush(be->p_flm_nthw);
+ nthw_flm_control_flush(be->p_flm_nthw);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -985,12 +985,12 @@ static int flm_status_flush(void *be_dev, const struct flm_func_s *flm)
if (flm->ver >= 25) {
/* CALIBDONE, INITDONE, IDLE, and EFT_BP is read only */
- flm_nthw_status_critical(be->p_flm_nthw, &flm->v25.status->critical, 0);
- flm_nthw_status_panic(be->p_flm_nthw, &flm->v25.status->panic, 0);
- flm_nthw_status_crcerr(be->p_flm_nthw, &flm->v25.status->crcerr, 0);
- flm_nthw_status_cache_buf_crit(be->p_flm_nthw,
+ nthw_flm_status_critical(be->p_flm_nthw, &flm->v25.status->critical, 0);
+ nthw_flm_status_panic(be->p_flm_nthw, &flm->v25.status->panic, 0);
+ nthw_flm_status_crcerr(be->p_flm_nthw, &flm->v25.status->crcerr, 0);
+ nthw_flm_status_cache_buf_crit(be->p_flm_nthw,
&flm->v25.status->cache_buf_critical, 0);
- flm_nthw_status_flush(be->p_flm_nthw);
+ nthw_flm_status_flush(be->p_flm_nthw);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -1003,16 +1003,16 @@ static int flm_status_update(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_status_update(be->p_flm_nthw);
- flm_nthw_status_calib_success(be->p_flm_nthw, &flm->v25.status->calib_success, 1);
- flm_nthw_status_calib_fail(be->p_flm_nthw, &flm->v25.status->calib_fail, 1);
- flm_nthw_status_initdone(be->p_flm_nthw, &flm->v25.status->initdone, 1);
- flm_nthw_status_idle(be->p_flm_nthw, &flm->v25.status->idle, 1);
- flm_nthw_status_critical(be->p_flm_nthw, &flm->v25.status->critical, 1);
- flm_nthw_status_panic(be->p_flm_nthw, &flm->v25.status->panic, 1);
- flm_nthw_status_crcerr(be->p_flm_nthw, &flm->v25.status->crcerr, 1);
- flm_nthw_status_eft_bp(be->p_flm_nthw, &flm->v25.status->eft_bp, 1);
- flm_nthw_status_cache_buf_crit(be->p_flm_nthw,
+ nthw_flm_status_update(be->p_flm_nthw);
+ nthw_flm_status_calib_success(be->p_flm_nthw, &flm->v25.status->calib_success, 1);
+ nthw_flm_status_calib_fail(be->p_flm_nthw, &flm->v25.status->calib_fail, 1);
+ nthw_flm_status_initdone(be->p_flm_nthw, &flm->v25.status->initdone, 1);
+ nthw_flm_status_idle(be->p_flm_nthw, &flm->v25.status->idle, 1);
+ nthw_flm_status_critical(be->p_flm_nthw, &flm->v25.status->critical, 1);
+ nthw_flm_status_panic(be->p_flm_nthw, &flm->v25.status->panic, 1);
+ nthw_flm_status_crcerr(be->p_flm_nthw, &flm->v25.status->crcerr, 1);
+ nthw_flm_status_eft_bp(be->p_flm_nthw, &flm->v25.status->eft_bp, 1);
+ nthw_flm_status_cache_buf_crit(be->p_flm_nthw,
&flm->v25.status->cache_buf_critical, 1);
}
@@ -1026,8 +1026,8 @@ static int flm_scan_flush(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_scan_i(be->p_flm_nthw, flm->v25.scan->i);
- flm_nthw_scan_flush(be->p_flm_nthw);
+ nthw_flm_scan_i(be->p_flm_nthw, flm->v25.scan->i);
+ nthw_flm_scan_flush(be->p_flm_nthw);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -1040,8 +1040,8 @@ static int flm_load_bin_flush(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_load_bin(be->p_flm_nthw, flm->v25.load_bin->bin);
- flm_nthw_load_bin_flush(be->p_flm_nthw);
+ nthw_flm_load_bin(be->p_flm_nthw, flm->v25.load_bin->bin);
+ nthw_flm_load_bin_flush(be->p_flm_nthw);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -1054,15 +1054,15 @@ static int flm_prio_flush(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_prio_limit0(be->p_flm_nthw, flm->v25.prio->limit0);
- flm_nthw_prio_ft0(be->p_flm_nthw, flm->v25.prio->ft0);
- flm_nthw_prio_limit1(be->p_flm_nthw, flm->v25.prio->limit1);
- flm_nthw_prio_ft1(be->p_flm_nthw, flm->v25.prio->ft1);
- flm_nthw_prio_limit2(be->p_flm_nthw, flm->v25.prio->limit2);
- flm_nthw_prio_ft2(be->p_flm_nthw, flm->v25.prio->ft2);
- flm_nthw_prio_limit3(be->p_flm_nthw, flm->v25.prio->limit3);
- flm_nthw_prio_ft3(be->p_flm_nthw, flm->v25.prio->ft3);
- flm_nthw_prio_flush(be->p_flm_nthw);
+ nthw_flm_prio_limit0(be->p_flm_nthw, flm->v25.prio->limit0);
+ nthw_flm_prio_ft0(be->p_flm_nthw, flm->v25.prio->ft0);
+ nthw_flm_prio_limit1(be->p_flm_nthw, flm->v25.prio->limit1);
+ nthw_flm_prio_ft1(be->p_flm_nthw, flm->v25.prio->ft1);
+ nthw_flm_prio_limit2(be->p_flm_nthw, flm->v25.prio->limit2);
+ nthw_flm_prio_ft2(be->p_flm_nthw, flm->v25.prio->ft2);
+ nthw_flm_prio_limit3(be->p_flm_nthw, flm->v25.prio->limit3);
+ nthw_flm_prio_ft3(be->p_flm_nthw, flm->v25.prio->ft3);
+ nthw_flm_prio_flush(be->p_flm_nthw);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -1075,14 +1075,14 @@ static int flm_pst_flush(void *be_dev, const struct flm_func_s *flm, int index,
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_pst_cnt(be->p_flm_nthw, 1);
+ nthw_flm_pst_cnt(be->p_flm_nthw, 1);
for (int i = 0; i < cnt; i++) {
- flm_nthw_pst_select(be->p_flm_nthw, index + i);
- flm_nthw_pst_bp(be->p_flm_nthw, flm->v25.pst[index + i].bp);
- flm_nthw_pst_pp(be->p_flm_nthw, flm->v25.pst[index + i].pp);
- flm_nthw_pst_tp(be->p_flm_nthw, flm->v25.pst[index + i].tp);
- flm_nthw_pst_flush(be->p_flm_nthw);
+ nthw_flm_pst_select(be->p_flm_nthw, index + i);
+ nthw_flm_pst_bp(be->p_flm_nthw, flm->v25.pst[index + i].bp);
+ nthw_flm_pst_pp(be->p_flm_nthw, flm->v25.pst[index + i].pp);
+ nthw_flm_pst_tp(be->p_flm_nthw, flm->v25.pst[index + i].tp);
+ nthw_flm_pst_flush(be->p_flm_nthw);
}
}
@@ -1096,31 +1096,31 @@ static int flm_rcp_flush(void *be_dev, const struct flm_func_s *flm, int index,
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_rcp_cnt(be->p_flm_nthw, 1);
+ nthw_flm_rcp_cnt(be->p_flm_nthw, 1);
for (int i = 0; i < cnt; i++) {
- flm_nthw_rcp_select(be->p_flm_nthw, index + i);
- flm_nthw_rcp_lookup(be->p_flm_nthw, flm->v25.rcp[index + i].lookup);
- flm_nthw_rcp_qw0_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_dyn);
- flm_nthw_rcp_qw0_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_ofs);
- flm_nthw_rcp_qw0_sel(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_sel);
- flm_nthw_rcp_qw4_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].qw4_dyn);
- flm_nthw_rcp_qw4_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].qw4_ofs);
- flm_nthw_rcp_sw8_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_dyn);
- flm_nthw_rcp_sw8_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_ofs);
- flm_nthw_rcp_sw8_sel(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_sel);
- flm_nthw_rcp_sw9_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].sw9_dyn);
- flm_nthw_rcp_sw9_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].sw9_ofs);
- flm_nthw_rcp_mask(be->p_flm_nthw, flm->v25.rcp[index + i].mask);
- flm_nthw_rcp_kid(be->p_flm_nthw, flm->v25.rcp[index + i].kid);
- flm_nthw_rcp_opn(be->p_flm_nthw, flm->v25.rcp[index + i].opn);
- flm_nthw_rcp_ipn(be->p_flm_nthw, flm->v25.rcp[index + i].ipn);
- flm_nthw_rcp_byt_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].byt_dyn);
- flm_nthw_rcp_byt_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].byt_ofs);
- flm_nthw_rcp_txplm(be->p_flm_nthw, flm->v25.rcp[index + i].txplm);
- flm_nthw_rcp_auto_ipv4_mask(be->p_flm_nthw,
+ nthw_flm_rcp_select(be->p_flm_nthw, index + i);
+ nthw_flm_rcp_lookup(be->p_flm_nthw, flm->v25.rcp[index + i].lookup);
+ nthw_flm_rcp_qw0_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_dyn);
+ nthw_flm_rcp_qw0_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_ofs);
+ nthw_flm_rcp_qw0_sel(be->p_flm_nthw, flm->v25.rcp[index + i].qw0_sel);
+ nthw_flm_rcp_qw4_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].qw4_dyn);
+ nthw_flm_rcp_qw4_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].qw4_ofs);
+ nthw_flm_rcp_sw8_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_dyn);
+ nthw_flm_rcp_sw8_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_ofs);
+ nthw_flm_rcp_sw8_sel(be->p_flm_nthw, flm->v25.rcp[index + i].sw8_sel);
+ nthw_flm_rcp_sw9_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].sw9_dyn);
+ nthw_flm_rcp_sw9_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].sw9_ofs);
+ nthw_flm_rcp_mask(be->p_flm_nthw, flm->v25.rcp[index + i].mask);
+ nthw_flm_rcp_kid(be->p_flm_nthw, flm->v25.rcp[index + i].kid);
+ nthw_flm_rcp_opn(be->p_flm_nthw, flm->v25.rcp[index + i].opn);
+ nthw_flm_rcp_ipn(be->p_flm_nthw, flm->v25.rcp[index + i].ipn);
+ nthw_flm_rcp_byt_dyn(be->p_flm_nthw, flm->v25.rcp[index + i].byt_dyn);
+ nthw_flm_rcp_byt_ofs(be->p_flm_nthw, flm->v25.rcp[index + i].byt_ofs);
+ nthw_flm_rcp_txplm(be->p_flm_nthw, flm->v25.rcp[index + i].txplm);
+ nthw_flm_rcp_auto_ipv4_mask(be->p_flm_nthw,
flm->v25.rcp[index + i].auto_ipv4_mask);
- flm_nthw_rcp_flush(be->p_flm_nthw);
+ nthw_flm_rcp_flush(be->p_flm_nthw);
}
}
@@ -1134,15 +1134,15 @@ static int flm_scrub_flush(void *be_dev, const struct flm_func_s *flm, int index
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_scrub_cnt(be->p_flm_nthw, 1);
+ nthw_flm_scrub_cnt(be->p_flm_nthw, 1);
for (int i = 0; i < cnt; i++) {
- flm_nthw_scrub_select(be->p_flm_nthw, index + i);
- flm_nthw_scrub_t(be->p_flm_nthw, flm->v25.scrub[index + i].t);
- flm_nthw_scrub_r(be->p_flm_nthw, flm->v25.scrub[index + i].r);
- flm_nthw_scrub_del(be->p_flm_nthw, flm->v25.scrub[index + i].del);
- flm_nthw_scrub_inf(be->p_flm_nthw, flm->v25.scrub[index + i].inf);
- flm_nthw_scrub_flush(be->p_flm_nthw);
+ nthw_flm_scrub_select(be->p_flm_nthw, index + i);
+ nthw_flm_scrub_t(be->p_flm_nthw, flm->v25.scrub[index + i].t);
+ nthw_flm_scrub_r(be->p_flm_nthw, flm->v25.scrub[index + i].r);
+ nthw_flm_scrub_del(be->p_flm_nthw, flm->v25.scrub[index + i].del);
+ nthw_flm_scrub_inf(be->p_flm_nthw, flm->v25.scrub[index + i].inf);
+ nthw_flm_scrub_flush(be->p_flm_nthw);
}
}
@@ -1156,7 +1156,7 @@ static int flm_buf_ctrl_update(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_buf_ctrl_update(be->p_flm_nthw,
+ nthw_flm_buf_ctrl_update(be->p_flm_nthw,
&flm->v25.buf_ctrl->lrn_free,
&flm->v25.buf_ctrl->inf_avail,
&flm->v25.buf_ctrl->sta_avail);
@@ -1172,69 +1172,69 @@ static int flm_stat_update(void *be_dev, const struct flm_func_s *flm)
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
if (flm->ver >= 25) {
- flm_nthw_stat_lrn_done_update(be->p_flm_nthw);
- flm_nthw_stat_lrn_ignore_update(be->p_flm_nthw);
- flm_nthw_stat_lrn_fail_update(be->p_flm_nthw);
- flm_nthw_stat_unl_done_update(be->p_flm_nthw);
- flm_nthw_stat_unl_ignore_update(be->p_flm_nthw);
- flm_nthw_stat_rel_done_update(be->p_flm_nthw);
- flm_nthw_stat_rel_ignore_update(be->p_flm_nthw);
- flm_nthw_stat_aul_done_update(be->p_flm_nthw);
- flm_nthw_stat_aul_ignore_update(be->p_flm_nthw);
- flm_nthw_stat_aul_fail_update(be->p_flm_nthw);
- flm_nthw_stat_tul_done_update(be->p_flm_nthw);
- flm_nthw_stat_flows_update(be->p_flm_nthw);
- flm_nthw_load_lps_update(be->p_flm_nthw);
- flm_nthw_load_aps_update(be->p_flm_nthw);
-
- flm_nthw_stat_lrn_done_cnt(be->p_flm_nthw, &flm->v25.lrn_done->cnt, 1);
- flm_nthw_stat_lrn_ignore_cnt(be->p_flm_nthw, &flm->v25.lrn_ignore->cnt, 1);
- flm_nthw_stat_lrn_fail_cnt(be->p_flm_nthw, &flm->v25.lrn_fail->cnt, 1);
- flm_nthw_stat_unl_done_cnt(be->p_flm_nthw, &flm->v25.unl_done->cnt, 1);
- flm_nthw_stat_unl_ignore_cnt(be->p_flm_nthw, &flm->v25.unl_ignore->cnt, 1);
- flm_nthw_stat_rel_done_cnt(be->p_flm_nthw, &flm->v25.rel_done->cnt, 1);
- flm_nthw_stat_rel_ignore_cnt(be->p_flm_nthw, &flm->v25.rel_ignore->cnt, 1);
- flm_nthw_stat_aul_done_cnt(be->p_flm_nthw, &flm->v25.aul_done->cnt, 1);
- flm_nthw_stat_aul_ignore_cnt(be->p_flm_nthw, &flm->v25.aul_ignore->cnt, 1);
- flm_nthw_stat_aul_fail_cnt(be->p_flm_nthw, &flm->v25.aul_fail->cnt, 1);
- flm_nthw_stat_tul_done_cnt(be->p_flm_nthw, &flm->v25.tul_done->cnt, 1);
- flm_nthw_stat_flows_cnt(be->p_flm_nthw, &flm->v25.flows->cnt, 1);
-
- flm_nthw_stat_prb_done_update(be->p_flm_nthw);
- flm_nthw_stat_prb_ignore_update(be->p_flm_nthw);
- flm_nthw_stat_prb_done_cnt(be->p_flm_nthw, &flm->v25.prb_done->cnt, 1);
- flm_nthw_stat_prb_ignore_cnt(be->p_flm_nthw, &flm->v25.prb_ignore->cnt, 1);
-
- flm_nthw_load_lps_cnt(be->p_flm_nthw, &flm->v25.load_lps->lps, 1);
- flm_nthw_load_aps_cnt(be->p_flm_nthw, &flm->v25.load_aps->aps, 1);
+ nthw_flm_stat_lrn_done_update(be->p_flm_nthw);
+ nthw_flm_stat_lrn_ignore_update(be->p_flm_nthw);
+ nthw_flm_stat_lrn_fail_update(be->p_flm_nthw);
+ nthw_flm_stat_unl_done_update(be->p_flm_nthw);
+ nthw_flm_stat_unl_ignore_update(be->p_flm_nthw);
+ nthw_flm_stat_rel_done_update(be->p_flm_nthw);
+ nthw_flm_stat_rel_ignore_update(be->p_flm_nthw);
+ nthw_flm_stat_aul_done_update(be->p_flm_nthw);
+ nthw_flm_stat_aul_ignore_update(be->p_flm_nthw);
+ nthw_flm_stat_aul_fail_update(be->p_flm_nthw);
+ nthw_flm_stat_tul_done_update(be->p_flm_nthw);
+ nthw_flm_stat_flows_update(be->p_flm_nthw);
+ nthw_flm_load_lps_update(be->p_flm_nthw);
+ nthw_flm_load_aps_update(be->p_flm_nthw);
+
+ nthw_flm_stat_lrn_done_cnt(be->p_flm_nthw, &flm->v25.lrn_done->cnt, 1);
+ nthw_flm_stat_lrn_ignore_cnt(be->p_flm_nthw, &flm->v25.lrn_ignore->cnt, 1);
+ nthw_flm_stat_lrn_fail_cnt(be->p_flm_nthw, &flm->v25.lrn_fail->cnt, 1);
+ nthw_flm_stat_unl_done_cnt(be->p_flm_nthw, &flm->v25.unl_done->cnt, 1);
+ nthw_flm_stat_unl_ignore_cnt(be->p_flm_nthw, &flm->v25.unl_ignore->cnt, 1);
+ nthw_flm_stat_rel_done_cnt(be->p_flm_nthw, &flm->v25.rel_done->cnt, 1);
+ nthw_flm_stat_rel_ignore_cnt(be->p_flm_nthw, &flm->v25.rel_ignore->cnt, 1);
+ nthw_flm_stat_aul_done_cnt(be->p_flm_nthw, &flm->v25.aul_done->cnt, 1);
+ nthw_flm_stat_aul_ignore_cnt(be->p_flm_nthw, &flm->v25.aul_ignore->cnt, 1);
+ nthw_flm_stat_aul_fail_cnt(be->p_flm_nthw, &flm->v25.aul_fail->cnt, 1);
+ nthw_flm_stat_tul_done_cnt(be->p_flm_nthw, &flm->v25.tul_done->cnt, 1);
+ nthw_flm_stat_flows_cnt(be->p_flm_nthw, &flm->v25.flows->cnt, 1);
+
+ nthw_flm_stat_prb_done_update(be->p_flm_nthw);
+ nthw_flm_stat_prb_ignore_update(be->p_flm_nthw);
+ nthw_flm_stat_prb_done_cnt(be->p_flm_nthw, &flm->v25.prb_done->cnt, 1);
+ nthw_flm_stat_prb_ignore_cnt(be->p_flm_nthw, &flm->v25.prb_ignore->cnt, 1);
+
+ nthw_flm_load_lps_cnt(be->p_flm_nthw, &flm->v25.load_lps->lps, 1);
+ nthw_flm_load_aps_cnt(be->p_flm_nthw, &flm->v25.load_aps->aps, 1);
}
if (flm->ver >= 25) {
- flm_nthw_stat_sta_done_update(be->p_flm_nthw);
- flm_nthw_stat_inf_done_update(be->p_flm_nthw);
- flm_nthw_stat_inf_skip_update(be->p_flm_nthw);
- flm_nthw_stat_pck_hit_update(be->p_flm_nthw);
- flm_nthw_stat_pck_miss_update(be->p_flm_nthw);
- flm_nthw_stat_pck_unh_update(be->p_flm_nthw);
- flm_nthw_stat_pck_dis_update(be->p_flm_nthw);
- flm_nthw_stat_csh_hit_update(be->p_flm_nthw);
- flm_nthw_stat_csh_miss_update(be->p_flm_nthw);
- flm_nthw_stat_csh_unh_update(be->p_flm_nthw);
- flm_nthw_stat_cuc_start_update(be->p_flm_nthw);
- flm_nthw_stat_cuc_move_update(be->p_flm_nthw);
-
- flm_nthw_stat_sta_done_cnt(be->p_flm_nthw, &flm->v25.sta_done->cnt, 1);
- flm_nthw_stat_inf_done_cnt(be->p_flm_nthw, &flm->v25.inf_done->cnt, 1);
- flm_nthw_stat_inf_skip_cnt(be->p_flm_nthw, &flm->v25.inf_skip->cnt, 1);
- flm_nthw_stat_pck_hit_cnt(be->p_flm_nthw, &flm->v25.pck_hit->cnt, 1);
- flm_nthw_stat_pck_miss_cnt(be->p_flm_nthw, &flm->v25.pck_miss->cnt, 1);
- flm_nthw_stat_pck_unh_cnt(be->p_flm_nthw, &flm->v25.pck_unh->cnt, 1);
- flm_nthw_stat_pck_dis_cnt(be->p_flm_nthw, &flm->v25.pck_dis->cnt, 1);
- flm_nthw_stat_csh_hit_cnt(be->p_flm_nthw, &flm->v25.csh_hit->cnt, 1);
- flm_nthw_stat_csh_miss_cnt(be->p_flm_nthw, &flm->v25.csh_miss->cnt, 1);
- flm_nthw_stat_csh_unh_cnt(be->p_flm_nthw, &flm->v25.csh_unh->cnt, 1);
- flm_nthw_stat_cuc_start_cnt(be->p_flm_nthw, &flm->v25.cuc_start->cnt, 1);
- flm_nthw_stat_cuc_move_cnt(be->p_flm_nthw, &flm->v25.cuc_move->cnt, 1);
+ nthw_flm_stat_sta_done_update(be->p_flm_nthw);
+ nthw_flm_stat_inf_done_update(be->p_flm_nthw);
+ nthw_flm_stat_inf_skip_update(be->p_flm_nthw);
+ nthw_flm_stat_pck_hit_update(be->p_flm_nthw);
+ nthw_flm_stat_pck_miss_update(be->p_flm_nthw);
+ nthw_flm_stat_pck_unh_update(be->p_flm_nthw);
+ nthw_flm_stat_pck_dis_update(be->p_flm_nthw);
+ nthw_flm_stat_csh_hit_update(be->p_flm_nthw);
+ nthw_flm_stat_csh_miss_update(be->p_flm_nthw);
+ nthw_flm_stat_csh_unh_update(be->p_flm_nthw);
+ nthw_flm_stat_cuc_start_update(be->p_flm_nthw);
+ nthw_flm_stat_cuc_move_update(be->p_flm_nthw);
+
+ nthw_flm_stat_sta_done_cnt(be->p_flm_nthw, &flm->v25.sta_done->cnt, 1);
+ nthw_flm_stat_inf_done_cnt(be->p_flm_nthw, &flm->v25.inf_done->cnt, 1);
+ nthw_flm_stat_inf_skip_cnt(be->p_flm_nthw, &flm->v25.inf_skip->cnt, 1);
+ nthw_flm_stat_pck_hit_cnt(be->p_flm_nthw, &flm->v25.pck_hit->cnt, 1);
+ nthw_flm_stat_pck_miss_cnt(be->p_flm_nthw, &flm->v25.pck_miss->cnt, 1);
+ nthw_flm_stat_pck_unh_cnt(be->p_flm_nthw, &flm->v25.pck_unh->cnt, 1);
+ nthw_flm_stat_pck_dis_cnt(be->p_flm_nthw, &flm->v25.pck_dis->cnt, 1);
+ nthw_flm_stat_csh_hit_cnt(be->p_flm_nthw, &flm->v25.csh_hit->cnt, 1);
+ nthw_flm_stat_csh_miss_cnt(be->p_flm_nthw, &flm->v25.csh_miss->cnt, 1);
+ nthw_flm_stat_csh_unh_cnt(be->p_flm_nthw, &flm->v25.csh_unh->cnt, 1);
+ nthw_flm_stat_cuc_start_cnt(be->p_flm_nthw, &flm->v25.cuc_start->cnt, 1);
+ nthw_flm_stat_cuc_move_cnt(be->p_flm_nthw, &flm->v25.cuc_move->cnt, 1);
}
CHECK_DEBUG_OFF(flm, be->p_flm_nthw);
@@ -1249,7 +1249,7 @@ static int flm_lrn_data_flush(void *be_dev, const struct flm_func_s *flm, const
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
- int ret = flm_nthw_lrn_data_flush(be->p_flm_nthw, lrn_data, records, words_per_record,
+ int ret = nthw_flm_lrn_data_flush(be->p_flm_nthw, lrn_data, records, words_per_record,
handled_records, &flm->v25.buf_ctrl->lrn_free,
&flm->v25.buf_ctrl->inf_avail,
&flm->v25.buf_ctrl->sta_avail);
@@ -1268,7 +1268,7 @@ static int flm_inf_sta_data_update(void *be_dev, const struct flm_func_s *flm, u
struct backend_dev_s *be = (struct backend_dev_s *)be_dev;
CHECK_DEBUG_ON(be, flm, be->p_flm_nthw);
- int ret = flm_nthw_inf_sta_data_update(be->p_flm_nthw, inf_data, inf_size, sta_data,
+ int ret = nthw_flm_inf_sta_data_update(be->p_flm_nthw, inf_data, inf_size, sta_data,
sta_size, &flm->v25.buf_ctrl->lrn_free,
&flm->v25.buf_ctrl->inf_avail,
&flm->v25.buf_ctrl->sta_avail);
@@ -1303,39 +1303,39 @@ static int hsh_rcp_flush(void *be_dev, const struct hsh_func_s *hsh, int categor
CHECK_DEBUG_ON(be, hsh, be->p_hsh_nthw);
if (hsh->ver == 5) {
- hsh_nthw_rcp_cnt(be->p_hsh_nthw, 1);
+ nthw_hsh_rcp_cnt(be->p_hsh_nthw, 1);
for (int i = 0; i < cnt; i++) {
- hsh_nthw_rcp_select(be->p_hsh_nthw, category + i);
- hsh_nthw_rcp_load_dist_type(be->p_hsh_nthw,
+ nthw_hsh_rcp_select(be->p_hsh_nthw, category + i);
+ nthw_hsh_rcp_load_dist_type(be->p_hsh_nthw,
hsh->v5.rcp[category + i].load_dist_type);
- hsh_nthw_rcp_mac_port_mask(be->p_hsh_nthw,
+ nthw_hsh_rcp_mac_port_mask(be->p_hsh_nthw,
hsh->v5.rcp[category + i].mac_port_mask);
- hsh_nthw_rcp_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].sort);
- hsh_nthw_rcp_qw0_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_pe);
- hsh_nthw_rcp_qw0_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_ofs);
- hsh_nthw_rcp_qw4_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_pe);
- hsh_nthw_rcp_qw4_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_ofs);
- hsh_nthw_rcp_w8_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_pe);
- hsh_nthw_rcp_w8_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_ofs);
- hsh_nthw_rcp_w8_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_sort);
- hsh_nthw_rcp_w9_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_pe);
- hsh_nthw_rcp_w9_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_ofs);
- hsh_nthw_rcp_w9_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_sort);
- hsh_nthw_rcp_w9_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_p);
- hsh_nthw_rcp_p_mask(be->p_hsh_nthw, hsh->v5.rcp[category + i].p_mask);
- hsh_nthw_rcp_word_mask(be->p_hsh_nthw,
+ nthw_hsh_rcp_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].sort);
+ nthw_hsh_rcp_qw0_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_pe);
+ nthw_hsh_rcp_qw0_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw0_ofs);
+ nthw_hsh_rcp_qw4_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_pe);
+ nthw_hsh_rcp_qw4_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].qw4_ofs);
+ nthw_hsh_rcp_w8_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_pe);
+ nthw_hsh_rcp_w8_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_ofs);
+ nthw_hsh_rcp_w8_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w8_sort);
+ nthw_hsh_rcp_w9_pe(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_pe);
+ nthw_hsh_rcp_w9_ofs(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_ofs);
+ nthw_hsh_rcp_w9_sort(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_sort);
+ nthw_hsh_rcp_w9_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].w9_p);
+ nthw_hsh_rcp_p_mask(be->p_hsh_nthw, hsh->v5.rcp[category + i].p_mask);
+ nthw_hsh_rcp_word_mask(be->p_hsh_nthw,
hsh->v5.rcp[category + i].word_mask);
- hsh_nthw_rcp_seed(be->p_hsh_nthw, hsh->v5.rcp[category + i].seed);
- hsh_nthw_rcp_tnl_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].tnl_p);
- hsh_nthw_rcp_hsh_valid(be->p_hsh_nthw,
+ nthw_hsh_rcp_seed(be->p_hsh_nthw, hsh->v5.rcp[category + i].seed);
+ nthw_hsh_rcp_tnl_p(be->p_hsh_nthw, hsh->v5.rcp[category + i].tnl_p);
+ nthw_hsh_rcp_hsh_valid(be->p_hsh_nthw,
hsh->v5.rcp[category + i].hsh_valid);
- hsh_nthw_rcp_hsh_type(be->p_hsh_nthw, hsh->v5.rcp[category + i].hsh_type);
- hsh_nthw_rcp_toeplitz(be->p_hsh_nthw, hsh->v5.rcp[category + i].toeplitz);
- hsh_nthw_rcp_k(be->p_hsh_nthw, hsh->v5.rcp[category + i].k);
- hsh_nthw_rcp_auto_ipv4_mask(be->p_hsh_nthw,
+ nthw_hsh_rcp_hsh_type(be->p_hsh_nthw, hsh->v5.rcp[category + i].hsh_type);
+ nthw_hsh_rcp_toeplitz(be->p_hsh_nthw, hsh->v5.rcp[category + i].toeplitz);
+ nthw_hsh_rcp_k(be->p_hsh_nthw, hsh->v5.rcp[category + i].k);
+ nthw_hsh_rcp_auto_ipv4_mask(be->p_hsh_nthw,
hsh->v5.rcp[category + i].auto_ipv4_mask);
- hsh_nthw_rcp_flush(be->p_hsh_nthw);
+ nthw_hsh_rcp_flush(be->p_hsh_nthw);
}
}
@@ -1366,20 +1366,20 @@ static int qsl_rcp_flush(void *be_dev, const struct qsl_func_s *qsl, int categor
CHECK_DEBUG_ON(be, qsl, be->p_qsl_nthw);
if (qsl->ver == 7) {
- qsl_nthw_rcp_cnt(be->p_qsl_nthw, 1);
+ nthw_qsl_rcp_cnt(be->p_qsl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- qsl_nthw_rcp_select(be->p_qsl_nthw, category + i);
- qsl_nthw_rcp_discard(be->p_qsl_nthw, qsl->v7.rcp[category + i].discard);
- qsl_nthw_rcp_drop(be->p_qsl_nthw, qsl->v7.rcp[category + i].drop);
- qsl_nthw_rcp_tbl_lo(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_lo);
- qsl_nthw_rcp_tbl_hi(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_hi);
- qsl_nthw_rcp_tbl_idx(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_idx);
- qsl_nthw_rcp_tbl_msk(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_msk);
- qsl_nthw_rcp_lr(be->p_qsl_nthw, qsl->v7.rcp[category + i].lr);
- qsl_nthw_rcp_tsa(be->p_qsl_nthw, qsl->v7.rcp[category + i].tsa);
- qsl_nthw_rcp_vli(be->p_qsl_nthw, qsl->v7.rcp[category + i].vli);
- qsl_nthw_rcp_flush(be->p_qsl_nthw);
+ nthw_qsl_rcp_select(be->p_qsl_nthw, category + i);
+ nthw_qsl_rcp_discard(be->p_qsl_nthw, qsl->v7.rcp[category + i].discard);
+ nthw_qsl_rcp_drop(be->p_qsl_nthw, qsl->v7.rcp[category + i].drop);
+ nthw_qsl_rcp_tbl_lo(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_lo);
+ nthw_qsl_rcp_tbl_hi(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_hi);
+ nthw_qsl_rcp_tbl_idx(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_idx);
+ nthw_qsl_rcp_tbl_msk(be->p_qsl_nthw, qsl->v7.rcp[category + i].tbl_msk);
+ nthw_qsl_rcp_lr(be->p_qsl_nthw, qsl->v7.rcp[category + i].lr);
+ nthw_qsl_rcp_tsa(be->p_qsl_nthw, qsl->v7.rcp[category + i].tsa);
+ nthw_qsl_rcp_vli(be->p_qsl_nthw, qsl->v7.rcp[category + i].vli);
+ nthw_qsl_rcp_flush(be->p_qsl_nthw);
}
}
@@ -1393,18 +1393,18 @@ static int qsl_qst_flush(void *be_dev, const struct qsl_func_s *qsl, int entry,
CHECK_DEBUG_ON(be, qsl, be->p_qsl_nthw);
if (qsl->ver == 7) {
- qsl_nthw_qst_cnt(be->p_qsl_nthw, 1);
+ nthw_qsl_qst_cnt(be->p_qsl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- qsl_nthw_qst_select(be->p_qsl_nthw, entry + i);
- qsl_nthw_qst_queue(be->p_qsl_nthw, qsl->v7.qst[entry + i].queue);
- qsl_nthw_qst_en(be->p_qsl_nthw, qsl->v7.qst[entry + i].en);
-
- qsl_nthw_qst_tx_port(be->p_qsl_nthw, qsl->v7.qst[entry + i].tx_port);
- qsl_nthw_qst_lre(be->p_qsl_nthw, qsl->v7.qst[entry + i].lre);
- qsl_nthw_qst_tci(be->p_qsl_nthw, qsl->v7.qst[entry + i].tci);
- qsl_nthw_qst_ven(be->p_qsl_nthw, qsl->v7.qst[entry + i].ven);
- qsl_nthw_qst_flush(be->p_qsl_nthw);
+ nthw_qsl_qst_select(be->p_qsl_nthw, entry + i);
+ nthw_qsl_qst_queue(be->p_qsl_nthw, qsl->v7.qst[entry + i].queue);
+ nthw_qsl_qst_en(be->p_qsl_nthw, qsl->v7.qst[entry + i].en);
+
+ nthw_qsl_qst_tx_port(be->p_qsl_nthw, qsl->v7.qst[entry + i].tx_port);
+ nthw_qsl_qst_lre(be->p_qsl_nthw, qsl->v7.qst[entry + i].lre);
+ nthw_qsl_qst_tci(be->p_qsl_nthw, qsl->v7.qst[entry + i].tci);
+ nthw_qsl_qst_ven(be->p_qsl_nthw, qsl->v7.qst[entry + i].ven);
+ nthw_qsl_qst_flush(be->p_qsl_nthw);
}
}
@@ -1418,12 +1418,12 @@ static int qsl_qen_flush(void *be_dev, const struct qsl_func_s *qsl, int entry,
CHECK_DEBUG_ON(be, qsl, be->p_qsl_nthw);
if (qsl->ver == 7) {
- qsl_nthw_qen_cnt(be->p_qsl_nthw, 1);
+ nthw_qsl_qen_cnt(be->p_qsl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- qsl_nthw_qen_select(be->p_qsl_nthw, entry + i);
- qsl_nthw_qen_en(be->p_qsl_nthw, qsl->v7.qen[entry + i].en);
- qsl_nthw_qen_flush(be->p_qsl_nthw);
+ nthw_qsl_qen_select(be->p_qsl_nthw, entry + i);
+ nthw_qsl_qen_en(be->p_qsl_nthw, qsl->v7.qen[entry + i].en);
+ nthw_qsl_qen_flush(be->p_qsl_nthw);
}
}
@@ -1437,14 +1437,14 @@ static int qsl_unmq_flush(void *be_dev, const struct qsl_func_s *qsl, int entry,
CHECK_DEBUG_ON(be, qsl, be->p_qsl_nthw);
if (qsl->ver == 7) {
- qsl_nthw_unmq_cnt(be->p_qsl_nthw, 1);
+ nthw_qsl_unmq_cnt(be->p_qsl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- qsl_nthw_unmq_select(be->p_qsl_nthw, entry + i);
- qsl_nthw_unmq_dest_queue(be->p_qsl_nthw,
+ nthw_qsl_unmq_select(be->p_qsl_nthw, entry + i);
+ nthw_qsl_unmq_dest_queue(be->p_qsl_nthw,
qsl->v7.unmq[entry + i].dest_queue);
- qsl_nthw_unmq_en(be->p_qsl_nthw, qsl->v7.unmq[entry + i].en);
- qsl_nthw_unmq_flush(be->p_qsl_nthw);
+ nthw_qsl_unmq_en(be->p_qsl_nthw, qsl->v7.unmq[entry + i].en);
+ nthw_qsl_unmq_flush(be->p_qsl_nthw);
}
}
@@ -1476,24 +1476,24 @@ static int slc_lr_rcp_flush(void *be_dev, const struct slc_lr_func_s *slc_lr, in
CHECK_DEBUG_ON(be, slc_lr, be->p_slc_lr_nthw);
if (slc_lr->ver == 2) {
- slc_lr_nthw_rcp_cnt(be->p_slc_lr_nthw, 1);
+ nthw_slc_lr_rcp_cnt(be->p_slc_lr_nthw, 1);
for (int i = 0; i < cnt; i++) {
- slc_lr_nthw_rcp_select(be->p_slc_lr_nthw, category + i);
- slc_lr_nthw_rcp_head_slc_en(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_select(be->p_slc_lr_nthw, category + i);
+ nthw_slc_lr_rcp_head_slc_en(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].head_slc_en);
- slc_lr_nthw_rcp_head_dyn(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_head_dyn(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].head_dyn);
- slc_lr_nthw_rcp_head_ofs(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_head_ofs(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].head_ofs);
- slc_lr_nthw_rcp_tail_slc_en(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_tail_slc_en(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].tail_slc_en);
- slc_lr_nthw_rcp_tail_dyn(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_tail_dyn(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].tail_dyn);
- slc_lr_nthw_rcp_tail_ofs(be->p_slc_lr_nthw,
+ nthw_slc_lr_rcp_tail_ofs(be->p_slc_lr_nthw,
slc_lr->v2.rcp[category + i].tail_ofs);
- slc_lr_nthw_rcp_pcap(be->p_slc_lr_nthw, slc_lr->v2.rcp[category + i].pcap);
- slc_lr_nthw_rcp_flush(be->p_slc_lr_nthw);
+ nthw_slc_lr_rcp_pcap(be->p_slc_lr_nthw, slc_lr->v2.rcp[category + i].pcap);
+ nthw_slc_lr_rcp_flush(be->p_slc_lr_nthw);
}
}
@@ -1524,36 +1524,36 @@ static int pdb_rcp_flush(void *be_dev, const struct pdb_func_s *pdb, int categor
CHECK_DEBUG_ON(be, pdb, be->p_pdb_nthw);
if (pdb->ver == 9) {
- pdb_nthw_rcp_cnt(be->p_pdb_nthw, 1);
+ nthw_pdb_rcp_cnt(be->p_pdb_nthw, 1);
for (int i = 0; i < cnt; i++) {
- pdb_nthw_rcp_select(be->p_pdb_nthw, category + i);
- pdb_nthw_rcp_descriptor(be->p_pdb_nthw,
+ nthw_pdb_rcp_select(be->p_pdb_nthw, category + i);
+ nthw_pdb_rcp_descriptor(be->p_pdb_nthw,
pdb->v9.rcp[category + i].descriptor);
- pdb_nthw_rcp_desc_len(be->p_pdb_nthw, pdb->v9.rcp[category + i].desc_len);
- pdb_nthw_rcp_tx_port(be->p_pdb_nthw, pdb->v9.rcp[category + i].tx_port);
- pdb_nthw_rcp_tx_ignore(be->p_pdb_nthw,
+ nthw_pdb_rcp_desc_len(be->p_pdb_nthw, pdb->v9.rcp[category + i].desc_len);
+ nthw_pdb_rcp_tx_port(be->p_pdb_nthw, pdb->v9.rcp[category + i].tx_port);
+ nthw_pdb_rcp_tx_ignore(be->p_pdb_nthw,
pdb->v9.rcp[category + i].tx_ignore);
- pdb_nthw_rcp_tx_now(be->p_pdb_nthw, pdb->v9.rcp[category + i].tx_now);
- pdb_nthw_rcp_crc_overwrite(be->p_pdb_nthw,
+ nthw_pdb_rcp_tx_now(be->p_pdb_nthw, pdb->v9.rcp[category + i].tx_now);
+ nthw_pdb_rcp_crc_overwrite(be->p_pdb_nthw,
pdb->v9.rcp[category + i].crc_overwrite);
- pdb_nthw_rcp_align(be->p_pdb_nthw, pdb->v9.rcp[category + i].align);
- pdb_nthw_rcp_ofs0_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs0_dyn);
- pdb_nthw_rcp_ofs0_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs0_rel);
- pdb_nthw_rcp_ofs1_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs1_dyn);
- pdb_nthw_rcp_ofs1_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs1_rel);
- pdb_nthw_rcp_ofs2_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs2_dyn);
- pdb_nthw_rcp_ofs2_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs2_rel);
- pdb_nthw_rcp_ip_prot_tnl(be->p_pdb_nthw,
+ nthw_pdb_rcp_align(be->p_pdb_nthw, pdb->v9.rcp[category + i].align);
+ nthw_pdb_rcp_ofs0_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs0_dyn);
+ nthw_pdb_rcp_ofs0_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs0_rel);
+ nthw_pdb_rcp_ofs1_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs1_dyn);
+ nthw_pdb_rcp_ofs1_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs1_rel);
+ nthw_pdb_rcp_ofs2_dyn(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs2_dyn);
+ nthw_pdb_rcp_ofs2_rel(be->p_pdb_nthw, pdb->v9.rcp[category + i].ofs2_rel);
+ nthw_pdb_rcp_ip_prot_tnl(be->p_pdb_nthw,
pdb->v9.rcp[category + i].ip_prot_tnl);
- pdb_nthw_rcp_ppc_hsh(be->p_pdb_nthw, pdb->v9.rcp[category + i].ppc_hsh);
- pdb_nthw_rcp_duplicate_en(be->p_pdb_nthw,
+ nthw_pdb_rcp_ppc_hsh(be->p_pdb_nthw, pdb->v9.rcp[category + i].ppc_hsh);
+ nthw_pdb_rcp_duplicate_en(be->p_pdb_nthw,
pdb->v9.rcp[category + i].duplicate_en);
- pdb_nthw_rcp_duplicate_bit(be->p_pdb_nthw,
+ nthw_pdb_rcp_duplicate_bit(be->p_pdb_nthw,
pdb->v9.rcp[category + i].duplicate_bit);
- pdb_nthw_rcp_duplicate_bit(be->p_pdb_nthw,
+ nthw_pdb_rcp_duplicate_bit(be->p_pdb_nthw,
pdb->v9.rcp[category + i].pcap_keep_fcs);
- pdb_nthw_rcp_flush(be->p_pdb_nthw);
+ nthw_pdb_rcp_flush(be->p_pdb_nthw);
}
}
@@ -1567,9 +1567,9 @@ static int pdb_config_flush(void *be_dev, const struct pdb_func_s *pdb)
CHECK_DEBUG_ON(be, pdb, be->p_pdb_nthw);
if (pdb->ver == 9) {
- pdb_nthw_config_ts_format(be->p_pdb_nthw, pdb->v9.config->ts_format);
- pdb_nthw_config_port_ofs(be->p_pdb_nthw, pdb->v9.config->port_ofs);
- pdb_nthw_config_flush(be->p_pdb_nthw);
+ nthw_pdb_config_ts_format(be->p_pdb_nthw, pdb->v9.config->ts_format);
+ nthw_pdb_config_port_ofs(be->p_pdb_nthw, pdb->v9.config->port_ofs);
+ nthw_pdb_config_flush(be->p_pdb_nthw);
}
CHECK_DEBUG_OFF(pdb, be->p_pdb_nthw);
@@ -1642,12 +1642,12 @@ static int tpe_rpp_rcp_flush(void *be_dev, const struct tpe_func_s *rpp_lr, int
CHECK_DEBUG_ON(be, rpp_lr, be->p_rpp_lr_nthw);
if (rpp_lr->ver >= 1) {
- rpp_lr_nthw_rcp_cnt(be->p_rpp_lr_nthw, 1);
+ nthw_rpp_lr_rcp_cnt(be->p_rpp_lr_nthw, 1);
for (int i = 0; i < cnt; i++) {
- rpp_lr_nthw_rcp_select(be->p_rpp_lr_nthw, index + i);
- rpp_lr_nthw_rcp_exp(be->p_rpp_lr_nthw, rpp_lr->v3.rpp_rcp[index + i].exp);
- rpp_lr_nthw_rcp_flush(be->p_rpp_lr_nthw);
+ nthw_rpp_lr_rcp_select(be->p_rpp_lr_nthw, index + i);
+ nthw_rpp_lr_rcp_exp(be->p_rpp_lr_nthw, rpp_lr->v3.rpp_rcp[index + i].exp);
+ nthw_rpp_lr_rcp_flush(be->p_rpp_lr_nthw);
}
}
@@ -1662,22 +1662,22 @@ static int tpe_rpp_ifr_rcp_flush(void *be_dev, const struct tpe_func_s *rpp_lr,
CHECK_DEBUG_ON(be, rpp_lr, be->p_rpp_lr_nthw);
if (rpp_lr->ver >= 2) {
- rpp_lr_nthw_ifr_rcp_cnt(be->p_rpp_lr_nthw, 1);
+ nthw_rpp_lr_ifr_rcp_cnt(be->p_rpp_lr_nthw, 1);
for (int i = 0; i < cnt; i++) {
- rpp_lr_nthw_ifr_rcp_select(be->p_rpp_lr_nthw, index + i);
- rpp_lr_nthw_ifr_rcp_ipv4_en(be->p_rpp_lr_nthw,
+ nthw_rpp_lr_ifr_rcp_select(be->p_rpp_lr_nthw, index + i);
+ nthw_rpp_lr_ifr_rcp_ipv4_en(be->p_rpp_lr_nthw,
rpp_lr->v3.rpp_ifr_rcp[index + i].ipv4_en);
- rpp_lr_nthw_ifr_rcp_ipv4_df_drop(be->p_rpp_lr_nthw,
+ nthw_rpp_lr_ifr_rcp_ipv4_df_drop(be->p_rpp_lr_nthw,
rpp_lr->v3.rpp_ifr_rcp[index + i]
.ipv4_df_drop);
- rpp_lr_nthw_ifr_rcp_ipv6_en(be->p_rpp_lr_nthw,
+ nthw_rpp_lr_ifr_rcp_ipv6_en(be->p_rpp_lr_nthw,
rpp_lr->v3.rpp_ifr_rcp[index + i].ipv6_en);
- rpp_lr_nthw_ifr_rcp_ipv6_drop(be->p_rpp_lr_nthw,
+ nthw_rpp_lr_ifr_rcp_ipv6_drop(be->p_rpp_lr_nthw,
rpp_lr->v3.rpp_ifr_rcp[index + i].ipv6_drop);
- rpp_lr_nthw_ifr_rcp_mtu(be->p_rpp_lr_nthw,
+ nthw_rpp_lr_ifr_rcp_mtu(be->p_rpp_lr_nthw,
rpp_lr->v3.rpp_ifr_rcp[index + i].mtu);
- rpp_lr_nthw_ifr_rcp_flush(be->p_rpp_lr_nthw);
+ nthw_rpp_lr_ifr_rcp_flush(be->p_rpp_lr_nthw);
}
} else {
@@ -1695,18 +1695,18 @@ static int tpe_ifr_rcp_flush(void *be_dev, const struct tpe_func_s *ifr, int ind
CHECK_DEBUG_ON(be, ifr, be->p_ifr_nthw);
if (ifr->ver >= 2) {
- ifr_nthw_rcp_cnt(be->p_ifr_nthw, 1);
+ nthw_ifr_rcp_cnt(be->p_ifr_nthw, 1);
for (int i = 0; i < cnt; i++) {
- ifr_nthw_rcp_select(be->p_ifr_nthw, index + i);
- ifr_nthw_rcp_ipv4_en(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].ipv4_en);
- ifr_nthw_rcp_ipv4_df_drop(be->p_ifr_nthw,
+ nthw_ifr_rcp_select(be->p_ifr_nthw, index + i);
+ nthw_ifr_rcp_ipv4_en(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].ipv4_en);
+ nthw_ifr_rcp_ipv4_df_drop(be->p_ifr_nthw,
ifr->v3.ifr_rcp[index + i].ipv4_df_drop);
- ifr_nthw_rcp_ipv6_en(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].ipv6_en);
- ifr_nthw_rcp_ipv6_drop(be->p_ifr_nthw,
+ nthw_ifr_rcp_ipv6_en(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].ipv6_en);
+ nthw_ifr_rcp_ipv6_drop(be->p_ifr_nthw,
ifr->v3.ifr_rcp[index + i].ipv6_drop);
- ifr_nthw_rcp_mtu(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].mtu);
- ifr_nthw_rcp_flush(be->p_ifr_nthw);
+ nthw_ifr_rcp_mtu(be->p_ifr_nthw, ifr->v3.ifr_rcp[index + i].mtu);
+ nthw_ifr_rcp_flush(be->p_ifr_nthw);
}
} else {
@@ -1725,12 +1725,12 @@ static int tpe_ifr_counters_update(void *be_dev, const struct tpe_func_s *ifr, i
CHECK_DEBUG_ON(be, ifr, be->p_ifr_nthw);
if (ifr->ver >= 2) {
- ifr_nthw_counters_cnt(be->p_ifr_nthw, 1);
+ nthw_ifr_counters_cnt(be->p_ifr_nthw, 1);
for (i = 0; i < cnt; i++) {
- ifr_nthw_counters_select(be->p_ifr_nthw, index + i);
- ifr_nthw_counters_update(be->p_ifr_nthw);
- ifr_nthw_counters_drop(be->p_ifr_nthw,
+ nthw_ifr_counters_select(be->p_ifr_nthw, index + i);
+ nthw_ifr_counters_update(be->p_ifr_nthw);
+ nthw_ifr_counters_drop(be->p_ifr_nthw,
&ifr->v3.ifr_counters[index + i].drop, 1);
}
@@ -1748,14 +1748,14 @@ static int tpe_ins_rcp_flush(void *be_dev, const struct tpe_func_s *tx_ins, int
CHECK_DEBUG_ON(be, tx_ins, be->p_tx_ins_nthw);
if (tx_ins->ver >= 1) {
- tx_ins_nthw_rcp_cnt(be->p_tx_ins_nthw, 1);
+ nthw_tx_ins_rcp_cnt(be->p_tx_ins_nthw, 1);
for (int i = 0; i < cnt; i++) {
- tx_ins_nthw_rcp_select(be->p_tx_ins_nthw, index + i);
- tx_ins_nthw_rcp_dyn(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].dyn);
- tx_ins_nthw_rcp_ofs(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].ofs);
- tx_ins_nthw_rcp_len(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].len);
- tx_ins_nthw_rcp_flush(be->p_tx_ins_nthw);
+ nthw_tx_ins_rcp_select(be->p_tx_ins_nthw, index + i);
+ nthw_tx_ins_rcp_dyn(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].dyn);
+ nthw_tx_ins_rcp_ofs(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].ofs);
+ nthw_tx_ins_rcp_len(be->p_tx_ins_nthw, tx_ins->v3.ins_rcp[index + i].len);
+ nthw_tx_ins_rcp_flush(be->p_tx_ins_nthw);
}
}
@@ -1769,25 +1769,25 @@ static int tpe_rpl_rcp_flush(void *be_dev, const struct tpe_func_s *tx_rpl, int
CHECK_DEBUG_ON(be, tx_rpl, be->p_tx_rpl_nthw);
if (tx_rpl->ver >= 1) {
- tx_rpl_nthw_rcp_cnt(be->p_tx_rpl_nthw, 1);
+ nthw_tx_rpl_rcp_cnt(be->p_tx_rpl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- tx_rpl_nthw_rcp_select(be->p_tx_rpl_nthw, index + i);
- tx_rpl_nthw_rcp_dyn(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].dyn);
- tx_rpl_nthw_rcp_ofs(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].ofs);
- tx_rpl_nthw_rcp_len(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].len);
- tx_rpl_nthw_rcp_rpl_ptr(be->p_tx_rpl_nthw,
+ nthw_tx_rpl_rcp_select(be->p_tx_rpl_nthw, index + i);
+ nthw_tx_rpl_rcp_dyn(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].dyn);
+ nthw_tx_rpl_rcp_ofs(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].ofs);
+ nthw_tx_rpl_rcp_len(be->p_tx_rpl_nthw, tx_rpl->v3.rpl_rcp[index + i].len);
+ nthw_tx_rpl_rcp_rpl_ptr(be->p_tx_rpl_nthw,
tx_rpl->v3.rpl_rcp[index + i].rpl_ptr);
- tx_rpl_nthw_rcp_ext_prio(be->p_tx_rpl_nthw,
+ nthw_tx_rpl_rcp_ext_prio(be->p_tx_rpl_nthw,
tx_rpl->v3.rpl_rcp[index + i].ext_prio);
if (tx_rpl->ver >= 3) {
- tx_rpl_nthw_rcp_eth_type_wr(be->p_tx_rpl_nthw,
+ nthw_tx_rpl_rcp_eth_type_wr(be->p_tx_rpl_nthw,
tx_rpl->v3.rpl_rcp[index + i]
.eth_type_wr);
}
- tx_rpl_nthw_rcp_flush(be->p_tx_rpl_nthw);
+ nthw_tx_rpl_rcp_flush(be->p_tx_rpl_nthw);
}
}
@@ -1801,13 +1801,13 @@ static int tpe_rpl_ext_flush(void *be_dev, const struct tpe_func_s *tx_rpl, int
CHECK_DEBUG_ON(be, tx_rpl, be->p_tx_rpl_nthw);
if (tx_rpl->ver >= 1) {
- tx_rpl_nthw_ext_cnt(be->p_tx_rpl_nthw, 1);
+ nthw_tx_rpl_ext_cnt(be->p_tx_rpl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- tx_rpl_nthw_ext_select(be->p_tx_rpl_nthw, index + i);
- tx_rpl_nthw_ext_rpl_ptr(be->p_tx_rpl_nthw,
+ nthw_tx_rpl_ext_select(be->p_tx_rpl_nthw, index + i);
+ nthw_tx_rpl_ext_rpl_ptr(be->p_tx_rpl_nthw,
tx_rpl->v3.rpl_ext[index + i].rpl_ptr);
- tx_rpl_nthw_ext_flush(be->p_tx_rpl_nthw);
+ nthw_tx_rpl_ext_flush(be->p_tx_rpl_nthw);
}
}
@@ -1821,13 +1821,13 @@ static int tpe_rpl_rpl_flush(void *be_dev, const struct tpe_func_s *tx_rpl, int
CHECK_DEBUG_ON(be, tx_rpl, be->p_tx_rpl_nthw);
if (tx_rpl->ver >= 1) {
- tx_rpl_nthw_rpl_cnt(be->p_tx_rpl_nthw, 1);
+ nthw_tx_rpl_rpl_cnt(be->p_tx_rpl_nthw, 1);
for (int i = 0; i < cnt; i++) {
- tx_rpl_nthw_rpl_select(be->p_tx_rpl_nthw, index + i);
- tx_rpl_nthw_rpl_value(be->p_tx_rpl_nthw,
+ nthw_tx_rpl_rpl_select(be->p_tx_rpl_nthw, index + i);
+ nthw_tx_rpl_rpl_value(be->p_tx_rpl_nthw,
tx_rpl->v3.rpl_rpl[index + i].value);
- tx_rpl_nthw_rpl_flush(be->p_tx_rpl_nthw);
+ nthw_tx_rpl_rpl_flush(be->p_tx_rpl_nthw);
}
}
@@ -1846,21 +1846,21 @@ static int tpe_cpy_rcp_flush(void *be_dev, const struct tpe_func_s *tx_cpy, int
for (int i = 0; i < cnt; i++) {
if (wr_index != (index + i) / tx_cpy->nb_rcp_categories) {
wr_index = (index + i) / tx_cpy->nb_rcp_categories;
- tx_cpy_nthw_writer_cnt(be->p_tx_cpy_nthw, wr_index, 1);
+ nthw_tx_cpy_writer_cnt(be->p_tx_cpy_nthw, wr_index, 1);
}
- tx_cpy_nthw_writer_select(be->p_tx_cpy_nthw, wr_index,
+ nthw_tx_cpy_writer_select(be->p_tx_cpy_nthw, wr_index,
(index + i) % tx_cpy->nb_rcp_categories);
- tx_cpy_nthw_writer_reader_select(be->p_tx_cpy_nthw, wr_index,
+ nthw_tx_cpy_writer_reader_select(be->p_tx_cpy_nthw, wr_index,
tx_cpy->v3.cpy_rcp[index + i]
.reader_select);
- tx_cpy_nthw_writer_dyn(be->p_tx_cpy_nthw, wr_index,
+ nthw_tx_cpy_writer_dyn(be->p_tx_cpy_nthw, wr_index,
tx_cpy->v3.cpy_rcp[index + i].dyn);
- tx_cpy_nthw_writer_ofs(be->p_tx_cpy_nthw, wr_index,
+ nthw_tx_cpy_writer_ofs(be->p_tx_cpy_nthw, wr_index,
tx_cpy->v3.cpy_rcp[index + i].ofs);
- tx_cpy_nthw_writer_len(be->p_tx_cpy_nthw, wr_index,
+ nthw_tx_cpy_writer_len(be->p_tx_cpy_nthw, wr_index,
tx_cpy->v3.cpy_rcp[index + i].len);
- tx_cpy_nthw_writer_flush(be->p_tx_cpy_nthw, wr_index);
+ nthw_tx_cpy_writer_flush(be->p_tx_cpy_nthw, wr_index);
}
}
@@ -1874,51 +1874,51 @@ static int tpe_hfu_rcp_flush(void *be_dev, const struct tpe_func_s *hfu, int ind
CHECK_DEBUG_ON(be, hfu, be->p_hfu_nthw);
if (hfu->ver >= 1) {
- hfu_nthw_rcp_cnt(be->p_hfu_nthw, 1);
+ nthw_hfu_rcp_cnt(be->p_hfu_nthw, 1);
for (int i = 0; i < cnt; i++) {
- hfu_nthw_rcp_select(be->p_hfu_nthw, index + i);
- hfu_nthw_rcp_len_a_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_a_wr);
- hfu_nthw_rcp_len_a_ol4len(be->p_hfu_nthw,
+ nthw_hfu_rcp_select(be->p_hfu_nthw, index + i);
+ nthw_hfu_rcp_len_a_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_a_wr);
+ nthw_hfu_rcp_len_a_ol4len(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_outer_l4_len);
- hfu_nthw_rcp_len_a_pos_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_a_pos_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_pos_dyn);
- hfu_nthw_rcp_len_a_pos_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_a_pos_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_pos_ofs);
- hfu_nthw_rcp_len_a_add_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_a_add_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_add_dyn);
- hfu_nthw_rcp_len_a_add_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_a_add_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_add_ofs);
- hfu_nthw_rcp_len_a_sub_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_a_sub_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_a_sub_dyn);
- hfu_nthw_rcp_len_b_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_b_wr);
- hfu_nthw_rcp_len_b_pos_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_b_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_b_wr);
+ nthw_hfu_rcp_len_b_pos_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_b_pos_dyn);
- hfu_nthw_rcp_len_b_pos_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_b_pos_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_b_pos_ofs);
- hfu_nthw_rcp_len_b_add_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_b_add_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_b_add_dyn);
- hfu_nthw_rcp_len_b_add_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_b_add_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_b_add_ofs);
- hfu_nthw_rcp_len_b_sub_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_b_sub_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_b_sub_dyn);
- hfu_nthw_rcp_len_c_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_c_wr);
- hfu_nthw_rcp_len_c_pos_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_c_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].len_c_wr);
+ nthw_hfu_rcp_len_c_pos_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_c_pos_dyn);
- hfu_nthw_rcp_len_c_pos_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_c_pos_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_c_pos_ofs);
- hfu_nthw_rcp_len_c_add_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_c_add_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_c_add_dyn);
- hfu_nthw_rcp_len_c_add_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_c_add_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_c_add_ofs);
- hfu_nthw_rcp_len_c_sub_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_len_c_sub_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].len_c_sub_dyn);
- hfu_nthw_rcp_ttl_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].ttl_wr);
- hfu_nthw_rcp_ttl_pos_dyn(be->p_hfu_nthw,
+ nthw_hfu_rcp_ttl_wr(be->p_hfu_nthw, hfu->v3.hfu_rcp[index + i].ttl_wr);
+ nthw_hfu_rcp_ttl_pos_dyn(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].ttl_pos_dyn);
- hfu_nthw_rcp_ttl_pos_ofs(be->p_hfu_nthw,
+ nthw_hfu_rcp_ttl_pos_ofs(be->p_hfu_nthw,
hfu->v3.hfu_rcp[index + i].ttl_pos_ofs);
- hfu_nthw_rcp_flush(be->p_hfu_nthw);
+ nthw_hfu_rcp_flush(be->p_hfu_nthw);
}
}
@@ -1932,19 +1932,19 @@ static int tpe_csu_rcp_flush(void *be_dev, const struct tpe_func_s *csu, int ind
CHECK_DEBUG_ON(be, csu, be->p_csu_nthw);
if (csu->ver >= 1) {
- csu_nthw_rcp_cnt(be->p_csu_nthw, 1);
+ nthw_csu_rcp_cnt(be->p_csu_nthw, 1);
for (int i = 0; i < cnt; i++) {
- csu_nthw_rcp_select(be->p_csu_nthw, index + i);
- csu_nthw_rcp_outer_l3_cmd(be->p_csu_nthw,
+ nthw_csu_rcp_select(be->p_csu_nthw, index + i);
+ nthw_csu_rcp_outer_l3_cmd(be->p_csu_nthw,
csu->v3.csu_rcp[index + i].ol3_cmd);
- csu_nthw_rcp_outer_l4_cmd(be->p_csu_nthw,
+ nthw_csu_rcp_outer_l4_cmd(be->p_csu_nthw,
csu->v3.csu_rcp[index + i].ol4_cmd);
- csu_nthw_rcp_inner_l3_cmd(be->p_csu_nthw,
+ nthw_csu_rcp_inner_l3_cmd(be->p_csu_nthw,
csu->v3.csu_rcp[index + i].il3_cmd);
- csu_nthw_rcp_inner_l4_cmd(be->p_csu_nthw,
+ nthw_csu_rcp_inner_l4_cmd(be->p_csu_nthw,
csu->v3.csu_rcp[index + i].il4_cmd);
- csu_nthw_rcp_flush(be->p_csu_nthw);
+ nthw_csu_rcp_flush(be->p_csu_nthw);
}
}
@@ -2101,14 +2101,14 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
{
uint8_t physical_adapter_no = (uint8_t)p_fpga->p_fpga_info->adapter_no;
- struct info_nthw *pinfonthw = info_nthw_new();
- info_nthw_init(pinfonthw, p_fpga, physical_adapter_no);
+ struct info_nthw *pinfonthw = nthw_info_new();
+ nthw_info_init(pinfonthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_info_nthw = pinfonthw;
/* Init nthw CAT */
- if (cat_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct cat_nthw *pcatnthw = cat_nthw_new();
- cat_nthw_init(pcatnthw, p_fpga, physical_adapter_no);
+ if (nthw_cat_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct cat_nthw *pcatnthw = nthw_cat_new();
+ nthw_cat_init(pcatnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_cat_nthw = pcatnthw;
} else {
@@ -2116,9 +2116,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw KM */
- if (km_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct km_nthw *pkmnthw = km_nthw_new();
- km_nthw_init(pkmnthw, p_fpga, physical_adapter_no);
+ if (nthw_km_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct km_nthw *pkmnthw = nthw_km_new();
+ nthw_km_init(pkmnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_km_nthw = pkmnthw;
} else {
@@ -2126,9 +2126,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw FLM */
- if (flm_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct flm_nthw *pflmnthw = flm_nthw_new();
- flm_nthw_init(pflmnthw, p_fpga, physical_adapter_no);
+ if (nthw_flm_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct flm_nthw *pflmnthw = nthw_flm_new();
+ nthw_flm_init(pflmnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_flm_nthw = pflmnthw;
} else {
@@ -2136,9 +2136,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw IFR */
- if (ifr_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct ifr_nthw *ifrnthw = ifr_nthw_new();
- ifr_nthw_init(ifrnthw, p_fpga, physical_adapter_no);
+ if (nthw_ifr_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct ifr_nthw *ifrnthw = nthw_ifr_new();
+ nthw_ifr_init(ifrnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_ifr_nthw = ifrnthw;
} else {
@@ -2146,9 +2146,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw HSH */
- if (hsh_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct hsh_nthw *phshnthw = hsh_nthw_new();
- hsh_nthw_init(phshnthw, p_fpga, physical_adapter_no);
+ if (nthw_hsh_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct hsh_nthw *phshnthw = nthw_hsh_new();
+ nthw_hsh_init(phshnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_hsh_nthw = phshnthw;
} else {
@@ -2156,9 +2156,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw QSL */
- if (qsl_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct qsl_nthw *pqslnthw = qsl_nthw_new();
- qsl_nthw_init(pqslnthw, p_fpga, physical_adapter_no);
+ if (nthw_qsl_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct qsl_nthw *pqslnthw = nthw_qsl_new();
+ nthw_qsl_init(pqslnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_qsl_nthw = pqslnthw;
} else {
@@ -2166,9 +2166,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw SLC LR */
- if (slc_lr_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct slc_lr_nthw *pslclrnthw = slc_lr_nthw_new();
- slc_lr_nthw_init(pslclrnthw, p_fpga, physical_adapter_no);
+ if (nthw_slc_lr_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct slc_lr_nthw *pslclrnthw = nthw_slc_lr_new();
+ nthw_slc_lr_init(pslclrnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_slc_lr_nthw = pslclrnthw;
} else {
@@ -2176,9 +2176,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw PDB */
- if (pdb_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct pdb_nthw *ppdbnthw = pdb_nthw_new();
- pdb_nthw_init(ppdbnthw, p_fpga, physical_adapter_no);
+ if (nthw_pdb_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct pdb_nthw *ppdbnthw = nthw_pdb_new();
+ nthw_pdb_init(ppdbnthw, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_pdb_nthw = ppdbnthw;
} else {
@@ -2186,9 +2186,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw HFU */
- if (hfu_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct hfu_nthw *ptr = hfu_nthw_new();
- hfu_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_hfu_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct hfu_nthw *ptr = nthw_hfu_new();
+ nthw_hfu_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_hfu_nthw = ptr;
} else {
@@ -2196,9 +2196,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw RPP_LR */
- if (rpp_lr_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct rpp_lr_nthw *ptr = rpp_lr_nthw_new();
- rpp_lr_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_rpp_lr_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct rpp_lr_nthw *ptr = nthw_rpp_lr_new();
+ nthw_rpp_lr_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_rpp_lr_nthw = ptr;
} else {
@@ -2206,9 +2206,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw TX_CPY */
- if (tx_cpy_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct tx_cpy_nthw *ptr = tx_cpy_nthw_new();
- tx_cpy_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_tx_cpy_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct tx_cpy_nthw *ptr = nthw_tx_cpy_new();
+ nthw_tx_cpy_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_tx_cpy_nthw = ptr;
} else {
@@ -2216,9 +2216,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw CSU */
- if (csu_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct csu_nthw *ptr = csu_nthw_new();
- csu_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_csu_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct csu_nthw *ptr = nthw_csu_new();
+ nthw_csu_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_csu_nthw = ptr;
} else {
@@ -2226,9 +2226,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw TX_INS */
- if (tx_ins_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct tx_ins_nthw *ptr = tx_ins_nthw_new();
- tx_ins_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_tx_ins_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct tx_ins_nthw *ptr = nthw_tx_ins_new();
+ nthw_tx_ins_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_tx_ins_nthw = ptr;
} else {
@@ -2236,9 +2236,9 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
}
/* Init nthw TX_RPL */
- if (tx_rpl_nthw_init(NULL, p_fpga, physical_adapter_no) == 0) {
- struct tx_rpl_nthw *ptr = tx_rpl_nthw_new();
- tx_rpl_nthw_init(ptr, p_fpga, physical_adapter_no);
+ if (nthw_tx_rpl_init(NULL, p_fpga, physical_adapter_no) == 0) {
+ struct tx_rpl_nthw *ptr = nthw_tx_rpl_new();
+ nthw_tx_rpl_init(ptr, p_fpga, physical_adapter_no);
be_devs[physical_adapter_no].p_tx_rpl_nthw = ptr;
} else {
@@ -2254,20 +2254,20 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
static void bin_flow_backend_done(void *dev)
{
struct backend_dev_s *be_dev = (struct backend_dev_s *)dev;
- info_nthw_delete(be_dev->p_info_nthw);
- cat_nthw_delete(be_dev->p_cat_nthw);
- km_nthw_delete(be_dev->p_km_nthw);
- flm_nthw_delete(be_dev->p_flm_nthw);
- hsh_nthw_delete(be_dev->p_hsh_nthw);
- qsl_nthw_delete(be_dev->p_qsl_nthw);
- slc_lr_nthw_delete(be_dev->p_slc_lr_nthw);
- pdb_nthw_delete(be_dev->p_pdb_nthw);
- csu_nthw_delete(be_dev->p_csu_nthw);
- hfu_nthw_delete(be_dev->p_hfu_nthw);
- rpp_lr_nthw_delete(be_dev->p_rpp_lr_nthw);
- tx_cpy_nthw_delete(be_dev->p_tx_cpy_nthw);
- tx_ins_nthw_delete(be_dev->p_tx_ins_nthw);
- tx_rpl_nthw_delete(be_dev->p_tx_rpl_nthw);
+ nthw_info_delete(be_dev->p_info_nthw);
+ nthw_cat_delete(be_dev->p_cat_nthw);
+ nthw_km_delete(be_dev->p_km_nthw);
+ nthw_flm_delete(be_dev->p_flm_nthw);
+ nthw_hsh_delete(be_dev->p_hsh_nthw);
+ nthw_qsl_delete(be_dev->p_qsl_nthw);
+ nthw_slc_lr_delete(be_dev->p_slc_lr_nthw);
+ nthw_pdb_delete(be_dev->p_pdb_nthw);
+ nthw_csu_delete(be_dev->p_csu_nthw);
+ nthw_hfu_delete(be_dev->p_hfu_nthw);
+ nthw_rpp_lr_delete(be_dev->p_rpp_lr_nthw);
+ nthw_tx_cpy_delete(be_dev->p_tx_cpy_nthw);
+ nthw_tx_ins_delete(be_dev->p_tx_ins_nthw);
+ nthw_tx_rpl_delete(be_dev->p_tx_rpl_nthw);
}
static const struct flow_backend_ops ops = {
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
index d60dae6912..bc3c9ed8a7 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.c
@@ -13,7 +13,7 @@
#include "flow_nthw_cat.h"
-struct cat_nthw *cat_nthw_new(void)
+struct cat_nthw *nthw_cat_new(void)
{
struct cat_nthw *p = malloc(sizeof(struct cat_nthw));
@@ -23,7 +23,7 @@ struct cat_nthw *cat_nthw_new(void)
return p;
}
-void cat_nthw_delete(struct cat_nthw *p)
+void nthw_cat_delete(struct cat_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -31,12 +31,12 @@ void cat_nthw_delete(struct cat_nthw *p)
}
}
-void cat_nthw_set_debug_mode(struct cat_nthw *p, unsigned int n_debug_mode)
+void nthw_cat_set_debug_mode(struct cat_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_cat, n_debug_mode);
}
-int cat_nthw_init(struct cat_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_cat_init(struct cat_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_CAT, n_instance);
@@ -284,586 +284,586 @@ int cat_nthw_init(struct cat_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
}
/* CFN */
-void cat_nthw_cfn_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_addr, val);
}
-void cat_nthw_cfn_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_cnt, val);
}
-void cat_nthw_cfn_enable(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_enable(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_enable, val);
}
-void cat_nthw_cfn_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_inv, val);
}
-void cat_nthw_cfn_ptc_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_inv, val);
}
-void cat_nthw_cfn_ptc_isl(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_isl(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_isl, val);
}
-void cat_nthw_cfn_ptc_mac(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_mac(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_mac, val);
}
-void cat_nthw_cfn_ptc_l2(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_l2(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_l2, val);
}
-void cat_nthw_cfn_ptc_vn_tag(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_vn_tag(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_vn_tag, val);
}
-void cat_nthw_cfn_ptc_vlan(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_vlan(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_vlan, val);
}
-void cat_nthw_cfn_ptc_mpls(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_mpls(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_mpls, val);
}
-void cat_nthw_cfn_ptc_l3(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_l3(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_l3, val);
}
-void cat_nthw_cfn_ptc_frag(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_frag(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_frag, val);
}
-void cat_nthw_cfn_ptc_ip_prot(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_ip_prot(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_ip_prot, val);
}
-void cat_nthw_cfn_ptc_l4(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_l4(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_l4, val);
}
-void cat_nthw_cfn_ptc_tunnel(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tunnel(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tunnel, val);
}
-void cat_nthw_cfn_ptc_tnl_l2(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_l2(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_l2, val);
}
-void cat_nthw_cfn_ptc_tnl_vlan(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_vlan(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_vlan, val);
}
-void cat_nthw_cfn_ptc_tnl_mpls(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_mpls(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_mpls, val);
}
-void cat_nthw_cfn_ptc_tnl_l3(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_l3(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_l3, val);
}
-void cat_nthw_cfn_ptc_tnl_frag(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_frag(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_frag, val);
}
-void cat_nthw_cfn_ptc_tnl_ip_prot(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_ip_prot(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_ip_prot, val);
}
-void cat_nthw_cfn_ptc_tnl_l4(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_tnl_l4(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_ptc_tnl_l4, val);
}
-void cat_nthw_cfn_ptc_cfp(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_ptc_cfp(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_ptc_cfp);
nthw_field_set_val32(p->mp_cfn_data_ptc_cfp, val);
}
-void cat_nthw_cfn_err_l3_cs(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_l3_cs(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_l3_cs);
nthw_field_set_val32(p->mp_cfn_data_err_l3_cs, val);
}
-void cat_nthw_cfn_err_l4_cs(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_l4_cs(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_l4_cs);
nthw_field_set_val32(p->mp_cfn_data_err_l4_cs, val);
}
-void cat_nthw_cfn_err_tnl_l3_cs(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_tnl_l3_cs(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_tnl_l3_cs);
nthw_field_set_val32(p->mp_cfn_data_err_tnl_l3_cs, val);
}
-void cat_nthw_cfn_err_tnl_l4_cs(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_tnl_l4_cs(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_tnl_l4_cs);
nthw_field_set_val32(p->mp_cfn_data_err_tnl_l4_cs, val);
}
-void cat_nthw_cfn_err_ttl_exp(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_ttl_exp(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_ttl_exp);
nthw_field_set_val32(p->mp_cfn_data_err_ttl_exp, val);
}
-void cat_nthw_cfn_err_tnl_ttl_exp(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_tnl_ttl_exp(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_err_tnl_ttl_exp);
nthw_field_set_val32(p->mp_cfn_data_err_tnl_ttl_exp, val);
}
-void cat_nthw_cfn_err_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_err_inv, val);
}
-void cat_nthw_cfn_err_cv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_cv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_err_cv, val);
}
-void cat_nthw_cfn_err_fcs(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_fcs(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_err_fcs, val);
}
-void cat_nthw_cfn_err_trunc(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_err_trunc(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_err_trunc, val);
}
-void cat_nthw_cfn_mac_port(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_mac_port(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_mac_port, val);
}
-void cat_nthw_cfn_pm_cmp(const struct cat_nthw *p, const uint32_t *val)
+void nthw_cat_cfn_pm_cmp(const struct cat_nthw *p, const uint32_t *val)
{
nthw_field_set_val(p->mp_cfn_data_pm_cmp, val, p->mp_cfn_data_pm_cmp->mn_words);
}
-void cat_nthw_cfn_pm_dct(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_dct(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_dct, val);
}
-void cat_nthw_cfn_pm_ext_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_ext_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_ext_inv, val);
}
-void cat_nthw_cfn_pm_cmb(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_cmb(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_cmb, val);
}
-void cat_nthw_cfn_pm_and_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_and_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_and_inv, val);
}
-void cat_nthw_cfn_pm_or_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_or_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_or_inv, val);
}
-void cat_nthw_cfn_pm_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_pm_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_pm_inv, val);
}
-void cat_nthw_cfn_lc(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_lc(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_lc, val);
}
-void cat_nthw_cfn_lc_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_lc_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_lc_inv, val);
}
-void cat_nthw_cfn_km0_or(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_km0_or(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cfn_data_km0_or, val);
}
-void cat_nthw_cfn_km1_or(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cfn_km1_or(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cfn_data_km1_or);
nthw_field_set_val32(p->mp_cfn_data_km1_or, val);
}
-void cat_nthw_cfn_flush(const struct cat_nthw *p)
+void nthw_cat_cfn_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_cfn_ctrl, 1);
nthw_register_flush(p->mp_cfn_data, 1);
}
-void cat_nthw_kce_select(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kce_select(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kce_addr[index], val);
}
-void cat_nthw_kce_cnt(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kce_cnt(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kce_cnt[index], val);
}
-void cat_nthw_kce_enable(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kce_enable(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kce_data_enable[index], val);
}
-void cat_nthw_kce_flush(const struct cat_nthw *p, int index)
+void nthw_cat_kce_flush(const struct cat_nthw *p, int index)
{
nthw_register_flush(p->mp_kce_ctrl[index], 1);
nthw_register_flush(p->mp_kce_data[index], 1);
}
-void cat_nthw_kcs_select(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kcs_select(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kcs_addr[index], val);
}
-void cat_nthw_kcs_cnt(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kcs_cnt(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kcs_cnt[index], val);
}
-void cat_nthw_kcs_category(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_kcs_category(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_kcs_data_category[index], val);
}
-void cat_nthw_kcs_flush(const struct cat_nthw *p, int index)
+void nthw_cat_kcs_flush(const struct cat_nthw *p, int index)
{
nthw_register_flush(p->mp_kcs_ctrl[index], 1);
nthw_register_flush(p->mp_kcs_data[index], 1);
}
-void cat_nthw_fte_select(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_fte_select(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_fte_addr[index], val);
}
-void cat_nthw_fte_cnt(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_fte_cnt(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_fte_cnt[index], val);
}
-void cat_nthw_fte_enable(const struct cat_nthw *p, int index, uint32_t val)
+void nthw_cat_fte_enable(const struct cat_nthw *p, int index, uint32_t val)
{
nthw_field_set_val32(p->mp_fte_data_enable[index], val);
}
-void cat_nthw_fte_flush(const struct cat_nthw *p, int index)
+void nthw_cat_fte_flush(const struct cat_nthw *p, int index)
{
nthw_register_flush(p->mp_fte_ctrl[index], 1);
nthw_register_flush(p->mp_fte_data[index], 1);
}
-void cat_nthw_cte_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_addr, val);
}
-void cat_nthw_cte_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_cnt, val);
}
-void cat_nthw_cte_enable_col(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_col(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_col, val);
}
-void cat_nthw_cte_enable_cor(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_cor(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_cor, val);
}
-void cat_nthw_cte_enable_hsh(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_hsh(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_hsh, val);
}
-void cat_nthw_cte_enable_qsl(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_qsl(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_qsl, val);
}
-void cat_nthw_cte_enable_ipf(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_ipf(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_ipf, val);
}
-void cat_nthw_cte_enable_slc(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_slc(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_slc, val);
}
-void cat_nthw_cte_enable_pdb(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_pdb(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cte_data_pdb, val);
}
-void cat_nthw_cte_enable_msk(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_msk(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cte_data_msk);
nthw_field_set_val32(p->mp_cte_data_msk, val);
}
-void cat_nthw_cte_enable_hst(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_hst(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cte_data_hst);
nthw_field_set_val32(p->mp_cte_data_hst, val);
}
-void cat_nthw_cte_enable_epp(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_epp(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cte_data_epp);
nthw_field_set_val32(p->mp_cte_data_epp, val);
}
-void cat_nthw_cte_enable_tpe(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cte_enable_tpe(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_cte_data_tpe);
nthw_field_set_val32(p->mp_cte_data_tpe, val);
}
-void cat_nthw_cte_flush(const struct cat_nthw *p)
+void nthw_cat_cte_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_cte_ctrl, 1);
nthw_register_flush(p->mp_cte_data, 1);
}
-void cat_nthw_cts_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cts_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cts_addr, val);
}
-void cat_nthw_cts_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cts_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cts_cnt, val);
}
-void cat_nthw_cts_cat_a(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cts_cat_a(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cts_data_cat_a, val);
}
-void cat_nthw_cts_cat_b(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cts_cat_b(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cts_data_cat_b, val);
}
-void cat_nthw_cts_flush(const struct cat_nthw *p)
+void nthw_cat_cts_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_cts_ctrl, 1);
nthw_register_flush(p->mp_cts_data, 1);
}
-void cat_nthw_cot_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cot_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cot_addr, val);
}
-void cat_nthw_cot_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cot_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cot_cnt, val);
}
-void cat_nthw_cot_color(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cot_color(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cot_data_color, val);
}
-void cat_nthw_cot_km(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cot_km(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cot_data_km, val);
}
-void cat_nthw_cot_flush(const struct cat_nthw *p)
+void nthw_cat_cot_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_cot_ctrl, 1);
nthw_register_flush(p->mp_cot_data, 1);
}
-void cat_nthw_cct_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cct_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cct_addr, val);
}
-void cat_nthw_cct_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cct_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cct_cnt, val);
}
-void cat_nthw_cct_color(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cct_color(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cct_data_color, val);
}
-void cat_nthw_cct_km(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_cct_km(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cct_data_km, val);
}
-void cat_nthw_cct_flush(const struct cat_nthw *p)
+void nthw_cat_cct_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_cct_ctrl, 1);
nthw_register_flush(p->mp_cct_data, 1);
}
-void cat_nthw_exo_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_exo_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_exo_addr, val);
}
-void cat_nthw_exo_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_exo_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_exo_cnt, val);
}
-void cat_nthw_exo_dyn(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_exo_dyn(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_exo_data_dyn, val);
}
-void cat_nthw_exo_ofs(const struct cat_nthw *p, int32_t val)
+void nthw_cat_exo_ofs(const struct cat_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_exo_data_ofs, val);
}
-void cat_nthw_exo_flush(const struct cat_nthw *p)
+void nthw_cat_exo_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_exo_ctrl, 1);
nthw_register_flush(p->mp_exo_data, 1);
}
-void cat_nthw_rck_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_rck_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rck_addr, val);
}
-void cat_nthw_rck_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_rck_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rck_cnt, val);
}
-void cat_nthw_rck_data(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_rck_data(const struct cat_nthw *p, uint32_t val)
{
nthw_register_set_val(p->mp_rck_data, &val, 1);
nthw_register_make_dirty(p->mp_rck_data);
}
-void cat_nthw_rck_flush(const struct cat_nthw *p)
+void nthw_cat_rck_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_rck_ctrl, 1);
nthw_register_flush(p->mp_rck_data, 1);
}
-void cat_nthw_len_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_select(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_addr, val);
}
-void cat_nthw_len_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_cnt(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_cnt, val);
}
-void cat_nthw_len_lower(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_lower(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_data_lower, val);
}
-void cat_nthw_len_upper(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_upper(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_data_upper, val);
}
-void cat_nthw_len_dyn1(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_dyn1(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_data_dyn1, val);
}
-void cat_nthw_len_dyn2(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_dyn2(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_data_dyn2, val);
}
-void cat_nthw_len_inv(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_len_inv(const struct cat_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_len_data_inv, val);
}
-void cat_nthw_len_flush(const struct cat_nthw *p)
+void nthw_cat_len_flush(const struct cat_nthw *p)
{
nthw_register_flush(p->mp_len_ctrl, 1);
nthw_register_flush(p->mp_len_data, 1);
}
-void cat_nthw_kcc_select(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_kcc_select(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_kcc_addr);
nthw_field_set_val32(p->mp_kcc_addr, val);
}
-void cat_nthw_kcc_cnt(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_kcc_cnt(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_kcc_cnt);
nthw_field_set_val32(p->mp_kcc_cnt, val);
}
-void cat_nthw_kcc_key(const struct cat_nthw *p, uint32_t *val)
+void nthw_cat_kcc_key(const struct cat_nthw *p, uint32_t *val)
{
RTE_ASSERT(p->mp_kcc_data_key);
nthw_field_set_val(p->mp_kcc_data_key, val, 2);
}
-void cat_nthw_kcc_category(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_kcc_category(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_kcc_data_category);
nthw_field_set_val32(p->mp_kcc_data_category, val);
}
-void cat_nthw_kcc_id(const struct cat_nthw *p, uint32_t val)
+void nthw_cat_kcc_id(const struct cat_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_kcc_data_id);
nthw_field_set_val32(p->mp_kcc_data_id, val);
}
-void cat_nthw_kcc_flush(const struct cat_nthw *p)
+void nthw_cat_kcc_flush(const struct cat_nthw *p)
{
RTE_ASSERT(p->mp_kcc_ctrl);
RTE_ASSERT(p->mp_kcc_data);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
index 29f9a332f1..13dddfd96e 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_cat.h
@@ -14,136 +14,136 @@ struct cat_nthw;
typedef struct cat_nthw cat_nthw_t;
-struct cat_nthw *cat_nthw_new(void);
-void cat_nthw_delete(struct cat_nthw *p);
-int cat_nthw_init(struct cat_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct cat_nthw *nthw_cat_new(void);
+void nthw_cat_delete(struct cat_nthw *p);
+int nthw_cat_init(struct cat_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int cat_nthw_setup(struct cat_nthw *p, int n_idx, int n_idx_cnt);
-void cat_nthw_set_debug_mode(struct cat_nthw *p, unsigned int n_debug_mode);
+void nthw_cat_set_debug_mode(struct cat_nthw *p, unsigned int n_debug_mode);
/* CFN */
-void cat_nthw_cfn_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_enable(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_isl(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_cfp(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_mac(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_l2(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_vn_tag(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_vlan(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_mpls(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_l3(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_frag(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_ip_prot(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_l4(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tunnel(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_l2(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_vlan(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_mpls(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_l3(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_frag(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_ip_prot(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_ptc_tnl_l4(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_cv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_fcs(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_trunc(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_l3_cs(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_l4_cs(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_tnl_l3_cs(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_tnl_l4_cs(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_ttl_exp(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_err_tnl_ttl_exp(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_mac_port(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_cmp(const struct cat_nthw *p, const uint32_t *val);
-void cat_nthw_cfn_pm_dct(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_ext_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_cmb(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_and_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_or_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_pm_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_lc(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_lc_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_km0_or(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_km1_or(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cfn_flush(const struct cat_nthw *p);
+void nthw_cat_cfn_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_enable(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_isl(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_cfp(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_mac(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_l2(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_vn_tag(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_vlan(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_mpls(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_l3(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_frag(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_ip_prot(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_l4(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tunnel(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_l2(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_vlan(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_mpls(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_l3(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_frag(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_ip_prot(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_ptc_tnl_l4(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_cv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_fcs(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_trunc(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_l3_cs(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_l4_cs(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_tnl_l3_cs(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_tnl_l4_cs(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_ttl_exp(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_err_tnl_ttl_exp(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_mac_port(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_cmp(const struct cat_nthw *p, const uint32_t *val);
+void nthw_cat_cfn_pm_dct(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_ext_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_cmb(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_and_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_or_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_pm_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_lc(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_lc_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_km0_or(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_km1_or(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cfn_flush(const struct cat_nthw *p);
/* KCE 0/1 */
-void cat_nthw_kce_select(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kce_cnt(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kce_enable(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kce_flush(const struct cat_nthw *p, int index);
+void nthw_cat_kce_select(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kce_cnt(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kce_enable(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kce_flush(const struct cat_nthw *p, int index);
/* KCS 0/1 */
-void cat_nthw_kcs_select(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kcs_cnt(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kcs_category(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_kcs_flush(const struct cat_nthw *p, int index);
+void nthw_cat_kcs_select(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kcs_cnt(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kcs_category(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_kcs_flush(const struct cat_nthw *p, int index);
/* FTE 0/1 */
-void cat_nthw_fte_select(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_fte_cnt(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_fte_enable(const struct cat_nthw *p, int index, uint32_t val);
-void cat_nthw_fte_flush(const struct cat_nthw *p, int index);
+void nthw_cat_fte_select(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_fte_cnt(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_fte_enable(const struct cat_nthw *p, int index, uint32_t val);
+void nthw_cat_fte_flush(const struct cat_nthw *p, int index);
/* CTE */
-void cat_nthw_cte_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_col(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_cor(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_hsh(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_qsl(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_ipf(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_slc(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_pdb(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_msk(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_hst(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_epp(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_enable_tpe(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cte_flush(const struct cat_nthw *p);
+void nthw_cat_cte_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_col(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_cor(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_hsh(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_qsl(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_ipf(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_slc(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_pdb(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_msk(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_hst(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_epp(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_enable_tpe(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cte_flush(const struct cat_nthw *p);
/* CTS */
-void cat_nthw_cts_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cts_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cts_flush(const struct cat_nthw *p);
-void cat_nthw_cts_cat_a(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cts_cat_b(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cts_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cts_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cts_flush(const struct cat_nthw *p);
+void nthw_cat_cts_cat_a(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cts_cat_b(const struct cat_nthw *p, uint32_t val);
/* COT */
-void cat_nthw_cot_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cot_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cot_color(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cot_km(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cot_flush(const struct cat_nthw *p);
+void nthw_cat_cot_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cot_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cot_color(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cot_km(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cot_flush(const struct cat_nthw *p);
/* CCT */
-void cat_nthw_cct_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cct_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cct_color(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cct_km(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_cct_flush(const struct cat_nthw *p);
+void nthw_cat_cct_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cct_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cct_color(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cct_km(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_cct_flush(const struct cat_nthw *p);
/* EXO */
-void cat_nthw_exo_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_exo_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_exo_dyn(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_exo_ofs(const struct cat_nthw *p, int32_t val);
-void cat_nthw_exo_flush(const struct cat_nthw *p);
+void nthw_cat_exo_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_exo_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_exo_dyn(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_exo_ofs(const struct cat_nthw *p, int32_t val);
+void nthw_cat_exo_flush(const struct cat_nthw *p);
/* RCK */
-void cat_nthw_rck_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_rck_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_rck_data(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_rck_flush(const struct cat_nthw *p);
+void nthw_cat_rck_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_rck_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_rck_data(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_rck_flush(const struct cat_nthw *p);
/* LEN */
-void cat_nthw_len_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_lower(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_upper(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_dyn1(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_dyn2(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_inv(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_len_flush(const struct cat_nthw *p);
+void nthw_cat_len_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_lower(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_upper(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_dyn1(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_dyn2(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_inv(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_len_flush(const struct cat_nthw *p);
/* KCC */
-void cat_nthw_kcc_select(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_kcc_cnt(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_kcc_key(const struct cat_nthw *p, uint32_t *val);
-void cat_nthw_kcc_category(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_kcc_id(const struct cat_nthw *p, uint32_t val);
-void cat_nthw_kcc_flush(const struct cat_nthw *p);
+void nthw_cat_kcc_select(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_kcc_cnt(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_kcc_key(const struct cat_nthw *p, uint32_t *val);
+void nthw_cat_kcc_category(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_kcc_id(const struct cat_nthw *p, uint32_t val);
+void nthw_cat_kcc_flush(const struct cat_nthw *p);
struct cat_nthw {
uint8_t m_physical_adapter_no;
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
index 4ad169b943..6054b611cd 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.c
@@ -12,12 +12,12 @@
#include "flow_nthw_csu.h"
-void csu_nthw_set_debug_mode(struct csu_nthw *p, unsigned int n_debug_mode)
+void nthw_csu_set_debug_mode(struct csu_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_csu, n_debug_mode);
}
-struct csu_nthw *csu_nthw_new(void)
+struct csu_nthw *nthw_csu_new(void)
{
struct csu_nthw *p = malloc(sizeof(struct csu_nthw));
@@ -27,7 +27,7 @@ struct csu_nthw *csu_nthw_new(void)
return p;
}
-void csu_nthw_delete(struct csu_nthw *p)
+void nthw_csu_delete(struct csu_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -35,7 +35,7 @@ void csu_nthw_delete(struct csu_nthw *p)
}
}
-int csu_nthw_init(struct csu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_csu_init(struct csu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_CSU, n_instance);
@@ -66,17 +66,17 @@ int csu_nthw_init(struct csu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void csu_nthw_rcp_select(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_select(const struct csu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_adr, val);
}
-void csu_nthw_rcp_cnt(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_cnt(const struct csu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_cnt, val);
}
-void csu_nthw_rcp_outer_l3_cmd(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_outer_l3_cmd(const struct csu_nthw *p, uint32_t val)
{
/*
* Select L3 calc method for outer layer3.
@@ -88,7 +88,7 @@ void csu_nthw_rcp_outer_l3_cmd(const struct csu_nthw *p, uint32_t val)
nthw_field_set_val32(p->mp_rcp_data_ol3_cmd, val);
}
-void csu_nthw_rcp_outer_l4_cmd(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_outer_l4_cmd(const struct csu_nthw *p, uint32_t val)
{
/*
* Select L4 calc method for outer layer4.
@@ -105,7 +105,7 @@ void csu_nthw_rcp_outer_l4_cmd(const struct csu_nthw *p, uint32_t val)
nthw_field_set_val32(p->mp_rcp_data_ol4_cmd, val);
}
-void csu_nthw_rcp_inner_l3_cmd(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_inner_l3_cmd(const struct csu_nthw *p, uint32_t val)
{
/*
* Select L3 calc method for inner layer3 (tunneled).
@@ -117,7 +117,7 @@ void csu_nthw_rcp_inner_l3_cmd(const struct csu_nthw *p, uint32_t val)
nthw_field_set_val32(p->mp_rcp_data_il3_cmd, val);
}
-void csu_nthw_rcp_inner_l4_cmd(const struct csu_nthw *p, uint32_t val)
+void nthw_csu_rcp_inner_l4_cmd(const struct csu_nthw *p, uint32_t val)
{
/*
* Select L4 calc method for inner layer4 (tunneled).
@@ -134,7 +134,7 @@ void csu_nthw_rcp_inner_l4_cmd(const struct csu_nthw *p, uint32_t val)
nthw_field_set_val32(p->mp_rcp_data_il4_cmd, val);
}
-void csu_nthw_rcp_flush(const struct csu_nthw *p)
+void nthw_csu_rcp_flush(const struct csu_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
index 91a0926318..0f94761d41 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_csu.h
@@ -26,19 +26,19 @@ struct csu_nthw {
nthw_field_t *mp_rcp_data_il4_cmd;
};
-struct csu_nthw *csu_nthw_new(void);
-void csu_nthw_delete(struct csu_nthw *p);
-int csu_nthw_init(struct csu_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct csu_nthw *nthw_csu_new(void);
+void nthw_csu_delete(struct csu_nthw *p);
+int nthw_csu_init(struct csu_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int csu_nthw_setup(struct csu_nthw *p, int n_idx, int n_idx_cnt);
-void csu_nthw_set_debug_mode(struct csu_nthw *p, unsigned int n_debug_mode);
-
-void csu_nthw_rcp_select(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_cnt(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_outer_l3_cmd(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_outer_l4_cmd(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_inner_l3_cmd(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_inner_l4_cmd(const struct csu_nthw *p, uint32_t val);
-void csu_nthw_rcp_flush(const struct csu_nthw *p);
+void nthw_csu_set_debug_mode(struct csu_nthw *p, unsigned int n_debug_mode);
+
+void nthw_csu_rcp_select(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_cnt(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_outer_l3_cmd(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_outer_l4_cmd(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_inner_l3_cmd(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_inner_l4_cmd(const struct csu_nthw *p, uint32_t val);
+void nthw_csu_rcp_flush(const struct csu_nthw *p);
#endif /* _FLOW_NTHW_CSU_H_ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
index 372f735c2b..0fa6d918ae 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.c
@@ -15,7 +15,7 @@
#include "flow_nthw_flm.h"
-struct flm_nthw *flm_nthw_new(void)
+struct flm_nthw *nthw_flm_new(void)
{
struct flm_nthw *p = malloc(sizeof(struct flm_nthw));
@@ -25,7 +25,7 @@ struct flm_nthw *flm_nthw_new(void)
return p;
}
-void flm_nthw_delete(struct flm_nthw *p)
+void nthw_flm_delete(struct flm_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -33,12 +33,12 @@ void flm_nthw_delete(struct flm_nthw *p)
}
}
-void flm_nthw_set_debug_mode(struct flm_nthw *p, unsigned int n_debug_mode)
+void nthw_flm_set_debug_mode(struct flm_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_flm, n_debug_mode);
}
-int flm_nthw_init(struct flm_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_flm_init(struct flm_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_FLM, n_instance);
@@ -270,94 +270,94 @@ int flm_nthw_init(struct flm_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void flm_nthw_control_enable(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_enable(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_enable, val);
}
-void flm_nthw_control_init(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_init(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_init, val);
}
-void flm_nthw_control_lds(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_lds(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_lds, val);
}
-void flm_nthw_control_lfs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_lfs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_lfs, val);
}
-void flm_nthw_control_lis(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_lis(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_lis, val);
}
-void flm_nthw_control_uds(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_uds(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_uds, val);
}
-void flm_nthw_control_uis(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_uis(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_uis, val);
}
-void flm_nthw_control_rds(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_rds(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_rds, val);
}
-void flm_nthw_control_ris(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_ris(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_ris, val);
}
-void flm_nthw_control_pds(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_pds(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_control_pds);
nthw_field_set_val32(p->mp_control_pds, val);
}
-void flm_nthw_control_pis(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_pis(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_control_pis);
nthw_field_set_val32(p->mp_control_pis, val);
}
-void flm_nthw_control_crcwr(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_crcwr(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_crcwr, val);
}
-void flm_nthw_control_crcrd(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_crcrd(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_crcrd, val);
}
-void flm_nthw_control_rbl(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_rbl(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_rbl, val);
}
-void flm_nthw_control_eab(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_eab(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_eab, val);
}
-void flm_nthw_control_split_sdram_usage(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_control_split_sdram_usage(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_control_split_sdram_usage, val);
}
-void flm_nthw_control_flush(const struct flm_nthw *p)
+void nthw_flm_control_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_control, 1);
}
-void flm_nthw_status_calib_success(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_calib_success(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get) {
uint32_t w = nthw_field_get_bit_width(p->mp_status_calib_success);
@@ -371,25 +371,25 @@ void flm_nthw_status_calib_success(const struct flm_nthw *p, uint32_t *val, int
}
}
-void flm_nthw_status_calib_fail(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_calib_fail(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_calib_fail);
}
-void flm_nthw_status_initdone(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_initdone(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_initdone);
}
-void flm_nthw_status_idle(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_idle(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_idle);
}
-void flm_nthw_status_critical(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_critical(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_critical);
@@ -398,7 +398,7 @@ void flm_nthw_status_critical(const struct flm_nthw *p, uint32_t *val, int get)
nthw_field_set_val32(p->mp_status_critical, *val);
}
-void flm_nthw_status_panic(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_panic(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_panic);
@@ -407,7 +407,7 @@ void flm_nthw_status_panic(const struct flm_nthw *p, uint32_t *val, int get)
nthw_field_set_val32(p->mp_status_panic, *val);
}
-void flm_nthw_status_crcerr(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_crcerr(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_crcerr);
@@ -416,13 +416,13 @@ void flm_nthw_status_crcerr(const struct flm_nthw *p, uint32_t *val, int get)
nthw_field_set_val32(p->mp_status_crcerr, *val);
}
-void flm_nthw_status_eft_bp(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_eft_bp(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_eft_bp);
}
-void flm_nthw_status_cache_buf_crit(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_status_cache_buf_crit(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_status_cache_buf_critical);
@@ -431,246 +431,246 @@ void flm_nthw_status_cache_buf_crit(const struct flm_nthw *p, uint32_t *val, int
nthw_field_set_val32(p->mp_status_cache_buf_critical, *val);
}
-void flm_nthw_status_flush(const struct flm_nthw *p)
+void nthw_flm_status_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_status, 1);
}
-void flm_nthw_status_update(const struct flm_nthw *p)
+void nthw_flm_status_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_status);
}
-void flm_nthw_scan_i(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scan_i(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_scan_i, val);
}
-void flm_nthw_scan_flush(const struct flm_nthw *p)
+void nthw_flm_scan_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_scan, 1);
}
-void flm_nthw_load_bin(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_load_bin(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_load_bin_bin, val);
}
-void flm_nthw_load_bin_flush(const struct flm_nthw *p)
+void nthw_flm_load_bin_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_load_bin, 1);
}
-void flm_nthw_load_lps_update(const struct flm_nthw *p)
+void nthw_flm_load_lps_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_load_lps);
}
-void flm_nthw_load_lps_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_load_lps_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_load_lps_lps);
}
-void flm_nthw_load_aps_update(const struct flm_nthw *p)
+void nthw_flm_load_aps_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_load_aps);
}
-void flm_nthw_load_aps_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_load_aps_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_load_aps_aps);
}
-void flm_nthw_prio_limit0(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_limit0(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_limit0, val);
}
-void flm_nthw_prio_ft0(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_ft0(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_ft0, val);
}
-void flm_nthw_prio_limit1(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_limit1(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_limit1, val);
}
-void flm_nthw_prio_ft1(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_ft1(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_ft1, val);
}
-void flm_nthw_prio_limit2(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_limit2(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_limit2, val);
}
-void flm_nthw_prio_ft2(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_ft2(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_ft2, val);
}
-void flm_nthw_prio_limit3(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_limit3(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_limit3, val);
}
-void flm_nthw_prio_ft3(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_prio_ft3(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_prio_ft3, val);
}
-void flm_nthw_prio_flush(const struct flm_nthw *p)
+void nthw_flm_prio_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_prio, 1);
}
-void flm_nthw_pst_select(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_pst_select(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_pst_ctrl_adr, val);
}
-void flm_nthw_pst_cnt(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_pst_cnt(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_pst_ctrl_cnt, val);
}
-void flm_nthw_pst_bp(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_pst_bp(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_pst_data_bp, val);
}
-void flm_nthw_pst_pp(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_pst_pp(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_pst_data_pp, val);
}
-void flm_nthw_pst_tp(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_pst_tp(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_pst_data_tp, val);
}
-void flm_nthw_pst_flush(const struct flm_nthw *p)
+void nthw_flm_pst_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_pst_ctrl, 1);
nthw_register_flush(p->mp_pst_data, 1);
}
-void flm_nthw_rcp_select(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_select(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_adr, val);
}
-void flm_nthw_rcp_cnt(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_cnt(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_cnt, val);
}
-void flm_nthw_rcp_lookup(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_lookup(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_lookup, val);
}
-void flm_nthw_rcp_qw0_dyn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_qw0_dyn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_dyn, val);
}
-void flm_nthw_rcp_qw0_ofs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_qw0_ofs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_ofs, val);
}
-void flm_nthw_rcp_qw0_sel(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_qw0_sel(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_sel, val);
}
-void flm_nthw_rcp_qw4_dyn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_qw4_dyn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_dyn, val);
}
-void flm_nthw_rcp_qw4_ofs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_qw4_ofs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_ofs, val);
}
-void flm_nthw_rcp_sw8_dyn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_sw8_dyn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw8_dyn, val);
}
-void flm_nthw_rcp_sw8_ofs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_sw8_ofs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw8_ofs, val);
}
-void flm_nthw_rcp_sw8_sel(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_sw8_sel(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw8_sel, val);
}
-void flm_nthw_rcp_sw9_dyn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_sw9_dyn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw9_dyn, val);
}
-void flm_nthw_rcp_sw9_ofs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_sw9_ofs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw9_ofs, val);
}
-void flm_nthw_rcp_mask(const struct flm_nthw *p, const uint32_t *val)
+void nthw_flm_rcp_mask(const struct flm_nthw *p, const uint32_t *val)
{
nthw_field_set_val(p->mp_rcp_data_mask, val, 10);
}
-void flm_nthw_rcp_kid(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_kid(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_kid, val);
}
-void flm_nthw_rcp_opn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_opn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_opn, val);
}
-void flm_nthw_rcp_ipn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_ipn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ipn, val);
}
-void flm_nthw_rcp_byt_dyn(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_byt_dyn(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_byt_dyn, val);
}
-void flm_nthw_rcp_byt_ofs(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_byt_ofs(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_byt_ofs, val);
}
-void flm_nthw_rcp_txplm(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_txplm(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_txplm, val);
}
-void flm_nthw_rcp_auto_ipv4_mask(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_rcp_auto_ipv4_mask(const struct flm_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_auto_ipv4_mask, val);
}
-void flm_nthw_rcp_flush(const struct flm_nthw *p)
+void nthw_flm_rcp_flush(const struct flm_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
}
-int flm_nthw_buf_ctrl_update(const struct flm_nthw *p, uint32_t *lrn_free, uint32_t *inf_avail,
+int nthw_flm_buf_ctrl_update(const struct flm_nthw *p, uint32_t *lrn_free, uint32_t *inf_avail,
uint32_t *sta_avail)
{
int ret = -1;
@@ -708,7 +708,7 @@ int flm_nthw_buf_ctrl_update(const struct flm_nthw *p, uint32_t *lrn_free, uint3
return ret;
}
-int flm_nthw_lrn_data_flush(const struct flm_nthw *p, const uint32_t *data, uint32_t records,
+int nthw_flm_lrn_data_flush(const struct flm_nthw *p, const uint32_t *data, uint32_t records,
uint32_t words_per_record, uint32_t *handled_records,
uint32_t *lrn_free, uint32_t *inf_avail, uint32_t *sta_avail)
{
@@ -807,7 +807,7 @@ int flm_nthw_lrn_data_flush(const struct flm_nthw *p, const uint32_t *data, uint
return 0;
}
-int flm_nthw_inf_sta_data_update(const struct flm_nthw *p, uint32_t *inf_data,
+int nthw_flm_inf_sta_data_update(const struct flm_nthw *p, uint32_t *inf_data,
uint32_t inf_word_count, uint32_t *sta_data,
uint32_t sta_word_count, uint32_t *lrn_free, uint32_t *inf_avail,
uint32_t *sta_avail)
@@ -886,62 +886,62 @@ int flm_nthw_inf_sta_data_update(const struct flm_nthw *p, uint32_t *inf_data,
return ret;
}
-void flm_nthw_stat_lrn_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_lrn_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_lrn_done_cnt);
}
-void flm_nthw_stat_lrn_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_lrn_done_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_lrn_done);
}
-void flm_nthw_stat_lrn_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_lrn_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_lrn_ignore_cnt);
}
-void flm_nthw_stat_lrn_ignore_update(const struct flm_nthw *p)
+void nthw_flm_stat_lrn_ignore_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_lrn_ignore);
}
-void flm_nthw_stat_lrn_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_lrn_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_lrn_fail_cnt);
}
-void flm_nthw_stat_lrn_fail_update(const struct flm_nthw *p)
+void nthw_flm_stat_lrn_fail_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_lrn_fail);
}
-void flm_nthw_stat_unl_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_unl_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_unl_done_cnt);
}
-void flm_nthw_stat_unl_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_unl_done_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_unl_done);
}
-void flm_nthw_stat_unl_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_unl_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_unl_ignore_cnt);
}
-void flm_nthw_stat_unl_ignore_update(const struct flm_nthw *p)
+void nthw_flm_stat_unl_ignore_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_unl_ignore);
}
-void flm_nthw_stat_prb_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_prb_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_prb_done_cnt);
@@ -949,13 +949,13 @@ void flm_nthw_stat_prb_done_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_prb_done_cnt);
}
-void flm_nthw_stat_prb_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_prb_done_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_prb_done);
nthw_register_update(p->mp_stat_prb_done);
}
-void flm_nthw_stat_prb_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_prb_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_prb_ignore_cnt);
@@ -963,90 +963,90 @@ void flm_nthw_stat_prb_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int g
*val = nthw_field_get_val32(p->mp_stat_prb_ignore_cnt);
}
-void flm_nthw_stat_prb_ignore_update(const struct flm_nthw *p)
+void nthw_flm_stat_prb_ignore_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_prb_ignore);
nthw_register_update(p->mp_stat_prb_ignore);
}
-void flm_nthw_stat_rel_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_rel_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_rel_done_cnt);
}
-void flm_nthw_stat_rel_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_rel_done_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_rel_done);
}
-void flm_nthw_stat_rel_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_rel_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_rel_ignore_cnt);
}
-void flm_nthw_stat_rel_ignore_update(const struct flm_nthw *p)
+void nthw_flm_stat_rel_ignore_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_rel_ignore);
}
-void flm_nthw_stat_aul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_aul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_aul_done_cnt);
}
-void flm_nthw_stat_aul_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_aul_done_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_aul_done);
}
-void flm_nthw_stat_aul_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_aul_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_aul_ignore_cnt);
}
-void flm_nthw_stat_aul_ignore_update(const struct flm_nthw *p)
+void nthw_flm_stat_aul_ignore_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_aul_ignore);
}
-void flm_nthw_stat_aul_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_aul_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_aul_fail_cnt);
}
-void flm_nthw_stat_aul_fail_update(const struct flm_nthw *p)
+void nthw_flm_stat_aul_fail_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_aul_fail);
}
-void flm_nthw_stat_tul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_tul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_tul_done_cnt);
}
-void flm_nthw_stat_tul_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_tul_done_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_tul_done);
}
-void flm_nthw_stat_flows_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_flows_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_stat_flows_cnt);
}
-void flm_nthw_stat_flows_update(const struct flm_nthw *p)
+void nthw_flm_stat_flows_update(const struct flm_nthw *p)
{
nthw_register_update(p->mp_stat_flows);
}
-void flm_nthw_stat_sta_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_sta_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_sta_done_cnt);
@@ -1054,13 +1054,13 @@ void flm_nthw_stat_sta_done_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_sta_done_cnt);
}
-void flm_nthw_stat_sta_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_sta_done_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_sta_done);
nthw_register_update(p->mp_stat_sta_done);
}
-void flm_nthw_stat_inf_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_inf_done_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_inf_done_cnt);
@@ -1068,13 +1068,13 @@ void flm_nthw_stat_inf_done_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_inf_done_cnt);
}
-void flm_nthw_stat_inf_done_update(const struct flm_nthw *p)
+void nthw_flm_stat_inf_done_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_inf_done);
nthw_register_update(p->mp_stat_inf_done);
}
-void flm_nthw_stat_inf_skip_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_inf_skip_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_inf_skip_cnt);
@@ -1082,13 +1082,13 @@ void flm_nthw_stat_inf_skip_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_inf_skip_cnt);
}
-void flm_nthw_stat_inf_skip_update(const struct flm_nthw *p)
+void nthw_flm_stat_inf_skip_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_inf_skip);
nthw_register_update(p->mp_stat_inf_skip);
}
-void flm_nthw_stat_pck_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_pck_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_pck_hit_cnt);
@@ -1096,13 +1096,13 @@ void flm_nthw_stat_pck_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
*val = nthw_field_get_val32(p->mp_stat_pck_hit_cnt);
}
-void flm_nthw_stat_pck_hit_update(const struct flm_nthw *p)
+void nthw_flm_stat_pck_hit_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_pck_hit);
nthw_register_update(p->mp_stat_pck_hit);
}
-void flm_nthw_stat_pck_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_pck_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_pck_miss_cnt);
@@ -1110,13 +1110,13 @@ void flm_nthw_stat_pck_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_pck_miss_cnt);
}
-void flm_nthw_stat_pck_miss_update(const struct flm_nthw *p)
+void nthw_flm_stat_pck_miss_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_pck_miss);
nthw_register_update(p->mp_stat_pck_miss);
}
-void flm_nthw_stat_pck_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_pck_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_pck_unh_cnt);
@@ -1124,13 +1124,13 @@ void flm_nthw_stat_pck_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
*val = nthw_field_get_val32(p->mp_stat_pck_unh_cnt);
}
-void flm_nthw_stat_pck_unh_update(const struct flm_nthw *p)
+void nthw_flm_stat_pck_unh_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_pck_unh);
nthw_register_update(p->mp_stat_pck_unh);
}
-void flm_nthw_stat_pck_dis_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_pck_dis_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_pck_dis_cnt);
@@ -1138,13 +1138,13 @@ void flm_nthw_stat_pck_dis_cnt(const struct flm_nthw *p, uint32_t *val, int get)
*val = nthw_field_get_val32(p->mp_stat_pck_dis_cnt);
}
-void flm_nthw_stat_pck_dis_update(const struct flm_nthw *p)
+void nthw_flm_stat_pck_dis_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_pck_dis);
nthw_register_update(p->mp_stat_pck_dis);
}
-void flm_nthw_stat_csh_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_csh_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_csh_hit_cnt);
@@ -1152,13 +1152,13 @@ void flm_nthw_stat_csh_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get)
*val = nthw_field_get_val32(p->mp_stat_csh_hit_cnt);
}
-void flm_nthw_stat_csh_hit_update(const struct flm_nthw *p)
+void nthw_flm_stat_csh_hit_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_csh_hit);
nthw_register_update(p->mp_stat_csh_hit);
}
-void flm_nthw_stat_csh_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_csh_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_csh_miss_cnt);
@@ -1166,13 +1166,13 @@ void flm_nthw_stat_csh_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_csh_miss_cnt);
}
-void flm_nthw_stat_csh_miss_update(const struct flm_nthw *p)
+void nthw_flm_stat_csh_miss_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_csh_miss);
nthw_register_update(p->mp_stat_csh_miss);
}
-void flm_nthw_stat_csh_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_csh_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_csh_unh_cnt);
@@ -1180,13 +1180,13 @@ void flm_nthw_stat_csh_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get)
*val = nthw_field_get_val32(p->mp_stat_csh_unh_cnt);
}
-void flm_nthw_stat_csh_unh_update(const struct flm_nthw *p)
+void nthw_flm_stat_csh_unh_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_csh_unh);
nthw_register_update(p->mp_stat_csh_unh);
}
-void flm_nthw_stat_cuc_start_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_cuc_start_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_cuc_start_cnt);
@@ -1194,13 +1194,13 @@ void flm_nthw_stat_cuc_start_cnt(const struct flm_nthw *p, uint32_t *val, int ge
*val = nthw_field_get_val32(p->mp_stat_cuc_start_cnt);
}
-void flm_nthw_stat_cuc_start_update(const struct flm_nthw *p)
+void nthw_flm_stat_cuc_start_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_cuc_start);
nthw_register_update(p->mp_stat_cuc_start);
}
-void flm_nthw_stat_cuc_move_cnt(const struct flm_nthw *p, uint32_t *val, int get)
+void nthw_flm_stat_cuc_move_cnt(const struct flm_nthw *p, uint32_t *val, int get)
{
RTE_ASSERT(p->mp_stat_cuc_move_cnt);
@@ -1208,49 +1208,49 @@ void flm_nthw_stat_cuc_move_cnt(const struct flm_nthw *p, uint32_t *val, int get
*val = nthw_field_get_val32(p->mp_stat_cuc_move_cnt);
}
-void flm_nthw_stat_cuc_move_update(const struct flm_nthw *p)
+void nthw_flm_stat_cuc_move_update(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_stat_cuc_move);
nthw_register_update(p->mp_stat_cuc_move);
}
-void flm_nthw_scrub_select(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_select(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_ctrl_adr);
nthw_field_set_val32(p->mp_scrub_ctrl_adr, val);
}
-void flm_nthw_scrub_cnt(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_cnt(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_ctrl_cnt);
nthw_field_set_val32(p->mp_scrub_ctrl_cnt, val);
}
-void flm_nthw_scrub_t(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_t(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_data_t);
nthw_field_set_val32(p->mp_scrub_data_t, val);
}
-void flm_nthw_scrub_r(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_r(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_data_r);
nthw_field_set_val32(p->mp_scrub_data_r, val);
}
-void flm_nthw_scrub_del(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_del(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_data_del);
nthw_field_set_val32(p->mp_scrub_data_del, val);
}
-void flm_nthw_scrub_inf(const struct flm_nthw *p, uint32_t val)
+void nthw_flm_scrub_inf(const struct flm_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_scrub_data_inf);
nthw_field_set_val32(p->mp_scrub_data_inf, val);
}
-void flm_nthw_scrub_flush(const struct flm_nthw *p)
+void nthw_flm_scrub_flush(const struct flm_nthw *p)
{
RTE_ASSERT(p->mp_scrub_ctrl);
RTE_ASSERT(p->mp_scrub_data);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
index 5cc95ab03c..de537c9e49 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_flm.h
@@ -14,229 +14,229 @@ struct flm_nthw;
typedef struct flm_nthw flm_nthw_t;
-struct flm_nthw *flm_nthw_new(void);
-void flm_nthw_delete(struct flm_nthw *p);
-int flm_nthw_init(struct flm_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
-void flm_nthw_set_debug_mode(struct flm_nthw *p, unsigned int n_debug_mode);
+struct flm_nthw *nthw_flm_new(void);
+void nthw_flm_delete(struct flm_nthw *p);
+int nthw_flm_init(struct flm_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+void nthw_flm_set_debug_mode(struct flm_nthw *p, unsigned int n_debug_mode);
/* Control */
-void flm_nthw_control_enable(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_init(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_lds(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_lfs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_lis(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_uds(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_uis(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_rds(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_ris(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_pds(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_pis(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_crcwr(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_crcrd(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_rbl(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_eab(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_split_sdram_usage(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_control_flush(const struct flm_nthw *p);
+void nthw_flm_control_enable(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_init(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_lds(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_lfs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_lis(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_uds(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_uis(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_rds(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_ris(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_pds(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_pis(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_crcwr(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_crcrd(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_rbl(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_eab(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_split_sdram_usage(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_control_flush(const struct flm_nthw *p);
/* Status */
-void flm_nthw_status_calib_success(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_calib_fail(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_initdone(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_idle(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_critical(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_panic(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_crcerr(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_eft_bp(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_cache_buf_crit(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_status_flush(const struct flm_nthw *p);
-void flm_nthw_status_update(const struct flm_nthw *p);
+void nthw_flm_status_calib_success(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_calib_fail(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_initdone(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_idle(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_critical(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_panic(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_crcerr(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_eft_bp(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_cache_buf_crit(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_status_flush(const struct flm_nthw *p);
+void nthw_flm_status_update(const struct flm_nthw *p);
/* Scan */
-void flm_nthw_scan_i(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scan_flush(const struct flm_nthw *p);
+void nthw_flm_scan_i(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scan_flush(const struct flm_nthw *p);
/* Load BIN */
-void flm_nthw_load_bin(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_load_bin_flush(const struct flm_nthw *p);
+void nthw_flm_load_bin(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_load_bin_flush(const struct flm_nthw *p);
/* Load LPS */
-void flm_nthw_load_lps_update(const struct flm_nthw *p);
-void flm_nthw_load_lps_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_load_lps_update(const struct flm_nthw *p);
+void nthw_flm_load_lps_cnt(const struct flm_nthw *p, uint32_t *val, int get);
/* Load APS */
-void flm_nthw_load_aps_update(const struct flm_nthw *p);
-void flm_nthw_load_aps_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_load_aps_update(const struct flm_nthw *p);
+void nthw_flm_load_aps_cnt(const struct flm_nthw *p, uint32_t *val, int get);
/* Prio */
-void flm_nthw_prio_limit0(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_ft0(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_limit1(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_ft1(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_limit2(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_ft2(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_limit3(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_ft3(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_prio_flush(const struct flm_nthw *p);
+void nthw_flm_prio_limit0(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_ft0(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_limit1(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_ft1(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_limit2(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_ft2(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_limit3(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_ft3(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_prio_flush(const struct flm_nthw *p);
/* PST */
-void flm_nthw_pst_select(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_pst_cnt(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_pst_bp(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_pst_pp(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_pst_tp(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_pst_flush(const struct flm_nthw *p);
+void nthw_flm_pst_select(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_pst_cnt(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_pst_bp(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_pst_pp(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_pst_tp(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_pst_flush(const struct flm_nthw *p);
/* RCP */
-void flm_nthw_rcp_select(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_cnt(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_lookup(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_qw0_dyn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_qw0_ofs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_qw0_sel(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_qw4_dyn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_qw4_ofs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_sw8_dyn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_sw8_ofs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_sw8_sel(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_sw9_dyn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_sw9_ofs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_mask(const struct flm_nthw *p, const uint32_t *val);
-void flm_nthw_rcp_kid(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_opn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_ipn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_byt_dyn(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_byt_ofs(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_txplm(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_auto_ipv4_mask(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_rcp_flush(const struct flm_nthw *p);
+void nthw_flm_rcp_select(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_cnt(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_lookup(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_qw0_dyn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_qw0_ofs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_qw0_sel(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_qw4_dyn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_qw4_ofs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_sw8_dyn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_sw8_ofs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_sw8_sel(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_sw9_dyn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_sw9_ofs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_mask(const struct flm_nthw *p, const uint32_t *val);
+void nthw_flm_rcp_kid(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_opn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_ipn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_byt_dyn(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_byt_ofs(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_txplm(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_auto_ipv4_mask(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_rcp_flush(const struct flm_nthw *p);
/* Buf Ctrl */
-int flm_nthw_buf_ctrl_update(const struct flm_nthw *p, uint32_t *lrn_free, uint32_t *inf_avail,
+int nthw_flm_buf_ctrl_update(const struct flm_nthw *p, uint32_t *lrn_free, uint32_t *inf_avail,
uint32_t *sta_avail);
/* Lrn Data */
-int flm_nthw_lrn_data_flush(const struct flm_nthw *p, const uint32_t *data, uint32_t records,
+int nthw_flm_lrn_data_flush(const struct flm_nthw *p, const uint32_t *data, uint32_t records,
uint32_t words_per_record, uint32_t *handled_records,
uint32_t *lrn_free, uint32_t *inf_avail, uint32_t *sta_avail);
/* Inf - Sta Data */
-int flm_nthw_inf_sta_data_update(const struct flm_nthw *p, uint32_t *inf_data,
+int nthw_flm_inf_sta_data_update(const struct flm_nthw *p, uint32_t *inf_data,
uint32_t inf_word_count, uint32_t *sta_data,
uint32_t sta_word_count, uint32_t *lrn_free, uint32_t *inf_avail,
uint32_t *sta_avail);
/* Stat Lrn Done */
-void flm_nthw_stat_lrn_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_lrn_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_lrn_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_lrn_done_update(const struct flm_nthw *p);
/* Stat Lrn Ignore */
-void flm_nthw_stat_lrn_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_lrn_ignore_update(const struct flm_nthw *p);
+void nthw_flm_stat_lrn_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_lrn_ignore_update(const struct flm_nthw *p);
/* Stat Lrn Fail */
-void flm_nthw_stat_lrn_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_lrn_fail_update(const struct flm_nthw *p);
+void nthw_flm_stat_lrn_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_lrn_fail_update(const struct flm_nthw *p);
/* Stat Unl Done */
-void flm_nthw_stat_unl_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_unl_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_unl_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_unl_done_update(const struct flm_nthw *p);
/* Stat Unl Ignore */
-void flm_nthw_stat_unl_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_unl_ignore_update(const struct flm_nthw *p);
+void nthw_flm_stat_unl_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_unl_ignore_update(const struct flm_nthw *p);
/* Stat Prb Done */
-void flm_nthw_stat_prb_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_prb_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_prb_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_prb_done_update(const struct flm_nthw *p);
/* Stat Prb Ignore */
-void flm_nthw_stat_prb_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_prb_ignore_update(const struct flm_nthw *p);
+void nthw_flm_stat_prb_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_prb_ignore_update(const struct flm_nthw *p);
/* Stat Rel Done */
-void flm_nthw_stat_rel_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_rel_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_rel_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_rel_done_update(const struct flm_nthw *p);
/* Stat Rel Ignore */
-void flm_nthw_stat_rel_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_rel_ignore_update(const struct flm_nthw *p);
+void nthw_flm_stat_rel_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_rel_ignore_update(const struct flm_nthw *p);
/* Stat Aul Done */
-void flm_nthw_stat_aul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_aul_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_aul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_aul_done_update(const struct flm_nthw *p);
/* Stat Aul Ignore */
-void flm_nthw_stat_aul_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_aul_ignore_update(const struct flm_nthw *p);
+void nthw_flm_stat_aul_ignore_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_aul_ignore_update(const struct flm_nthw *p);
/* Stat Aul Fail */
-void flm_nthw_stat_aul_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_aul_fail_update(const struct flm_nthw *p);
+void nthw_flm_stat_aul_fail_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_aul_fail_update(const struct flm_nthw *p);
/* Stat Tul Done */
-void flm_nthw_stat_tul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_tul_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_tul_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_tul_done_update(const struct flm_nthw *p);
/* Stat Flows */
-void flm_nthw_stat_flows_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_flows_update(const struct flm_nthw *p);
+void nthw_flm_stat_flows_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_flows_update(const struct flm_nthw *p);
/* Stat Sta Done */
-void flm_nthw_stat_sta_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_sta_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_sta_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_sta_done_update(const struct flm_nthw *p);
/* Stat Inf Done */
-void flm_nthw_stat_inf_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_inf_done_update(const struct flm_nthw *p);
+void nthw_flm_stat_inf_done_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_inf_done_update(const struct flm_nthw *p);
/* Stat Inf Skip */
-void flm_nthw_stat_inf_skip_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_inf_skip_update(const struct flm_nthw *p);
+void nthw_flm_stat_inf_skip_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_inf_skip_update(const struct flm_nthw *p);
/* Stat Pck Hit */
-void flm_nthw_stat_pck_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_pck_hit_update(const struct flm_nthw *p);
+void nthw_flm_stat_pck_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_pck_hit_update(const struct flm_nthw *p);
/* Stat Pck Miss */
-void flm_nthw_stat_pck_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_pck_miss_update(const struct flm_nthw *p);
+void nthw_flm_stat_pck_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_pck_miss_update(const struct flm_nthw *p);
/* Stat Pck Unh */
-void flm_nthw_stat_pck_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_pck_unh_update(const struct flm_nthw *p);
+void nthw_flm_stat_pck_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_pck_unh_update(const struct flm_nthw *p);
/* Stat Pck Dis */
-void flm_nthw_stat_pck_dis_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_pck_dis_update(const struct flm_nthw *p);
+void nthw_flm_stat_pck_dis_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_pck_dis_update(const struct flm_nthw *p);
/* Stat Csh Hit */
-void flm_nthw_stat_csh_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_csh_hit_update(const struct flm_nthw *p);
+void nthw_flm_stat_csh_hit_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_csh_hit_update(const struct flm_nthw *p);
/* Stat Csh Miss */
-void flm_nthw_stat_csh_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_csh_miss_update(const struct flm_nthw *p);
+void nthw_flm_stat_csh_miss_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_csh_miss_update(const struct flm_nthw *p);
/* Stat Csh Unh */
-void flm_nthw_stat_csh_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_csh_unh_update(const struct flm_nthw *p);
+void nthw_flm_stat_csh_unh_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_csh_unh_update(const struct flm_nthw *p);
/* Stat Cuc Start */
-void flm_nthw_stat_cuc_start_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_cuc_start_update(const struct flm_nthw *p);
+void nthw_flm_stat_cuc_start_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_cuc_start_update(const struct flm_nthw *p);
/* Stat Cuc Move */
-void flm_nthw_stat_cuc_move_cnt(const struct flm_nthw *p, uint32_t *val, int get);
-void flm_nthw_stat_cuc_move_update(const struct flm_nthw *p);
+void nthw_flm_stat_cuc_move_cnt(const struct flm_nthw *p, uint32_t *val, int get);
+void nthw_flm_stat_cuc_move_update(const struct flm_nthw *p);
/* Scrubber profile memory */
-void flm_nthw_scrub_select(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_cnt(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_t(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_r(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_del(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_inf(const struct flm_nthw *p, uint32_t val);
-void flm_nthw_scrub_flush(const struct flm_nthw *p);
+void nthw_flm_scrub_select(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_cnt(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_t(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_r(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_del(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_inf(const struct flm_nthw *p, uint32_t val);
+void nthw_flm_scrub_flush(const struct flm_nthw *p);
struct flm_nthw {
uint8_t m_physical_adapter_no;
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
index 14ad74396f..6e46fee637 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.c
@@ -12,12 +12,12 @@
#include "flow_nthw_hfu.h"
-void hfu_nthw_set_debug_mode(struct hfu_nthw *p, unsigned int n_debug_mode)
+void nthw_hfu_set_debug_mode(struct hfu_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_hfu, n_debug_mode);
}
-struct hfu_nthw *hfu_nthw_new(void)
+struct hfu_nthw *nthw_hfu_new(void)
{
struct hfu_nthw *p = malloc(sizeof(struct hfu_nthw));
@@ -27,7 +27,7 @@ struct hfu_nthw *hfu_nthw_new(void)
return p;
}
-void hfu_nthw_delete(struct hfu_nthw *p)
+void nthw_hfu_delete(struct hfu_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -35,7 +35,7 @@ void hfu_nthw_delete(struct hfu_nthw *p)
}
}
-int hfu_nthw_init(struct hfu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_hfu_init(struct hfu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_HFU, n_instance);
@@ -103,127 +103,127 @@ int hfu_nthw_init(struct hfu_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void hfu_nthw_rcp_select(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_select(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void hfu_nthw_rcp_cnt(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_cnt(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void hfu_nthw_rcp_len_a_wr(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_wr(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_wr, val);
}
-void hfu_nthw_rcp_len_a_ol4len(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_ol4len(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_ol4len, val);
}
-void hfu_nthw_rcp_len_a_pos_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_pos_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_pos_dyn, val);
}
-void hfu_nthw_rcp_len_a_pos_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_pos_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_pos_ofs, val);
}
-void hfu_nthw_rcp_len_a_add_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_add_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_add_dyn, val);
}
-void hfu_nthw_rcp_len_a_add_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_add_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_add_ofs, val);
}
-void hfu_nthw_rcp_len_a_sub_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_a_sub_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_a_sub_dyn, val);
}
-void hfu_nthw_rcp_len_b_wr(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_wr(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_wr, val);
}
-void hfu_nthw_rcp_len_b_pos_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_pos_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_pos_dyn, val);
}
-void hfu_nthw_rcp_len_b_pos_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_pos_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_pos_ofs, val);
}
-void hfu_nthw_rcp_len_b_add_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_add_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_add_dyn, val);
}
-void hfu_nthw_rcp_len_b_add_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_add_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_add_ofs, val);
}
-void hfu_nthw_rcp_len_b_sub_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_b_sub_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_b_sub_dyn, val);
}
-void hfu_nthw_rcp_len_c_wr(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_wr(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_wr, val);
}
-void hfu_nthw_rcp_len_c_pos_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_pos_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_pos_dyn, val);
}
-void hfu_nthw_rcp_len_c_pos_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_pos_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_pos_ofs, val);
}
-void hfu_nthw_rcp_len_c_add_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_add_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_add_dyn, val);
}
-void hfu_nthw_rcp_len_c_add_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_add_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_add_ofs, val);
}
-void hfu_nthw_rcp_len_c_sub_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_len_c_sub_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len_c_sub_dyn, val);
}
-void hfu_nthw_rcp_ttl_wr(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_ttl_wr(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ttl_wr, val);
}
-void hfu_nthw_rcp_ttl_pos_dyn(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_ttl_pos_dyn(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ttl_pos_dyn, val);
}
-void hfu_nthw_rcp_ttl_pos_ofs(const struct hfu_nthw *p, uint32_t val)
+void nthw_hfu_rcp_ttl_pos_ofs(const struct hfu_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ttl_pos_ofs, val);
}
-void hfu_nthw_rcp_flush(const struct hfu_nthw *p)
+void nthw_hfu_rcp_flush(const struct hfu_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
index 77002a639e..a41ff4c8b8 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hfu.h
@@ -45,40 +45,40 @@ struct hfu_nthw {
nthw_field_t *mp_rcp_data_ttl_pos_ofs;
};
-struct hfu_nthw *hfu_nthw_new(void);
-void hfu_nthw_delete(struct hfu_nthw *p);
-int hfu_nthw_init(struct hfu_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct hfu_nthw *nthw_hfu_new(void);
+void nthw_hfu_delete(struct hfu_nthw *p);
+int nthw_hfu_init(struct hfu_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int hfu_nthw_setup(struct hfu_nthw *p, int n_idx, int n_idx_cnt);
-void hfu_nthw_set_debug_mode(struct hfu_nthw *p, unsigned int n_debug_mode);
+void nthw_hfu_set_debug_mode(struct hfu_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void hfu_nthw_rcp_select(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_cnt(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_select(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_cnt(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_wr(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_ol4len(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_pos_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_pos_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_add_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_add_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_a_sub_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_wr(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_pos_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_pos_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_add_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_add_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_b_sub_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_wr(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_pos_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_pos_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_add_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_add_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_len_c_sub_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_ttl_wr(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_ttl_pos_dyn(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_ttl_pos_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_wr(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_ol4len(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_pos_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_pos_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_add_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_add_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_a_sub_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_wr(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_pos_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_pos_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_add_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_add_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_b_sub_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_wr(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_pos_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_pos_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_add_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_add_ofs(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_len_c_sub_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_ttl_wr(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_ttl_pos_dyn(const struct hfu_nthw *p, uint32_t val);
+void nthw_hfu_rcp_ttl_pos_ofs(const struct hfu_nthw *p, uint32_t val);
-void hfu_nthw_rcp_flush(const struct hfu_nthw *p);
+void nthw_hfu_rcp_flush(const struct hfu_nthw *p);
#endif /* __FLOW_NTHW_HFU_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
index f8cfa94a15..fc1ca7aba2 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.c
@@ -13,12 +13,12 @@
#include "flow_nthw_hsh.h"
-void hsh_nthw_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode)
+void nthw_hsh_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_hsh, n_debug_mode);
}
-struct hsh_nthw *hsh_nthw_new(void)
+struct hsh_nthw *nthw_hsh_new(void)
{
struct hsh_nthw *p = malloc(sizeof(struct hsh_nthw));
@@ -28,7 +28,7 @@ struct hsh_nthw *hsh_nthw_new(void)
return p;
}
-void hsh_nthw_delete(struct hsh_nthw *p)
+void nthw_hsh_delete(struct hsh_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -36,7 +36,7 @@ void hsh_nthw_delete(struct hsh_nthw *p)
}
}
-int hsh_nthw_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_hsh_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_HSH, n_instance);
@@ -124,136 +124,136 @@ int hsh_nthw_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void hsh_nthw_rcp_select(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_select(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void hsh_nthw_rcp_cnt(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_cnt(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void hsh_nthw_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_load_dist_type, val);
}
-void hsh_nthw_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val)
+void nthw_hsh_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val)
{
nthw_field_set_val(p->mp_rcp_data_mac_port_mask, val,
p->mp_rcp_data_mac_port_mask->mn_words);
}
-void hsh_nthw_rcp_sort(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_sort(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sort, val);
}
-void hsh_nthw_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_pe, val);
}
-void hsh_nthw_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val)
+void nthw_hsh_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_ofs, val);
}
-void hsh_nthw_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_pe, val);
}
-void hsh_nthw_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val)
+void nthw_hsh_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_ofs, val);
}
-void hsh_nthw_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w8_pe, val);
}
-void hsh_nthw_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val)
+void nthw_hsh_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w8_ofs, val);
}
-void hsh_nthw_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w8_sort, val);
}
-void hsh_nthw_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w9_pe, val);
}
-void hsh_nthw_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val)
+void nthw_hsh_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w9_ofs, val);
}
-void hsh_nthw_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w9_sort, val);
}
-void hsh_nthw_rcp_w9_p(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_w9_p(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_w9_p, val);
}
-void hsh_nthw_rcp_p_mask(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_p_mask(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_p_mask, val);
}
-void hsh_nthw_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val)
+void nthw_hsh_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val)
{
nthw_field_set_val(p->mp_rcp_data_word_mask, val, 10);
}
-void hsh_nthw_rcp_seed(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_seed(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_seed, val);
}
-void hsh_nthw_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tnl_p, val);
}
-void hsh_nthw_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_hsh_valid, val);
}
-void hsh_nthw_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_hsh_type, val);
}
-void hsh_nthw_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_toeplitz)
nthw_field_set_val32(p->mp_rcp_data_toeplitz, val);
}
-void hsh_nthw_rcp_k(const struct hsh_nthw *p, uint32_t *val)
+void nthw_hsh_rcp_k(const struct hsh_nthw *p, uint32_t *val)
{
if (p->mp_rcp_data_k)
nthw_field_set_val(p->mp_rcp_data_k, val, 10);
}
-void hsh_nthw_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val)
+void nthw_hsh_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_auto_ipv4_mask)
nthw_field_set_val32(p->mp_rcp_data_auto_ipv4_mask, val);
}
-void hsh_nthw_rcp_flush(const struct hsh_nthw *p)
+void nthw_hsh_rcp_flush(const struct hsh_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
index 70626122e3..0cd9a365fe 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_hsh.h
@@ -14,40 +14,40 @@ struct hsh_nthw;
typedef struct hsh_nthw hsh_nthw_t;
-struct hsh_nthw *hsh_nthw_new(void);
-void hsh_nthw_delete(struct hsh_nthw *p);
-int hsh_nthw_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct hsh_nthw *nthw_hsh_new(void);
+void nthw_hsh_delete(struct hsh_nthw *p);
+int nthw_hsh_init(struct hsh_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int hsh_nthw_setup(struct hsh_nthw *p, int n_idx, int n_idx_cnt);
-void hsh_nthw_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode);
+void nthw_hsh_set_debug_mode(struct hsh_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void hsh_nthw_rcp_select(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_cnt(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val);
-void hsh_nthw_rcp_sort(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val);
-void hsh_nthw_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val);
-void hsh_nthw_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val);
-void hsh_nthw_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val);
-void hsh_nthw_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_w9_p(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_p_mask(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val);
-void hsh_nthw_rcp_seed(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_k(const struct hsh_nthw *p, uint32_t *val);
-void hsh_nthw_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val);
-void hsh_nthw_rcp_flush(const struct hsh_nthw *p);
+void nthw_hsh_rcp_select(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_cnt(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_load_dist_type(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_mac_port_mask(const struct hsh_nthw *p, uint32_t *val);
+void nthw_hsh_rcp_sort(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_qw0_pe(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_qw0_ofs(const struct hsh_nthw *p, int32_t val);
+void nthw_hsh_rcp_qw4_pe(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_qw4_ofs(const struct hsh_nthw *p, int32_t val);
+void nthw_hsh_rcp_w8_pe(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_w8_ofs(const struct hsh_nthw *p, int32_t val);
+void nthw_hsh_rcp_w8_sort(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_w9_pe(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_w9_ofs(const struct hsh_nthw *p, int32_t val);
+void nthw_hsh_rcp_w9_sort(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_w9_p(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_p_mask(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_word_mask(const struct hsh_nthw *p, uint32_t *val);
+void nthw_hsh_rcp_seed(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_tnl_p(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_hsh_valid(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_hsh_type(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_toeplitz(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_k(const struct hsh_nthw *p, uint32_t *val);
+void nthw_hsh_rcp_auto_ipv4_mask(const struct hsh_nthw *p, uint32_t val);
+void nthw_hsh_rcp_flush(const struct hsh_nthw *p);
struct hsh_nthw {
uint8_t m_physical_adapter_no;
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
index 78835654dc..ee77e21694 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.c
@@ -12,12 +12,12 @@
#include "flow_nthw_ifr.h"
-void ifr_nthw_set_debug_mode(struct ifr_nthw *p, unsigned int n_debug_mode)
+void nthw_ifr_set_debug_mode(struct ifr_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_ifr, n_debug_mode);
}
-struct ifr_nthw *ifr_nthw_new(void)
+struct ifr_nthw *nthw_ifr_new(void)
{
struct ifr_nthw *p = malloc(sizeof(struct ifr_nthw));
@@ -27,7 +27,7 @@ struct ifr_nthw *ifr_nthw_new(void)
return p;
}
-int ifr_nthw_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_ifr_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_IFR, n_instance);
@@ -79,49 +79,49 @@ int ifr_nthw_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void ifr_nthw_rcp_select(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_select(const struct ifr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_addr);
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void ifr_nthw_rcp_cnt(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_cnt(const struct ifr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_cnt);
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void ifr_nthw_rcp_ipv4_en(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_ipv4_en(const struct ifr_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_ipv4_en)
nthw_field_set_val32(p->mp_rcp_data_ipv4_en, val);
}
-void ifr_nthw_rcp_ipv4_df_drop(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_ipv4_df_drop(const struct ifr_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_ipv4_df_drop)
nthw_field_set_val32(p->mp_rcp_data_ipv4_df_drop, val);
}
-void ifr_nthw_rcp_ipv6_en(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_ipv6_en(const struct ifr_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_ipv6_en)
nthw_field_set_val32(p->mp_rcp_data_ipv6_en, val);
}
-void ifr_nthw_rcp_ipv6_drop(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_ipv6_drop(const struct ifr_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_ipv6_drop)
nthw_field_set_val32(p->mp_rcp_data_ipv6_drop, val);
}
-void ifr_nthw_rcp_mtu(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_rcp_mtu(const struct ifr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_data_mtu);
nthw_field_set_val32(p->mp_rcp_data_mtu, val);
}
-void ifr_nthw_rcp_flush(const struct ifr_nthw *p)
+void nthw_ifr_rcp_flush(const struct ifr_nthw *p)
{
RTE_ASSERT(p->mp_rcp_ctrl);
RTE_ASSERT(p->mp_rcp_data);
@@ -129,25 +129,25 @@ void ifr_nthw_rcp_flush(const struct ifr_nthw *p)
nthw_register_flush(p->mp_rcp_data, 1);
}
-void ifr_nthw_counters_select(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_counters_select(const struct ifr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_counters_addr);
nthw_field_set_val32(p->mp_counters_addr, val);
}
-void ifr_nthw_counters_cnt(const struct ifr_nthw *p, uint32_t val)
+void nthw_ifr_counters_cnt(const struct ifr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_counters_cnt);
nthw_field_set_val32(p->mp_counters_cnt, val);
}
-void ifr_nthw_counters_drop(const struct ifr_nthw *p, uint32_t *val, int get)
+void nthw_ifr_counters_drop(const struct ifr_nthw *p, uint32_t *val, int get)
{
if (get)
*val = nthw_field_get_val32(p->mp_counters_drop);
}
-void ifr_nthw_counters_update(const struct ifr_nthw *p)
+void nthw_ifr_counters_update(const struct ifr_nthw *p)
{
RTE_ASSERT(p->mp_counters_data);
nthw_register_flush(p->mp_counters_ctrl, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
index 4763333765..eaf955a25f 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_ifr.h
@@ -42,26 +42,26 @@ struct ifr_nthw {
nthw_field_t *mp_counters_drop;
};
-struct ifr_nthw *ifr_nthw_new(void);
-int ifr_nthw_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct ifr_nthw *nthw_ifr_new(void);
+int nthw_ifr_init(struct ifr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int ifr_nthw_setup(struct ifr_nthw *p, int n_idx, int n_idx_cnt);
-void ifr_nthw_set_debug_mode(struct ifr_nthw *p, unsigned int n_debug_mode);
+void nthw_ifr_set_debug_mode(struct ifr_nthw *p, unsigned int n_debug_mode);
/* IFR RCP */
-void ifr_nthw_rcp_select(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_cnt(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_ipv4_en(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_ipv4_df_drop(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_ipv6_en(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_ipv6_drop(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_mtu(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_rcp_flush(const struct ifr_nthw *p);
+void nthw_ifr_rcp_select(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_cnt(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_ipv4_en(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_ipv4_df_drop(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_ipv6_en(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_ipv6_drop(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_mtu(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_rcp_flush(const struct ifr_nthw *p);
/* IFR Counters */
-void ifr_nthw_counters_select(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_counters_cnt(const struct ifr_nthw *p, uint32_t val);
-void ifr_nthw_counters_drop(const struct ifr_nthw *p, uint32_t *val, int get);
-void ifr_nthw_counters_update(const struct ifr_nthw *p);
+void nthw_ifr_counters_select(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_counters_cnt(const struct ifr_nthw *p, uint32_t val);
+void nthw_ifr_counters_drop(const struct ifr_nthw *p, uint32_t *val, int get);
+void nthw_ifr_counters_update(const struct ifr_nthw *p);
#endif /* __FLOW_NTHW_IFR_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
index f945f33fff..812c265cda 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.c
@@ -18,7 +18,7 @@ static inline unsigned int clamp_one(unsigned int val)
return val > 1 ? 1 : val;
}
-struct info_nthw *info_nthw_new(void)
+struct info_nthw *nthw_info_new(void)
{
struct info_nthw *p = malloc(sizeof(struct info_nthw));
@@ -28,7 +28,7 @@ struct info_nthw *info_nthw_new(void)
return p;
}
-void info_nthw_delete(struct info_nthw *p)
+void nthw_info_delete(struct info_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -36,7 +36,7 @@ void info_nthw_delete(struct info_nthw *p)
}
}
-int info_nthw_init(struct info_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_info_init(struct info_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
RTE_ASSERT(n_instance >= 0 && n_instance < 256);
@@ -135,207 +135,207 @@ int info_nthw_init(struct info_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-unsigned int info_nthw_get_nb_phy_ports(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_phy_ports(const struct info_nthw *p)
{
return p->n_phy_ports;
}
-unsigned int info_nthw_get_nb_rx_ports(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_rx_ports(const struct info_nthw *p)
{
return p->n_rx_ports;
}
-unsigned int info_nthw_get_ltx_avail(const struct info_nthw *p)
+unsigned int nthw_info_get_ltx_avail(const struct info_nthw *p)
{
return p->n_ltx_avail;
}
-unsigned int info_nthw_get_nb_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_categories(const struct info_nthw *p)
{
return p->nb_categories;
}
-unsigned int info_nthw_get_kcc_size(const struct info_nthw *p)
+unsigned int nthw_info_get_kcc_size(const struct info_nthw *p)
{
return p->nb_kcc_size;
}
-unsigned int info_nthw_get_kcc_banks(const struct info_nthw *p)
+unsigned int nthw_info_get_kcc_banks(const struct info_nthw *p)
{
return p->nb_kcc_banks;
}
-unsigned int info_nthw_get_nb_queues(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_queues(const struct info_nthw *p)
{
return p->nb_queues;
}
-unsigned int info_nthw_get_nb_cat_funcs(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_cat_funcs(const struct info_nthw *p)
{
return p->nb_cat_func;
}
-unsigned int info_nthw_get_nb_km_flow_types(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_flow_types(const struct info_nthw *p)
{
return p->nb_flow_types;
}
-unsigned int info_nthw_get_nb_pm_ext(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_pm_ext(const struct info_nthw *p)
{
return p->nb_pm_ext;
}
-unsigned int info_nthw_get_nb_len(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_len(const struct info_nthw *p)
{
return p->nb_len;
}
-unsigned int info_nthw_get_nb_km_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_categories(const struct info_nthw *p)
{
return p->nb_km_categories;
}
-unsigned int info_nthw_get_nb_km_cam_banks(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_cam_banks(const struct info_nthw *p)
{
return p->nb_km_cam_banks;
}
-unsigned int info_nthw_get_nb_km_cam_record_words(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_cam_record_words(const struct info_nthw *p)
{
return p->nb_km_cam_record_words;
}
-unsigned int info_nthw_get_nb_km_cam_records(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_cam_records(const struct info_nthw *p)
{
return p->nb_km_cam_records;
}
-unsigned int info_nthw_get_nb_km_tcam_banks(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_tcam_banks(const struct info_nthw *p)
{
return p->nb_km_tcam_banks;
}
-unsigned int info_nthw_get_nb_km_tcam_bank_width(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_km_tcam_bank_width(const struct info_nthw *p)
{
return p->nb_km_tcam_bank_width;
}
-unsigned int info_nthw_get_nb_flm_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_categories(const struct info_nthw *p)
{
return p->nb_flm_categories;
}
-unsigned int info_nthw_get_nb_flm_size_mb(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_size_mb(const struct info_nthw *p)
{
return p->nb_flm_size_mb;
}
-unsigned int info_nthw_get_nb_flm_entry_size(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_entry_size(const struct info_nthw *p)
{
return p->nb_flm_entry_size;
}
-unsigned int info_nthw_get_nb_flm_variant(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_variant(const struct info_nthw *p)
{
return p->nb_flm_variant;
}
-unsigned int info_nthw_get_nb_flm_prios(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_prios(const struct info_nthw *p)
{
return p->nb_flm_prios;
}
-unsigned int info_nthw_get_nb_flm_pst_profiles(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_pst_profiles(const struct info_nthw *p)
{
return p->nb_flm_pst_profiles;
}
-unsigned int info_nthw_get_nb_flm_scrub_profiles(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_scrub_profiles(const struct info_nthw *p)
{
return p->nb_flm_scrub_profiles;
}
-unsigned int info_nthw_get_nb_flm_load_aps_max(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_flm_load_aps_max(const struct info_nthw *p)
{
return p->nb_flm_load_aps_max;
}
-unsigned int info_nthw_get_nb_qsl_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_qsl_categories(const struct info_nthw *p)
{
return p->nb_qsl_categories;
}
-unsigned int info_nthw_get_nb_qsl_qst_entries(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_qsl_qst_entries(const struct info_nthw *p)
{
return p->nb_qsl_qst_entries;
}
-unsigned int info_nthw_get_nb_pdb_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_pdb_categories(const struct info_nthw *p)
{
return p->nb_pdb_categories;
}
-unsigned int info_nthw_get_nb_roa_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_roa_categories(const struct info_nthw *p)
{
return p->nb_roa_categories;
}
-unsigned int info_nthw_get_nb_cat_km_if_cnt(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_cat_km_if_cnt(const struct info_nthw *p)
{
return p->nb_cat_km_if_cnt;
}
-unsigned int info_nthw_get_nb_cat_km_if_m0(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_cat_km_if_m0(const struct info_nthw *p)
{
return p->m_cat_km_if_m0;
}
-unsigned int info_nthw_get_nb_cat_km_if_m1(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_cat_km_if_m1(const struct info_nthw *p)
{
return p->m_cat_km_if_m1;
}
-unsigned int info_nthw_get_nb_tpe_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tpe_categories(const struct info_nthw *p)
{
return p->nb_tpe_categories;
}
-unsigned int info_nthw_get_nb_tx_cpy_writers(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tx_cpy_writers(const struct info_nthw *p)
{
return p->nb_tx_cpy_writers;
}
-unsigned int info_nthw_get_nb_tx_cpy_mask_mem(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tx_cpy_mask_mem(const struct info_nthw *p)
{
return p->nb_tx_cpy_mask_mem;
}
-unsigned int info_nthw_get_nb_tx_rpl_depth(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tx_rpl_depth(const struct info_nthw *p)
{
return p->nb_tx_rpl_depth;
}
-unsigned int info_nthw_get_nb_tx_rpl_ext_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tx_rpl_ext_categories(const struct info_nthw *p)
{
return p->nb_tx_rpl_ext_categories;
}
-unsigned int info_nthw_get_nb_tpe_ifr_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_tpe_ifr_categories(const struct info_nthw *p)
{
return p->nb_tpe_ifr_categories;
}
-unsigned int info_nthw_get_nb_rpp_per_ps(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_rpp_per_ps(const struct info_nthw *p)
{
return p->nb_rpp_per_ps;
}
-unsigned int info_nthw_get_nb_hsh_categories(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_hsh_categories(const struct info_nthw *p)
{
return p->nb_hsh_categories;
}
-unsigned int info_nthw_get_nb_hsh_toeplitz(const struct info_nthw *p)
+unsigned int nthw_info_get_nb_hsh_toeplitz(const struct info_nthw *p)
{
return p->nb_hsh_toeplitz;
}
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
index d726e89e57..49c5c9ce7d 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_info.h
@@ -12,52 +12,52 @@
struct info_nthw;
-struct info_nthw *info_nthw_new(void);
-void info_nthw_delete(struct info_nthw *p);
-int info_nthw_init(struct info_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct info_nthw *nthw_info_new(void);
+void nthw_info_delete(struct info_nthw *p);
+int nthw_info_init(struct info_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
-unsigned int info_nthw_get_nb_phy_ports(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_rx_ports(const struct info_nthw *p);
-unsigned int info_nthw_get_ltx_avail(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_phy_ports(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_rx_ports(const struct info_nthw *p);
+unsigned int nthw_info_get_ltx_avail(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_queues(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_cat_funcs(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_flow_types(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_pm_ext(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_len(const struct info_nthw *p);
-unsigned int info_nthw_get_kcc_size(const struct info_nthw *p);
-unsigned int info_nthw_get_kcc_banks(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_cam_banks(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_cam_record_words(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_cam_records(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_tcam_banks(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_km_tcam_bank_width(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_size_mb(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_entry_size(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_variant(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_prios(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_pst_profiles(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_scrub_profiles(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_flm_load_aps_max(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_qsl_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_qsl_qst_entries(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_pdb_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_roa_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_cat_km_if_cnt(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_cat_km_if_m0(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_cat_km_if_m1(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tpe_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tx_cpy_writers(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tx_cpy_mask_mem(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tx_rpl_depth(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tx_rpl_ext_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_tpe_ifr_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_rpp_per_ps(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_hsh_categories(const struct info_nthw *p);
-unsigned int info_nthw_get_nb_hsh_toeplitz(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_queues(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_cat_funcs(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_flow_types(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_pm_ext(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_len(const struct info_nthw *p);
+unsigned int nthw_info_get_kcc_size(const struct info_nthw *p);
+unsigned int nthw_info_get_kcc_banks(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_cam_banks(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_cam_record_words(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_cam_records(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_tcam_banks(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_km_tcam_bank_width(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_size_mb(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_entry_size(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_variant(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_prios(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_pst_profiles(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_scrub_profiles(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_flm_load_aps_max(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_qsl_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_qsl_qst_entries(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_pdb_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_roa_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_cat_km_if_cnt(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_cat_km_if_m0(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_cat_km_if_m1(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tpe_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tx_cpy_writers(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tx_cpy_mask_mem(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tx_rpl_depth(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tx_rpl_ext_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_tpe_ifr_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_rpp_per_ps(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_hsh_categories(const struct info_nthw *p);
+unsigned int nthw_info_get_nb_hsh_toeplitz(const struct info_nthw *p);
struct info_nthw {
uint8_t m_physical_adapter_no;
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
index 10450b3600..0d6dabed46 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.c
@@ -22,12 +22,12 @@
} \
} while (0)
-void km_nthw_set_debug_mode(struct km_nthw *p, unsigned int n_debug_mode)
+void nthw_km_set_debug_mode(struct km_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_km, n_debug_mode);
}
-struct km_nthw *km_nthw_new(void)
+struct km_nthw *nthw_km_new(void)
{
struct km_nthw *p = malloc(sizeof(struct km_nthw));
@@ -37,7 +37,7 @@ struct km_nthw *km_nthw_new(void)
return p;
}
-void km_nthw_delete(struct km_nthw *p)
+void nthw_km_delete(struct km_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -45,7 +45,7 @@ void km_nthw_delete(struct km_nthw *p)
}
}
-int km_nthw_init(struct km_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_km_init(struct km_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_KM, n_instance);
@@ -220,390 +220,390 @@ int km_nthw_init(struct km_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
}
/* RCP */
-void km_nthw_rcp_select(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_select(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
};
-void km_nthw_rcp_cnt(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_cnt(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
};
-void km_nthw_rcp_qw0_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw0_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_dyn, val);
};
-void km_nthw_rcp_qw0_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_qw0_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_ofs, val);
};
-void km_nthw_rcp_qw0_sel_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw0_sel_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_sel_a, val);
};
-void km_nthw_rcp_qw0_sel_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw0_sel_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw0_sel_b, val);
};
-void km_nthw_rcp_qw4_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw4_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_dyn, val);
};
-void km_nthw_rcp_qw4_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_qw4_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_ofs, val);
};
-void km_nthw_rcp_qw4_sel_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw4_sel_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_sel_a, val);
};
-void km_nthw_rcp_qw4_sel_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_qw4_sel_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_qw4_sel_b, val);
};
-void km_nthw_rcp_dw8_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw8_dyn(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw8_dyn, val);
};
-void km_nthw_rcp_swx_cch(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_swx_cch(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_swx_cch, val);
};
-void km_nthw_rcp_dw8_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_dw8_ofs(const struct km_nthw *p, int32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw8_ofs, val);
};
-void km_nthw_rcp_dw8_sel_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw8_sel_a(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw8_sel_a, val);
};
-void km_nthw_rcp_dw8_sel_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw8_sel_b(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw8_sel_b, val);
};
-void km_nthw_rcp_dw10_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw10_dyn(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw10_dyn, val);
};
-void km_nthw_rcp_dw10_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_dw10_ofs(const struct km_nthw *p, int32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw10_ofs, val);
};
-void km_nthw_rcp_dw10_sel_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw10_sel_a(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw10_sel_a, val);
};
-void km_nthw_rcp_dw10_sel_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw10_sel_b(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_dw10_sel_b, val);
};
-void km_nthw_rcp_swx_sel_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_swx_sel_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_swx_sel_a, val);
};
-void km_nthw_rcp_swx_sel_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_swx_sel_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_swx_sel_b, val);
};
-void km_nthw_rcp_mask_b(const struct km_nthw *p, const uint32_t *val)
+void nthw_km_rcp_mask_b(const struct km_nthw *p, const uint32_t *val)
{
nthw_field_set_val(p->mp_rcp_data_mask_b, val, p->mp_rcp_data_mask_b->mn_words);
};
-void km_nthw_rcp_mask_da(const struct km_nthw *p, const uint32_t *val)
+void nthw_km_rcp_mask_da(const struct km_nthw *p, const uint32_t *val)
{
nthw_field_set_val(p->mp_rcp_data_mask_a, val, p->mp_rcp_data_mask_a->mn_words);
}; /* for DW8/DW10 from v6+ */
-void km_nthw_rcp_dual(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dual(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dual, val);
};
-void km_nthw_rcp_paired(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_paired(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_paired, val);
};
-void km_nthw_rcp_el_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_el_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_el_a, val);
};
-void km_nthw_rcp_el_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_el_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_el_b, val);
};
-void km_nthw_rcp_info_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_info_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_info_a, val);
};
-void km_nthw_rcp_info_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_info_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_info_b, val);
};
-void km_nthw_rcp_ftm_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_ftm_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ftm_a, val);
};
-void km_nthw_rcp_ftm_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_ftm_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ftm_b, val);
};
-void km_nthw_rcp_bank_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_bank_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_bank_a, val);
};
-void km_nthw_rcp_bank_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_bank_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_bank_b, val);
};
-void km_nthw_rcp_kl_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_kl_a(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_kl_a, val);
};
-void km_nthw_rcp_kl_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_kl_b(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_kl_b, val);
};
-void km_nthw_rcp_keyway_a(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_keyway_a(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_keyway_a, val);
};
-void km_nthw_rcp_keyway_b(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_keyway_b(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_rcp_data_keyway_b, val);
};
-void km_nthw_rcp_synergy_mode(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_synergy_mode(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_synergy_mode, val);
};
-void km_nthw_rcp_dw0_b_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw0_b_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dw0_b_dyn, val);
};
-void km_nthw_rcp_dw0_b_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_dw0_b_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dw0_b_ofs, val);
};
-void km_nthw_rcp_dw2_b_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_dw2_b_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dw2_b_dyn, val);
};
-void km_nthw_rcp_dw2_b_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_dw2_b_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dw2_b_ofs, val);
};
-void km_nthw_rcp_sw4_b_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_sw4_b_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw4_b_dyn, val);
};
-void km_nthw_rcp_sw4_b_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_sw4_b_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw4_b_ofs, val);
};
-void km_nthw_rcp_sw5_b_dyn(const struct km_nthw *p, uint32_t val)
+void nthw_km_rcp_sw5_b_dyn(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw5_b_dyn, val);
};
-void km_nthw_rcp_sw5_b_ofs(const struct km_nthw *p, int32_t val)
+void nthw_km_rcp_sw5_b_ofs(const struct km_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_sw5_b_ofs, val);
};
-void km_nthw_rcp_flush(const struct km_nthw *p)
+void nthw_km_rcp_flush(const struct km_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
};
/* CAM */
-void km_nthw_cam_select(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_select(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_addr, val);
};
-void km_nthw_cam_cnt(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_cnt(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_cnt, val);
};
-void km_nthw_cam_w0(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w0(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w0, val);
};
-void km_nthw_cam_w1(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w1(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w1, val);
};
-void km_nthw_cam_w2(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w2(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w2, val);
};
-void km_nthw_cam_w3(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w3(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w3, val);
};
-void km_nthw_cam_w4(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w4(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w4, val);
};
-void km_nthw_cam_w5(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_w5(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_w5, val);
};
-void km_nthw_cam_ft0(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft0(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft0, val);
};
-void km_nthw_cam_ft1(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft1(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft1, val);
};
-void km_nthw_cam_ft2(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft2(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft2, val);
};
-void km_nthw_cam_ft3(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft3(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft3, val);
};
-void km_nthw_cam_ft4(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft4(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft4, val);
};
-void km_nthw_cam_ft5(const struct km_nthw *p, uint32_t val)
+void nthw_km_cam_ft5(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_cam_data_ft5, val);
};
-void km_nthw_cam_flush(const struct km_nthw *p)
+void nthw_km_cam_flush(const struct km_nthw *p)
{
nthw_register_flush(p->mp_cam_ctrl, 1);
nthw_register_flush(p->mp_cam_data, 1);
};
/* TCAM */
-void km_nthw_tcam_select(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcam_select(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tcam_addr, val);
};
-void km_nthw_tcam_cnt(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcam_cnt(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tcam_cnt, val);
};
-void km_nthw_tcam_t(const struct km_nthw *p, uint32_t *val)
+void nthw_km_tcam_t(const struct km_nthw *p, uint32_t *val)
{
nthw_field_set_val(p->mp_tcam_data_t, val, 3);
};
-void km_nthw_tcam_flush(const struct km_nthw *p)
+void nthw_km_tcam_flush(const struct km_nthw *p)
{
nthw_register_flush(p->mp_tcam_ctrl, 1);
nthw_register_flush(p->mp_tcam_data, 1);
};
/* TCI */
-void km_nthw_tci_select(const struct km_nthw *p, uint32_t val)
+void nthw_km_tci_select(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tci_addr, val);
};
-void km_nthw_tci_cnt(const struct km_nthw *p, uint32_t val)
+void nthw_km_tci_cnt(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tci_cnt, val);
};
-void km_nthw_tci_color(const struct km_nthw *p, uint32_t val)
+void nthw_km_tci_color(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tci_data_color, val);
};
-void km_nthw_tci_ft(const struct km_nthw *p, uint32_t val)
+void nthw_km_tci_ft(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tci_data_ft, val);
};
-void km_nthw_tci_flush(const struct km_nthw *p)
+void nthw_km_tci_flush(const struct km_nthw *p)
{
nthw_register_flush(p->mp_tci_ctrl, 1);
nthw_register_flush(p->mp_tci_data, 1);
};
/* TCQ */
-void km_nthw_tcq_select(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcq_select(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tcq_addr, val);
};
-void km_nthw_tcq_cnt(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcq_cnt(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tcq_cnt, val);
};
-void km_nthw_tcq_bank_mask(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcq_bank_mask(const struct km_nthw *p, uint32_t val)
{
CHECK_AND_SET_VALUE(p->mp_tcq_data_bank_mask, val);
};
-void km_nthw_tcq_qual(const struct km_nthw *p, uint32_t val)
+void nthw_km_tcq_qual(const struct km_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_tcq_data_qual, val);
};
-void km_nthw_tcq_flush(const struct km_nthw *p)
+void nthw_km_tcq_flush(const struct km_nthw *p)
{
nthw_register_flush(p->mp_tcq_ctrl, 1);
nthw_register_flush(p->mp_tcq_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
index 510aaaae98..9278c60241 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_km.h
@@ -14,97 +14,97 @@ struct km_nthw;
typedef struct km_nthw km_nthw_t;
-struct km_nthw *km_nthw_new(void);
-void km_nthw_delete(struct km_nthw *p);
-int km_nthw_init(struct km_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct km_nthw *nthw_km_new(void);
+void nthw_km_delete(struct km_nthw *p);
+int nthw_km_init(struct km_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int km_nthw_setup(struct km_nthw *p, int n_idx, int n_idx_cnt);
-void km_nthw_set_debug_mode(struct km_nthw *p, unsigned int n_debug_mode);
+void nthw_km_set_debug_mode(struct km_nthw *p, unsigned int n_debug_mode);
/* RCP initial v3 */
-void km_nthw_rcp_select(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_cnt(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw0_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw0_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_qw0_sel_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw0_sel_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw4_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw4_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_qw4_sel_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_qw4_sel_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_select(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_cnt(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw0_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw0_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_qw0_sel_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw0_sel_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw4_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw4_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_qw4_sel_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_qw4_sel_b(const struct km_nthw *p, uint32_t val);
/* subst in v6 */
-void km_nthw_rcp_dw8_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw8_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_dw8_sel_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw8_sel_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw10_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw10_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_dw10_sel_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw10_sel_b(const struct km_nthw *p, uint32_t val);
-
-void km_nthw_rcp_swx_cch(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_swx_sel_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_swx_sel_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_mask_da(const struct km_nthw *p, const uint32_t *val);
-void km_nthw_rcp_mask_b(const struct km_nthw *p, const uint32_t *val);
-void km_nthw_rcp_dual(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_paired(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_el_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_el_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_info_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_info_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_ftm_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_ftm_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_bank_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_bank_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_kl_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_kl_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_keyway_a(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_keyway_b(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_synergy_mode(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw0_b_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw0_b_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_dw2_b_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_dw2_b_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_sw4_b_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_sw4_b_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_sw5_b_dyn(const struct km_nthw *p, uint32_t val);
-void km_nthw_rcp_sw5_b_ofs(const struct km_nthw *p, int32_t val);
-void km_nthw_rcp_flush(const struct km_nthw *p);
+void nthw_km_rcp_dw8_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw8_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_dw8_sel_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw8_sel_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw10_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw10_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_dw10_sel_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw10_sel_b(const struct km_nthw *p, uint32_t val);
+
+void nthw_km_rcp_swx_cch(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_swx_sel_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_swx_sel_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_mask_da(const struct km_nthw *p, const uint32_t *val);
+void nthw_km_rcp_mask_b(const struct km_nthw *p, const uint32_t *val);
+void nthw_km_rcp_dual(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_paired(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_el_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_el_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_info_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_info_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_ftm_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_ftm_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_bank_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_bank_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_kl_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_kl_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_keyway_a(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_keyway_b(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_synergy_mode(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw0_b_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw0_b_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_dw2_b_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_dw2_b_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_sw4_b_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_sw4_b_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_sw5_b_dyn(const struct km_nthw *p, uint32_t val);
+void nthw_km_rcp_sw5_b_ofs(const struct km_nthw *p, int32_t val);
+void nthw_km_rcp_flush(const struct km_nthw *p);
/* CAM */
-void km_nthw_cam_select(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_cnt(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w0(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w1(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w2(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w3(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w4(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_w5(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft0(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft1(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft2(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft3(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft4(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_ft5(const struct km_nthw *p, uint32_t val);
-void km_nthw_cam_flush(const struct km_nthw *p);
+void nthw_km_cam_select(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_cnt(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w0(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w1(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w2(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w3(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w4(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_w5(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft0(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft1(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft2(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft3(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft4(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_ft5(const struct km_nthw *p, uint32_t val);
+void nthw_km_cam_flush(const struct km_nthw *p);
/* TCAM */
-void km_nthw_tcam_select(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcam_cnt(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcam_t(const struct km_nthw *p, uint32_t *val);
-void km_nthw_tcam_flush(const struct km_nthw *p);
+void nthw_km_tcam_select(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcam_cnt(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcam_t(const struct km_nthw *p, uint32_t *val);
+void nthw_km_tcam_flush(const struct km_nthw *p);
/* TCI */
-void km_nthw_tci_select(const struct km_nthw *p, uint32_t val);
-void km_nthw_tci_cnt(const struct km_nthw *p, uint32_t val);
-void km_nthw_tci_color(const struct km_nthw *p, uint32_t val);
-void km_nthw_tci_ft(const struct km_nthw *p, uint32_t val);
-void km_nthw_tci_flush(const struct km_nthw *p);
+void nthw_km_tci_select(const struct km_nthw *p, uint32_t val);
+void nthw_km_tci_cnt(const struct km_nthw *p, uint32_t val);
+void nthw_km_tci_color(const struct km_nthw *p, uint32_t val);
+void nthw_km_tci_ft(const struct km_nthw *p, uint32_t val);
+void nthw_km_tci_flush(const struct km_nthw *p);
/* TCQ */
-void km_nthw_tcq_select(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcq_cnt(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcq_bank_mask(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcq_qual(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcq_select(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcq_cnt(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcq_bank_mask(const struct km_nthw *p, uint32_t val);
+void nthw_km_tcq_qual(const struct km_nthw *p, uint32_t val);
-void km_nthw_tcq_flush(const struct km_nthw *p);
+void nthw_km_tcq_flush(const struct km_nthw *p);
struct km_nthw {
uint8_t m_physical_adapter_no;
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
index 132ee14baf..664d2d1dea 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.c
@@ -13,12 +13,12 @@
#include "flow_nthw_pdb.h"
-void pdb_nthw_set_debug_mode(struct pdb_nthw *p, unsigned int n_debug_mode)
+void nthw_pdb_set_debug_mode(struct pdb_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_pdb, n_debug_mode);
}
-struct pdb_nthw *pdb_nthw_new(void)
+struct pdb_nthw *nthw_pdb_new(void)
{
struct pdb_nthw *p = malloc(sizeof(struct pdb_nthw));
@@ -28,7 +28,7 @@ struct pdb_nthw *pdb_nthw_new(void)
return p;
}
-void pdb_nthw_delete(struct pdb_nthw *p)
+void nthw_pdb_delete(struct pdb_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -36,7 +36,7 @@ void pdb_nthw_delete(struct pdb_nthw *p)
}
}
-int pdb_nthw_init(struct pdb_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_pdb_init(struct pdb_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_PDB, n_instance);
@@ -92,119 +92,119 @@ int pdb_nthw_init(struct pdb_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
}
/* RCP */
-void pdb_nthw_rcp_select(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_select(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void pdb_nthw_rcp_cnt(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_cnt(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void pdb_nthw_rcp_descriptor(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_descriptor(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_descriptor, val);
}
-void pdb_nthw_rcp_desc_len(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_desc_len(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_desc_len, val);
}
-void pdb_nthw_rcp_tx_port(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_tx_port(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tx_port, val);
}
-void pdb_nthw_rcp_tx_ignore(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_tx_ignore(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tx_ignore, val);
}
-void pdb_nthw_rcp_tx_now(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_tx_now(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tx_now, val);
}
-void pdb_nthw_rcp_crc_overwrite(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_crc_overwrite(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_crc_overwrite, val);
}
-void pdb_nthw_rcp_align(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_align(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_align, val);
}
-void pdb_nthw_rcp_ofs0_dyn(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_ofs0_dyn(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs0_dyn, val);
}
-void pdb_nthw_rcp_ofs0_rel(const struct pdb_nthw *p, int32_t val)
+void nthw_pdb_rcp_ofs0_rel(const struct pdb_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs0_rel, val);
}
-void pdb_nthw_rcp_ofs1_dyn(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_ofs1_dyn(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs1_dyn, val);
}
-void pdb_nthw_rcp_ofs1_rel(const struct pdb_nthw *p, int32_t val)
+void nthw_pdb_rcp_ofs1_rel(const struct pdb_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs1_rel, val);
}
-void pdb_nthw_rcp_ofs2_dyn(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_ofs2_dyn(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs2_dyn, val);
}
-void pdb_nthw_rcp_ofs2_rel(const struct pdb_nthw *p, int32_t val)
+void nthw_pdb_rcp_ofs2_rel(const struct pdb_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs2_rel, val);
}
-void pdb_nthw_rcp_ip_prot_tnl(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_ip_prot_tnl(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ip_prot_tnl, val);
}
-void pdb_nthw_rcp_ppc_hsh(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_ppc_hsh(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ppc_hsh, val);
}
-void pdb_nthw_rcp_duplicate_en(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_duplicate_en(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_duplicate_en, val);
}
-void pdb_nthw_rcp_duplicate_bit(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_rcp_duplicate_bit(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_duplicate_bit, val);
}
-void pdb_nthw_rcp_flush(const struct pdb_nthw *p)
+void nthw_pdb_rcp_flush(const struct pdb_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
}
/* CONFIG */
-void pdb_nthw_config_ts_format(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_config_ts_format(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_config_ts_format, val);
}
-void pdb_nthw_config_port_ofs(const struct pdb_nthw *p, uint32_t val)
+void nthw_pdb_config_port_ofs(const struct pdb_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_config_port_ofs, val);
}
-void pdb_nthw_config_flush(const struct pdb_nthw *p)
+void nthw_pdb_config_flush(const struct pdb_nthw *p)
{
nthw_register_flush(p->mp_config, 1);
}
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
index aafe12d3e0..bd220ed8d7 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_pdb.h
@@ -46,40 +46,40 @@ struct pdb_nthw {
typedef struct pdb_nthw pdb_nthw_t;
-struct pdb_nthw *pdb_nthw_new(void);
-void pdb_nthw_delete(struct pdb_nthw *p);
-int pdb_nthw_init(struct pdb_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct pdb_nthw *nthw_pdb_new(void);
+void nthw_pdb_delete(struct pdb_nthw *p);
+int nthw_pdb_init(struct pdb_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int pdb_nthw_setup(struct pdb_nthw *p, int n_idx, int n_idx_cnt);
-void pdb_nthw_set_debug_mode(struct pdb_nthw *p, unsigned int n_debug_mode);
+void nthw_pdb_set_debug_mode(struct pdb_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void pdb_nthw_rcp_select(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_cnt(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_select(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_cnt(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_descriptor(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_desc_len(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_tx_port(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_tx_ignore(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_tx_now(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_crc_overwrite(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_align(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_ofs0_dyn(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_ofs0_rel(const struct pdb_nthw *p, int32_t val);
-void pdb_nthw_rcp_ofs1_dyn(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_ofs1_rel(const struct pdb_nthw *p, int32_t val);
-void pdb_nthw_rcp_ofs2_dyn(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_ofs2_rel(const struct pdb_nthw *p, int32_t val);
-void pdb_nthw_rcp_ip_prot_tnl(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_ppc_hsh(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_duplicate_en(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_duplicate_bit(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_rcp_flush(const struct pdb_nthw *p);
+void nthw_pdb_rcp_descriptor(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_desc_len(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_tx_port(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_tx_ignore(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_tx_now(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_crc_overwrite(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_align(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_ofs0_dyn(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_ofs0_rel(const struct pdb_nthw *p, int32_t val);
+void nthw_pdb_rcp_ofs1_dyn(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_ofs1_rel(const struct pdb_nthw *p, int32_t val);
+void nthw_pdb_rcp_ofs2_dyn(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_ofs2_rel(const struct pdb_nthw *p, int32_t val);
+void nthw_pdb_rcp_ip_prot_tnl(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_ppc_hsh(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_duplicate_en(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_duplicate_bit(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_rcp_flush(const struct pdb_nthw *p);
/* CONFIG */
-void pdb_nthw_config_ts_format(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_config_port_ofs(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_config_port_ofs(const struct pdb_nthw *p, uint32_t val);
-void pdb_nthw_config_flush(const struct pdb_nthw *p);
+void nthw_pdb_config_ts_format(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_config_port_ofs(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_config_port_ofs(const struct pdb_nthw *p, uint32_t val);
+void nthw_pdb_config_flush(const struct pdb_nthw *p);
#endif /* __FLOW_NTHW_PDB_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
index d2c7130f2e..d82a22ba8a 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.c
@@ -13,12 +13,12 @@
#include "flow_nthw_qsl.h"
-void qsl_nthw_set_debug_mode(struct qsl_nthw *p, unsigned int n_debug_mode)
+void nthw_qsl_set_debug_mode(struct qsl_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_qsl, n_debug_mode);
}
-struct qsl_nthw *qsl_nthw_new(void)
+struct qsl_nthw *nthw_qsl_new(void)
{
struct qsl_nthw *p = malloc(sizeof(struct qsl_nthw));
@@ -28,7 +28,7 @@ struct qsl_nthw *qsl_nthw_new(void)
return p;
}
-void qsl_nthw_delete(struct qsl_nthw *p)
+void nthw_qsl_delete(struct qsl_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -36,7 +36,7 @@ void qsl_nthw_delete(struct qsl_nthw *p)
}
}
-int qsl_nthw_init(struct qsl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_qsl_init(struct qsl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_QSL, n_instance);
@@ -132,163 +132,163 @@ int qsl_nthw_init(struct qsl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
}
/* RCP */
-void qsl_nthw_rcp_select(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_select(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
};
-void qsl_nthw_rcp_cnt(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_cnt(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void qsl_nthw_rcp_discard(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_discard(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_discard, val);
}
-void qsl_nthw_rcp_drop(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_drop(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_drop, val);
}
-void qsl_nthw_rcp_tbl_lo(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_tbl_lo(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tbl_lo, val);
}
-void qsl_nthw_rcp_tbl_hi(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_tbl_hi(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tbl_hi, val);
}
-void qsl_nthw_rcp_tbl_idx(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_tbl_idx(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tbl_idx, val);
}
-void qsl_nthw_rcp_tbl_msk(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_tbl_msk(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tbl_msk, val);
}
-void qsl_nthw_rcp_lr(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_lr(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_lr)
nthw_field_set_val32(p->mp_rcp_data_lr, val);
}
-void qsl_nthw_rcp_tsa(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_tsa(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_tsa)
nthw_field_set_val32(p->mp_rcp_data_tsa, val);
}
-void qsl_nthw_rcp_vli(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_rcp_vli(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_rcp_data_vli)
nthw_field_set_val32(p->mp_rcp_data_vli, val);
}
-void qsl_nthw_rcp_flush(const struct qsl_nthw *p)
+void nthw_qsl_rcp_flush(const struct qsl_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
}
/* QST */
-void qsl_nthw_qst_select(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_select(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qst_addr, val);
}
-void qsl_nthw_qst_cnt(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_cnt(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qst_cnt, val);
}
-void qsl_nthw_qst_queue(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_queue(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qst_data_queue, val);
}
-void qsl_nthw_qst_en(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_en(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qst_data_en, val);
}
-void qsl_nthw_qst_tx_port(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_tx_port(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_qst_data_tx_port)
nthw_field_set_val32(p->mp_qst_data_tx_port, val);
}
-void qsl_nthw_qst_lre(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_lre(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_qst_data_lre)
nthw_field_set_val32(p->mp_qst_data_lre, val);
}
-void qsl_nthw_qst_tci(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_tci(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_qst_data_tci)
nthw_field_set_val32(p->mp_qst_data_tci, val);
}
-void qsl_nthw_qst_ven(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qst_ven(const struct qsl_nthw *p, uint32_t val)
{
if (p->mp_qst_data_ven)
nthw_field_set_val32(p->mp_qst_data_ven, val);
}
-void qsl_nthw_qst_flush(const struct qsl_nthw *p)
+void nthw_qsl_qst_flush(const struct qsl_nthw *p)
{
nthw_register_flush(p->mp_qst_ctrl, 1);
nthw_register_flush(p->mp_qst_data, 1);
}
/* QEN */
-void qsl_nthw_qen_select(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qen_select(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qen_addr, val);
}
-void qsl_nthw_qen_cnt(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qen_cnt(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qen_cnt, val);
}
-void qsl_nthw_qen_en(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_qen_en(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_qen_data_en, val);
}
-void qsl_nthw_qen_flush(const struct qsl_nthw *p)
+void nthw_qsl_qen_flush(const struct qsl_nthw *p)
{
nthw_register_flush(p->mp_qen_ctrl, 1);
nthw_register_flush(p->mp_qen_data, 1);
}
/* UNMQ */
-void qsl_nthw_unmq_select(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_unmq_select(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_unmq_addr, val);
}
-void qsl_nthw_unmq_cnt(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_unmq_cnt(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_unmq_cnt, val);
}
-void qsl_nthw_unmq_dest_queue(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_unmq_dest_queue(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_unmq_data_dest_queue, val);
}
-void qsl_nthw_unmq_en(const struct qsl_nthw *p, uint32_t val)
+void nthw_qsl_unmq_en(const struct qsl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_unmq_data_en, val);
}
-void qsl_nthw_unmq_flush(const struct qsl_nthw *p)
+void nthw_qsl_unmq_flush(const struct qsl_nthw *p)
{
nthw_register_flush(p->mp_unmq_ctrl, 1);
nthw_register_flush(p->mp_unmq_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
index 1bbcd1cea6..b57546a09c 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_qsl.h
@@ -66,48 +66,48 @@ struct qsl_nthw {
typedef struct qsl_nthw qsl_nthw_t;
-struct qsl_nthw *qsl_nthw_new(void);
-void qsl_nthw_delete(struct qsl_nthw *p);
-int qsl_nthw_init(struct qsl_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct qsl_nthw *nthw_qsl_new(void);
+void nthw_qsl_delete(struct qsl_nthw *p);
+int nthw_qsl_init(struct qsl_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
-void qsl_nthw_set_debug_mode(struct qsl_nthw *p, unsigned int n_debug_mode);
+void nthw_qsl_set_debug_mode(struct qsl_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void qsl_nthw_rcp_select(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_cnt(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_discard(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_drop(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_tbl_lo(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_tbl_hi(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_tbl_idx(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_tbl_msk(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_lr(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_tsa(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_vli(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_rcp_flush(const struct qsl_nthw *p);
+void nthw_qsl_rcp_select(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_cnt(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_discard(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_drop(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_tbl_lo(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_tbl_hi(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_tbl_idx(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_tbl_msk(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_lr(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_tsa(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_vli(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_rcp_flush(const struct qsl_nthw *p);
/* QST */
-void qsl_nthw_qst_select(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_cnt(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_queue(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_en(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_tx_port(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_lre(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_tci(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_ven(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qst_flush(const struct qsl_nthw *p);
+void nthw_qsl_qst_select(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_cnt(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_queue(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_en(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_tx_port(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_lre(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_tci(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_ven(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qst_flush(const struct qsl_nthw *p);
/* QEN */
-void qsl_nthw_qen_select(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qen_cnt(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qen_en(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_qen_flush(const struct qsl_nthw *p);
+void nthw_qsl_qen_select(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qen_cnt(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qen_en(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_qen_flush(const struct qsl_nthw *p);
/* UNMQ */
-void qsl_nthw_unmq_select(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_unmq_cnt(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_unmq_dest_queue(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_unmq_en(const struct qsl_nthw *p, uint32_t val);
-void qsl_nthw_unmq_flush(const struct qsl_nthw *p);
+void nthw_qsl_unmq_select(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_unmq_cnt(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_unmq_dest_queue(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_unmq_en(const struct qsl_nthw *p, uint32_t val);
+void nthw_qsl_unmq_flush(const struct qsl_nthw *p);
#endif /* __FLOW_NTHW_QSL_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
index 1bb69e740f..07e6d38731 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c
@@ -12,12 +12,12 @@
#include "flow_nthw_rpp_lr.h"
-void rpp_lr_nthw_set_debug_mode(struct rpp_lr_nthw *p, unsigned int n_debug_mode)
+void nthw_rpp_lr_set_debug_mode(struct rpp_lr_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_rpp_lr, n_debug_mode);
}
-struct rpp_lr_nthw *rpp_lr_nthw_new(void)
+struct rpp_lr_nthw *nthw_rpp_lr_new(void)
{
struct rpp_lr_nthw *p = malloc(sizeof(struct rpp_lr_nthw));
@@ -27,7 +27,7 @@ struct rpp_lr_nthw *rpp_lr_nthw_new(void)
return p;
}
-void rpp_lr_nthw_delete(struct rpp_lr_nthw *p)
+void nthw_rpp_lr_delete(struct rpp_lr_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -35,7 +35,7 @@ void rpp_lr_nthw_delete(struct rpp_lr_nthw *p)
}
}
-int rpp_lr_nthw_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_rpp_lr_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_RPP_LR, n_instance);
@@ -83,25 +83,25 @@ int rpp_lr_nthw_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void rpp_lr_nthw_rcp_select(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_addr);
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void rpp_lr_nthw_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_cnt);
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void rpp_lr_nthw_rcp_exp(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_rcp_exp(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_data_exp);
nthw_field_set_val32(p->mp_rcp_data_exp, val);
}
-void rpp_lr_nthw_rcp_flush(const struct rpp_lr_nthw *p)
+void nthw_rpp_lr_rcp_flush(const struct rpp_lr_nthw *p)
{
RTE_ASSERT(p->mp_rcp_ctrl);
RTE_ASSERT(p->mp_rcp_data);
@@ -109,49 +109,49 @@ void rpp_lr_nthw_rcp_flush(const struct rpp_lr_nthw *p)
nthw_register_flush(p->mp_rcp_data, 1);
}
-void rpp_lr_nthw_ifr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_ifr_rcp_addr);
nthw_field_set_val32(p->mp_ifr_rcp_addr, val);
}
-void rpp_lr_nthw_ifr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_ifr_rcp_cnt);
nthw_field_set_val32(p->mp_ifr_rcp_cnt, val);
}
-void rpp_lr_nthw_ifr_rcp_ipv4_en(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_ipv4_en(const struct rpp_lr_nthw *p, uint32_t val)
{
if (p->mp_ifr_rcp_data_ipv4_en)
nthw_field_set_val32(p->mp_ifr_rcp_data_ipv4_en, val);
}
-void rpp_lr_nthw_ifr_rcp_ipv4_df_drop(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_ipv4_df_drop(const struct rpp_lr_nthw *p, uint32_t val)
{
if (p->mp_ifr_rcp_data_ipv4_df_drop)
nthw_field_set_val32(p->mp_ifr_rcp_data_ipv4_df_drop, val);
}
-void rpp_lr_nthw_ifr_rcp_ipv6_en(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_ipv6_en(const struct rpp_lr_nthw *p, uint32_t val)
{
if (p->mp_ifr_rcp_data_ipv6_en)
nthw_field_set_val32(p->mp_ifr_rcp_data_ipv6_en, val);
}
-void rpp_lr_nthw_ifr_rcp_ipv6_drop(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_ipv6_drop(const struct rpp_lr_nthw *p, uint32_t val)
{
if (p->mp_ifr_rcp_data_ipv6_drop)
nthw_field_set_val32(p->mp_ifr_rcp_data_ipv6_drop, val);
}
-void rpp_lr_nthw_ifr_rcp_mtu(const struct rpp_lr_nthw *p, uint32_t val)
+void nthw_rpp_lr_ifr_rcp_mtu(const struct rpp_lr_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_ifr_rcp_data_mtu);
nthw_field_set_val32(p->mp_ifr_rcp_data_mtu, val);
}
-void rpp_lr_nthw_ifr_rcp_flush(const struct rpp_lr_nthw *p)
+void nthw_rpp_lr_ifr_rcp_flush(const struct rpp_lr_nthw *p)
{
RTE_ASSERT(p->mp_ifr_rcp_ctrl);
RTE_ASSERT(p->mp_ifr_rcp_data);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
index bdb2e5fa54..e68df10cc2 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_rpp_lr.h
@@ -35,27 +35,27 @@ struct rpp_lr_nthw {
nthw_field_t *mp_ifr_rcp_data_ipv6_drop;
};
-struct rpp_lr_nthw *rpp_lr_nthw_new(void);
-void rpp_lr_nthw_delete(struct rpp_lr_nthw *p);
-int rpp_lr_nthw_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct rpp_lr_nthw *nthw_rpp_lr_new(void);
+void nthw_rpp_lr_delete(struct rpp_lr_nthw *p);
+int nthw_rpp_lr_init(struct rpp_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int rpp_lr_nthw_setup(struct rpp_lr_nthw *p, int n_idx, int n_idx_cnt);
-void rpp_lr_nthw_set_debug_mode(struct rpp_lr_nthw *p, unsigned int n_debug_mode);
+void nthw_rpp_lr_set_debug_mode(struct rpp_lr_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void rpp_lr_nthw_rcp_select(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_rcp_exp(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_rcp_flush(const struct rpp_lr_nthw *p);
+void nthw_rpp_lr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_rcp_exp(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_rcp_flush(const struct rpp_lr_nthw *p);
/* RCP IFR */
-void rpp_lr_nthw_ifr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_ipv4_en(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_ipv4_df_drop(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_ipv6_en(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_ipv6_drop(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_mtu(const struct rpp_lr_nthw *p, uint32_t val);
-void rpp_lr_nthw_ifr_rcp_flush(const struct rpp_lr_nthw *p);
+void nthw_rpp_lr_ifr_rcp_select(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_cnt(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_ipv4_en(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_ipv4_df_drop(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_ipv6_en(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_ipv6_drop(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_mtu(const struct rpp_lr_nthw *p, uint32_t val);
+void nthw_rpp_lr_ifr_rcp_flush(const struct rpp_lr_nthw *p);
#endif /* __FLOW_NTHW_RPP_LR_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
index f5030d1997..afe5597962 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.c
@@ -13,12 +13,12 @@
#include "flow_nthw_slc_lr.h"
-void slc_lr_nthw_set_debug_mode(struct slc_lr_nthw *p, unsigned int n_debug_mode)
+void nthw_slc_lr_set_debug_mode(struct slc_lr_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_slc_lr, n_debug_mode);
}
-struct slc_lr_nthw *slc_lr_nthw_new(void)
+struct slc_lr_nthw *nthw_slc_lr_new(void)
{
struct slc_lr_nthw *p = malloc(sizeof(struct slc_lr_nthw));
@@ -28,7 +28,7 @@ struct slc_lr_nthw *slc_lr_nthw_new(void)
return p;
}
-void slc_lr_nthw_delete(struct slc_lr_nthw *p)
+void nthw_slc_lr_delete(struct slc_lr_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -36,7 +36,7 @@ void slc_lr_nthw_delete(struct slc_lr_nthw *p)
}
}
-int slc_lr_nthw_init(struct slc_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_slc_lr_init(struct slc_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_SLC_LR, n_instance);
@@ -74,52 +74,52 @@ int slc_lr_nthw_init(struct slc_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
}
/* RCP */
-void slc_lr_nthw_rcp_select(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_select(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void slc_lr_nthw_rcp_cnt(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_cnt(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void slc_lr_nthw_rcp_head_slc_en(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_head_slc_en(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_head_slc_en, val);
}
-void slc_lr_nthw_rcp_head_dyn(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_head_dyn(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_head_dyn, val);
}
-void slc_lr_nthw_rcp_head_ofs(const struct slc_lr_nthw *p, int32_t val)
+void nthw_slc_lr_rcp_head_ofs(const struct slc_lr_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_head_ofs, val);
}
-void slc_lr_nthw_rcp_tail_slc_en(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_tail_slc_en(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tail_slc_en, val);
}
-void slc_lr_nthw_rcp_tail_dyn(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_tail_dyn(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tail_dyn, val);
}
-void slc_lr_nthw_rcp_tail_ofs(const struct slc_lr_nthw *p, int32_t val)
+void nthw_slc_lr_rcp_tail_ofs(const struct slc_lr_nthw *p, int32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_tail_ofs, val);
}
-void slc_lr_nthw_rcp_pcap(const struct slc_lr_nthw *p, uint32_t val)
+void nthw_slc_lr_rcp_pcap(const struct slc_lr_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_pcap, val);
}
-void slc_lr_nthw_rcp_flush(const struct slc_lr_nthw *p)
+void nthw_slc_lr_rcp_flush(const struct slc_lr_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
index 2eed32c022..6e8860d3dc 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_slc_lr.h
@@ -32,23 +32,23 @@ struct slc_lr_nthw {
typedef struct slc_lr_nthw slc_lr_nthw_t;
-struct slc_lr_nthw *slc_lr_nthw_new(void);
-void slc_lr_nthw_delete(struct slc_lr_nthw *p);
-int slc_lr_nthw_init(struct slc_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct slc_lr_nthw *nthw_slc_lr_new(void);
+void nthw_slc_lr_delete(struct slc_lr_nthw *p);
+int nthw_slc_lr_init(struct slc_lr_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int slc_lr_nthw_setup(struct slc_lr_nthw *p, int n_idx, int n_idx_cnt);
-void slc_lr_nthw_set_debug_mode(struct slc_lr_nthw *p, unsigned int n_debug_mode);
+void nthw_slc_lr_set_debug_mode(struct slc_lr_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void slc_lr_nthw_rcp_select(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_cnt(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_head_slc_en(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_head_dyn(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_head_ofs(const struct slc_lr_nthw *p, int32_t val);
-void slc_lr_nthw_rcp_tail_slc_en(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_tail_dyn(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_tail_ofs(const struct slc_lr_nthw *p, int32_t val);
-void slc_lr_nthw_rcp_pcap(const struct slc_lr_nthw *p, uint32_t val);
-void slc_lr_nthw_rcp_flush(const struct slc_lr_nthw *p);
+void nthw_slc_lr_rcp_select(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_cnt(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_head_slc_en(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_head_dyn(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_head_ofs(const struct slc_lr_nthw *p, int32_t val);
+void nthw_slc_lr_rcp_tail_slc_en(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_tail_dyn(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_tail_ofs(const struct slc_lr_nthw *p, int32_t val);
+void nthw_slc_lr_rcp_pcap(const struct slc_lr_nthw *p, uint32_t val);
+void nthw_slc_lr_rcp_flush(const struct slc_lr_nthw *p);
#endif /* __FLOW_NTHW_SLC_LR_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
index bb7b9c2946..9841a9a7b8 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c
@@ -12,12 +12,12 @@
#include "flow_nthw_tx_cpy.h"
-void tx_cpy_nthw_set_debug_mode(struct tx_cpy_nthw *p, unsigned int n_debug_mode)
+void nthw_tx_cpy_set_debug_mode(struct tx_cpy_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_tx_cpy, n_debug_mode);
}
-struct tx_cpy_nthw *tx_cpy_nthw_new(void)
+struct tx_cpy_nthw *nthw_tx_cpy_new(void)
{
struct tx_cpy_nthw *p = malloc(sizeof(struct tx_cpy_nthw));
@@ -27,7 +27,7 @@ struct tx_cpy_nthw *tx_cpy_nthw_new(void)
return p;
}
-void tx_cpy_nthw_delete(struct tx_cpy_nthw *p)
+void nthw_tx_cpy_delete(struct tx_cpy_nthw *p)
{
if (p) {
free(p->m_writers);
@@ -36,7 +36,7 @@ void tx_cpy_nthw_delete(struct tx_cpy_nthw *p)
}
}
-int tx_cpy_nthw_init(struct tx_cpy_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_tx_cpy_init(struct tx_cpy_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_TX_CPY, n_instance);
@@ -343,44 +343,44 @@ int tx_cpy_nthw_init(struct tx_cpy_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void tx_cpy_nthw_writer_select(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
+void nthw_tx_cpy_writer_select(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_ctrl_addr, val);
}
-void tx_cpy_nthw_writer_cnt(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
+void nthw_tx_cpy_writer_cnt(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_ctrl_cnt, val);
}
-void tx_cpy_nthw_writer_reader_select(const struct tx_cpy_nthw *p, unsigned int index,
+void nthw_tx_cpy_writer_reader_select(const struct tx_cpy_nthw *p, unsigned int index,
uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_data_reader_select, val);
}
-void tx_cpy_nthw_writer_dyn(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
+void nthw_tx_cpy_writer_dyn(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_data_dyn, val);
}
-void tx_cpy_nthw_writer_ofs(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
+void nthw_tx_cpy_writer_ofs(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_data_ofs, val);
}
-void tx_cpy_nthw_writer_len(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
+void nthw_tx_cpy_writer_len(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_field_set_val32(p->m_writers[index].mp_writer_data_len, val);
}
-void tx_cpy_nthw_writer_flush(const struct tx_cpy_nthw *p, unsigned int index)
+void nthw_tx_cpy_writer_flush(const struct tx_cpy_nthw *p, unsigned int index)
{
RTE_ASSERT(index < p->m_writers_cnt);
nthw_register_flush(p->m_writers[index].mp_writer_ctrl, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
index c1094c09a9..c3b3129fa5 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_cpy.h
@@ -40,20 +40,20 @@ struct tx_cpy_nthw {
struct tx_cpy_writers_s *m_writers;
};
-struct tx_cpy_nthw *tx_cpy_nthw_new(void);
-void tx_cpy_nthw_delete(struct tx_cpy_nthw *p);
-int tx_cpy_nthw_init(struct tx_cpy_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct tx_cpy_nthw *nthw_tx_cpy_new(void);
+void nthw_tx_cpy_delete(struct tx_cpy_nthw *p);
+int nthw_tx_cpy_init(struct tx_cpy_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int tx_cpy_nthw_setup(struct tx_cpy_nthw *p, int n_idx, int n_idx_cnt);
-void tx_cpy_nthw_set_debug_mode(struct tx_cpy_nthw *p, unsigned int n_debug_mode);
+void nthw_tx_cpy_set_debug_mode(struct tx_cpy_nthw *p, unsigned int n_debug_mode);
-void tx_cpy_nthw_writer_select(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
-void tx_cpy_nthw_writer_cnt(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
-void tx_cpy_nthw_writer_reader_select(const struct tx_cpy_nthw *p, unsigned int index,
+void nthw_tx_cpy_writer_select(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
+void nthw_tx_cpy_writer_cnt(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
+void nthw_tx_cpy_writer_reader_select(const struct tx_cpy_nthw *p, unsigned int index,
uint32_t val);
-void tx_cpy_nthw_writer_dyn(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
-void tx_cpy_nthw_writer_ofs(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
-void tx_cpy_nthw_writer_len(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
-void tx_cpy_nthw_writer_flush(const struct tx_cpy_nthw *p, unsigned int index);
+void nthw_tx_cpy_writer_dyn(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
+void nthw_tx_cpy_writer_ofs(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
+void nthw_tx_cpy_writer_len(const struct tx_cpy_nthw *p, unsigned int index, uint32_t val);
+void nthw_tx_cpy_writer_flush(const struct tx_cpy_nthw *p, unsigned int index);
#endif /* __FLOW_NTHW_TX_CPY_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
index 2409875a5a..63ead6c925 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.c
@@ -12,12 +12,12 @@
#include "flow_nthw_tx_ins.h"
-void tx_ins_nthw_set_debug_mode(struct tx_ins_nthw *p, unsigned int n_debug_mode)
+void nthw_tx_ins_set_debug_mode(struct tx_ins_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_tx_ins, n_debug_mode);
}
-struct tx_ins_nthw *tx_ins_nthw_new(void)
+struct tx_ins_nthw *nthw_tx_ins_new(void)
{
struct tx_ins_nthw *p = malloc(sizeof(struct tx_ins_nthw));
@@ -27,7 +27,7 @@ struct tx_ins_nthw *tx_ins_nthw_new(void)
return p;
}
-void tx_ins_nthw_delete(struct tx_ins_nthw *p)
+void nthw_tx_ins_delete(struct tx_ins_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -35,7 +35,7 @@ void tx_ins_nthw_delete(struct tx_ins_nthw *p)
}
}
-int tx_ins_nthw_init(struct tx_ins_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_tx_ins_init(struct tx_ins_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_TX_INS, n_instance);
@@ -66,32 +66,32 @@ int tx_ins_nthw_init(struct tx_ins_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void tx_ins_nthw_rcp_select(const struct tx_ins_nthw *p, uint32_t val)
+void nthw_tx_ins_rcp_select(const struct tx_ins_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_addr, val);
}
-void tx_ins_nthw_rcp_cnt(const struct tx_ins_nthw *p, uint32_t val)
+void nthw_tx_ins_rcp_cnt(const struct tx_ins_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_cnt, val);
}
-void tx_ins_nthw_rcp_dyn(const struct tx_ins_nthw *p, uint32_t val)
+void nthw_tx_ins_rcp_dyn(const struct tx_ins_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dyn, val);
}
-void tx_ins_nthw_rcp_ofs(const struct tx_ins_nthw *p, uint32_t val)
+void nthw_tx_ins_rcp_ofs(const struct tx_ins_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs, val);
}
-void tx_ins_nthw_rcp_len(const struct tx_ins_nthw *p, uint32_t val)
+void nthw_tx_ins_rcp_len(const struct tx_ins_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len, val);
}
-void tx_ins_nthw_rcp_flush(const struct tx_ins_nthw *p)
+void nthw_tx_ins_rcp_flush(const struct tx_ins_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
index b87b9dcac3..b58f3d2e28 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_ins.h
@@ -26,19 +26,19 @@ struct tx_ins_nthw {
nthw_field_t *mp_rcp_data_len;
};
-struct tx_ins_nthw *tx_ins_nthw_new(void);
-void tx_ins_nthw_delete(struct tx_ins_nthw *p);
-int tx_ins_nthw_init(struct tx_ins_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct tx_ins_nthw *nthw_tx_ins_new(void);
+void nthw_tx_ins_delete(struct tx_ins_nthw *p);
+int nthw_tx_ins_init(struct tx_ins_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int tx_ins_nthw_setup(struct tx_ins_nthw *p, int n_idx, int n_idx_cnt);
-void tx_ins_nthw_set_debug_mode(struct tx_ins_nthw *p, unsigned int n_debug_mode);
+void nthw_tx_ins_set_debug_mode(struct tx_ins_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void tx_ins_nthw_rcp_select(const struct tx_ins_nthw *p, uint32_t val);
-void tx_ins_nthw_rcp_cnt(const struct tx_ins_nthw *p, uint32_t val);
-void tx_ins_nthw_rcp_dyn(const struct tx_ins_nthw *p, uint32_t val);
-void tx_ins_nthw_rcp_ofs(const struct tx_ins_nthw *p, uint32_t val);
-void tx_ins_nthw_rcp_len(const struct tx_ins_nthw *p, uint32_t val);
-void tx_ins_nthw_rcp_flush(const struct tx_ins_nthw *p);
+void nthw_tx_ins_rcp_select(const struct tx_ins_nthw *p, uint32_t val);
+void nthw_tx_ins_rcp_cnt(const struct tx_ins_nthw *p, uint32_t val);
+void nthw_tx_ins_rcp_dyn(const struct tx_ins_nthw *p, uint32_t val);
+void nthw_tx_ins_rcp_ofs(const struct tx_ins_nthw *p, uint32_t val);
+void nthw_tx_ins_rcp_len(const struct tx_ins_nthw *p, uint32_t val);
+void nthw_tx_ins_rcp_flush(const struct tx_ins_nthw *p);
#endif /* __FLOW_NTHW_TX_INS_H__ */
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
index b787c38ee2..4eb2e69e78 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c
@@ -12,12 +12,12 @@
#include "flow_nthw_tx_rpl.h"
-void tx_rpl_nthw_set_debug_mode(struct tx_rpl_nthw *p, unsigned int n_debug_mode)
+void nthw_tx_rpl_set_debug_mode(struct tx_rpl_nthw *p, unsigned int n_debug_mode)
{
nthw_module_set_debug_mode(p->m_tx_rpl, n_debug_mode);
}
-struct tx_rpl_nthw *tx_rpl_nthw_new(void)
+struct tx_rpl_nthw *nthw_tx_rpl_new(void)
{
struct tx_rpl_nthw *p = malloc(sizeof(struct tx_rpl_nthw));
@@ -27,7 +27,7 @@ struct tx_rpl_nthw *tx_rpl_nthw_new(void)
return p;
}
-void tx_rpl_nthw_delete(struct tx_rpl_nthw *p)
+void nthw_tx_rpl_delete(struct tx_rpl_nthw *p)
{
if (p) {
memset(p, 0, sizeof(*p));
@@ -35,7 +35,7 @@ void tx_rpl_nthw_delete(struct tx_rpl_nthw *p)
}
}
-int tx_rpl_nthw_init(struct tx_rpl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_tx_rpl_init(struct tx_rpl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
{
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
nthw_module_t *p_mod = nthw_fpga_query_module(p_fpga, MOD_TX_RPL, n_instance);
@@ -82,90 +82,90 @@ int tx_rpl_nthw_init(struct tx_rpl_nthw *p, nthw_fpga_t *p_fpga, int n_instance)
return 0;
}
-void tx_rpl_nthw_rcp_select(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_select(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_addr, val);
}
-void tx_rpl_nthw_rcp_cnt(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_cnt(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_ctrl_cnt, val);
}
-void tx_rpl_nthw_rcp_dyn(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_dyn(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_dyn, val);
}
-void tx_rpl_nthw_rcp_ofs(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_ofs(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ofs, val);
}
-void tx_rpl_nthw_rcp_len(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_len(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_len, val);
}
-void tx_rpl_nthw_rcp_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_rpl_ptr, val);
}
-void tx_rpl_nthw_rcp_ext_prio(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_ext_prio(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rcp_data_ext_prio, val);
}
-void tx_rpl_nthw_rcp_eth_type_wr(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rcp_eth_type_wr(const struct tx_rpl_nthw *p, uint32_t val)
{
RTE_ASSERT(p->mp_rcp_data_eth_type_wr);
nthw_field_set_val32(p->mp_rcp_data_eth_type_wr, val);
}
-void tx_rpl_nthw_rcp_flush(const struct tx_rpl_nthw *p)
+void nthw_tx_rpl_rcp_flush(const struct tx_rpl_nthw *p)
{
nthw_register_flush(p->mp_rcp_ctrl, 1);
nthw_register_flush(p->mp_rcp_data, 1);
}
-void tx_rpl_nthw_ext_select(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_ext_select(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_ext_ctrl_addr, val);
}
-void tx_rpl_nthw_ext_cnt(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_ext_cnt(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_ext_ctrl_cnt, val);
}
-void tx_rpl_nthw_ext_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_ext_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_ext_data_rpl_ptr, val);
}
-void tx_rpl_nthw_ext_flush(const struct tx_rpl_nthw *p)
+void nthw_tx_rpl_ext_flush(const struct tx_rpl_nthw *p)
{
nthw_register_flush(p->mp_ext_ctrl, 1);
nthw_register_flush(p->mp_ext_data, 1);
}
-void tx_rpl_nthw_rpl_select(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rpl_select(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rpl_ctrl_addr, val);
}
-void tx_rpl_nthw_rpl_cnt(const struct tx_rpl_nthw *p, uint32_t val)
+void nthw_tx_rpl_rpl_cnt(const struct tx_rpl_nthw *p, uint32_t val)
{
nthw_field_set_val32(p->mp_rpl_ctrl_cnt, val);
}
-void tx_rpl_nthw_rpl_value(const struct tx_rpl_nthw *p, const uint32_t *val)
+void nthw_tx_rpl_rpl_value(const struct tx_rpl_nthw *p, const uint32_t *val)
{
nthw_field_set_val(p->mp_rpl_data_value, val, 4);
}
-void tx_rpl_nthw_rpl_flush(const struct tx_rpl_nthw *p)
+void nthw_tx_rpl_rpl_flush(const struct tx_rpl_nthw *p)
{
nthw_register_flush(p->mp_rpl_ctrl, 1);
nthw_register_flush(p->mp_rpl_data, 1);
diff --git a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
index f743b418f0..77fe9373ee 100644
--- a/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
+++ b/drivers/net/ntnic/nthw/flow_filter/flow_nthw_tx_rpl.h
@@ -43,32 +43,32 @@ struct tx_rpl_nthw {
nthw_field_t *mp_rpl_data_value;
};
-struct tx_rpl_nthw *tx_rpl_nthw_new(void);
-void tx_rpl_nthw_delete(struct tx_rpl_nthw *p);
-int tx_rpl_nthw_init(struct tx_rpl_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
+struct tx_rpl_nthw *nthw_tx_rpl_new(void);
+void nthw_tx_rpl_delete(struct tx_rpl_nthw *p);
+int nthw_tx_rpl_init(struct tx_rpl_nthw *p, nthw_fpga_t *p_fpga, int n_instance);
int tx_rpl_nthw_setup(struct tx_rpl_nthw *p, int n_idx, int n_idx_cnt);
-void tx_rpl_nthw_set_debug_mode(struct tx_rpl_nthw *p, unsigned int n_debug_mode);
+void nthw_tx_rpl_set_debug_mode(struct tx_rpl_nthw *p, unsigned int n_debug_mode);
/* RCP */
-void tx_rpl_nthw_rcp_select(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_cnt(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_dyn(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_ofs(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_len(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_ext_prio(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_eth_type_wr(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rcp_flush(const struct tx_rpl_nthw *p);
-
-void tx_rpl_nthw_ext_select(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_ext_cnt(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_ext_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_ext_flush(const struct tx_rpl_nthw *p);
-
-void tx_rpl_nthw_rpl_select(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rpl_cnt(const struct tx_rpl_nthw *p, uint32_t val);
-void tx_rpl_nthw_rpl_value(const struct tx_rpl_nthw *p, const uint32_t *val);
-void tx_rpl_nthw_rpl_flush(const struct tx_rpl_nthw *p);
+void nthw_tx_rpl_rcp_select(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_cnt(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_dyn(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_ofs(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_len(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_ext_prio(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_eth_type_wr(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rcp_flush(const struct tx_rpl_nthw *p);
+
+void nthw_tx_rpl_ext_select(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_ext_cnt(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_ext_rpl_ptr(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_ext_flush(const struct tx_rpl_nthw *p);
+
+void nthw_tx_rpl_rpl_select(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rpl_cnt(const struct tx_rpl_nthw *p, uint32_t val);
+void nthw_tx_rpl_rpl_value(const struct tx_rpl_nthw *p, const uint32_t *val);
+void nthw_tx_rpl_rpl_flush(const struct tx_rpl_nthw *p);
#endif /* __FLOW_NTHW_TX_RPL_H__ */
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index 0b8958c4c1..9e269eb69f 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -42,16 +42,16 @@ static const char *get_bus_name(int n_bus_type_id)
static const struct {
const nthw_id_t a;
const char *b;
-} *sa_nthw_fpga_mod_str_map;
+} *nthw_sa_fpga_mod_str_map;
static const char *nthw_fpga_mod_id_to_str(nthw_id_t n_fpga_mod_id)
{
int i;
- if (sa_nthw_fpga_mod_str_map) {
- for (i = 0; sa_nthw_fpga_mod_str_map[i].a && sa_nthw_fpga_mod_str_map[i].b; i++)
- if ((nthw_id_t)sa_nthw_fpga_mod_str_map[i].a == n_fpga_mod_id)
- return sa_nthw_fpga_mod_str_map[i].b;
+ if (nthw_sa_fpga_mod_str_map) {
+ for (i = 0; nthw_sa_fpga_mod_str_map[i].a && nthw_sa_fpga_mod_str_map[i].b; i++)
+ if ((nthw_id_t)nthw_sa_fpga_mod_str_map[i].a == n_fpga_mod_id)
+ return nthw_sa_fpga_mod_str_map[i].b;
}
return "unknown";
@@ -372,7 +372,7 @@ void nthw_fpga_mgr_init(nthw_fpga_mgr_t *p, struct nthw_fpga_prod_init **pa_nthw
size_t i = 0;
p->mpa_fpga_prod_init = pa_nthw_fpga_instances;
- sa_nthw_fpga_mod_str_map = pa_mod_str_map;
+ nthw_sa_fpga_mod_str_map = pa_mod_str_map;
/* Count fpga instance in array */
if (pa_nthw_fpga_instances) {
diff --git a/drivers/net/ntnic/nthw/nthw_platform.c b/drivers/net/ntnic/nthw/nthw_platform.c
index 80063c9d25..6f2582d6fe 100644
--- a/drivers/net/ntnic/nthw/nthw_platform.c
+++ b/drivers/net/ntnic/nthw/nthw_platform.c
@@ -5,7 +5,7 @@
#include "nthw_platform_drv.h"
-nthw_adapter_id_t nthw_platform_get_nthw_adapter_id(const uint16_t n_pci_device_id)
+nthw_adapter_id_t nthw_platform_get_adapter_id(const uint16_t n_pci_device_id)
{
switch (n_pci_device_id) {
case NT_HW_PCI_DEVICE_ID_NT200A02:
diff --git a/drivers/net/ntnic/nthw/nthw_platform_drv.h b/drivers/net/ntnic/nthw/nthw_platform_drv.h
index df54dcead0..db2bc05180 100644
--- a/drivers/net/ntnic/nthw/nthw_platform_drv.h
+++ b/drivers/net/ntnic/nthw/nthw_platform_drv.h
@@ -20,6 +20,6 @@ enum nthw_adapter_id_e {
typedef enum nthw_adapter_id_e nthw_adapter_id_t;
-nthw_adapter_id_t nthw_platform_get_nthw_adapter_id(const uint16_t n_pci_device_id);
+nthw_adapter_id_t nthw_platform_get_adapter_id(const uint16_t n_pci_device_id);
#endif /* __NTHW_PLATFORM_DRV_H__ */
diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c
index a0afa22579..816d4ff781 100644
--- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c
+++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.c
@@ -5,7 +5,7 @@
#include "nthw_fpga_mod_str_map.h"
-const struct nthw_fpga_mod_str_s sa_nthw_fpga_mod_str_map[] = {
+const struct nthw_fpga_mod_str_s nthw_sa_fpga_mod_str_map[] = {
{ MOD_CAT, "CAT" },
{ MOD_CPY, "CPY" },
{ MOD_CSU, "CSU" },
diff --git a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.h b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.h
index 9442bb2d20..a6da8912b1 100644
--- a/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.h
+++ b/drivers/net/ntnic/nthw/supported/nthw_fpga_mod_str_map.h
@@ -10,4 +10,4 @@ struct nthw_fpga_mod_str_s {
const nthw_id_t a;
const char *b;
};
-extern const struct nthw_fpga_mod_str_s sa_nthw_fpga_mod_str_map[];
+extern const struct nthw_fpga_mod_str_s nthw_sa_fpga_mod_str_map[];
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 04/16] net/ntnic: change prefix hw_ to prefix nthw_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (2 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 03/16] net/ntnic: move nthw_ to prefix Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 05/16] net/ntnic: modify prefix flow_ with " Serhii Iliushyk
` (11 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change all prefix hw_ to prefix nthw_ to specify that this is Napatech
hardware module.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/include/hw_mod_backend.h | 266 +++----
drivers/net/ntnic/nthw/flow_api/flow_api.c | 26 +-
.../net/ntnic/nthw/flow_api/flow_hsh_cfg.c | 38 +-
drivers/net/ntnic/nthw/flow_api/flow_km.c | 118 +--
.../nthw/flow_api/hw_mod/hw_mod_backend.c | 18 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c | 140 ++--
.../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c | 70 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c | 14 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_km.c | 40 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c | 14 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c | 32 +-
.../nthw/flow_api/hw_mod/hw_mod_slc_lr.c | 14 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c | 74 +-
.../profile_inline/flow_api_hw_db_inline.c | 675 +++++++++---------
.../profile_inline/flow_api_hw_db_inline.h | 46 +-
.../profile_inline/flow_api_profile_inline.c | 291 ++++----
drivers/net/ntnic/ntnic_ethdev.c | 2 +-
drivers/net/ntnic/ntnic_mod_reg.h | 2 +-
18 files changed, 948 insertions(+), 932 deletions(-)
diff --git a/drivers/net/ntnic/include/hw_mod_backend.h b/drivers/net/ntnic/include/hw_mod_backend.h
index 455bc7236e..8d938084e9 100644
--- a/drivers/net/ntnic/include/hw_mod_backend.h
+++ b/drivers/net/ntnic/include/hw_mod_backend.h
@@ -353,66 +353,66 @@ enum hw_cat_e {
/* 64 */ HW_CAT_CFN_ERR_TNL_TTL_EXP,
};
-bool hw_mod_cat_present(struct flow_api_backend_s *be);
-int hw_mod_cat_alloc(struct flow_api_backend_s *be);
-void hw_mod_cat_free(struct flow_api_backend_s *be);
-int hw_mod_cat_reset(struct flow_api_backend_s *be);
-int hw_mod_cat_cfn_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_cfn_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index, int word_off,
- uint32_t value);
+bool nthw_mod_cat_present(struct flow_api_backend_s *be);
+int nthw_mod_cat_alloc(struct flow_api_backend_s *be);
+void nthw_mod_cat_free(struct flow_api_backend_s *be);
+int nthw_mod_cat_reset(struct flow_api_backend_s *be);
+int nthw_mod_cat_cfn_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_cat_cfn_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+ int index, int word_off, uint32_t value);
/* KCE/KCS/FTE KM */
-int hw_mod_cat_kce_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kce_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_kce_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_kce_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
-int hw_mod_cat_kcs_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kcs_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_kcs_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_kcs_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
-int hw_mod_cat_fte_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_fte_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_fte_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_fte_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
/* KCE/KCS/FTE FLM */
-int hw_mod_cat_kce_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kce_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_kce_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_kce_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
-int hw_mod_cat_kcs_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kcs_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_kcs_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_kcs_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
-int hw_mod_cat_fte_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_fte_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count);
-int hw_mod_cat_fte_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value);
-int hw_mod_cat_fte_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value);
-int hw_mod_cat_cte_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_cte_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cte_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_cat_cte_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value);
-int hw_mod_cat_cte_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cte_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t *value);
-int hw_mod_cat_cts_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_cts_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cts_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_cat_cts_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value);
-int hw_mod_cat_cts_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cts_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t *value);
-int hw_mod_cat_cot_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cot_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value);
struct km_func_s {
@@ -500,28 +500,28 @@ enum hw_km_e {
HW_KM_TCQ_BANK_MASK,
HW_KM_TCQ_QUAL
};
-bool hw_mod_km_present(struct flow_api_backend_s *be);
-int hw_mod_km_alloc(struct flow_api_backend_s *be);
-void hw_mod_km_free(struct flow_api_backend_s *be);
-int hw_mod_km_reset(struct flow_api_backend_s *be);
-int hw_mod_km_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_km_rcp_set(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
+bool nthw_mod_km_present(struct flow_api_backend_s *be);
+int nthw_mod_km_alloc(struct flow_api_backend_s *be);
+void nthw_mod_km_free(struct flow_api_backend_s *be);
+int nthw_mod_km_reset(struct flow_api_backend_s *be);
+int nthw_mod_km_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_km_rcp_set(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
uint32_t value);
-int hw_mod_km_rcp_get(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
+int nthw_mod_km_rcp_get(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
uint32_t *value);
-int hw_mod_km_cam_flush(struct flow_api_backend_s *be, int start_bank, int start_record,
+int nthw_mod_km_cam_flush(struct flow_api_backend_s *be, int start_bank, int start_record,
int count);
-int hw_mod_km_cam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
+int nthw_mod_km_cam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
uint32_t value);
-int hw_mod_km_tcam_flush(struct flow_api_backend_s *be, int start_bank, int count);
-int hw_mod_km_tcam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
+int nthw_mod_km_tcam_flush(struct flow_api_backend_s *be, int start_bank, int count);
+int nthw_mod_km_tcam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
int byte_val, uint32_t *value_set);
-int hw_mod_km_tcam_get(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
+int nthw_mod_km_tcam_get(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
int byte_val, uint32_t *value_set);
-int hw_mod_km_tci_flush(struct flow_api_backend_s *be, int start_bank, int start_record,
+int nthw_mod_km_tci_flush(struct flow_api_backend_s *be, int start_bank, int start_record,
int count);
-int hw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
+int nthw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
uint32_t value);
struct flm_func_s {
COMMON_FUNC_INFO_S;
@@ -641,55 +641,55 @@ enum hw_flm_e {
HW_FLM_SCRUB_INF, /* module ver 0.24 */
};
-bool hw_mod_flm_present(struct flow_api_backend_s *be);
-int hw_mod_flm_alloc(struct flow_api_backend_s *be);
-void hw_mod_flm_free(struct flow_api_backend_s *be);
-int hw_mod_flm_reset(struct flow_api_backend_s *be);
+bool nthw_mod_flm_present(struct flow_api_backend_s *be);
+int nthw_mod_flm_alloc(struct flow_api_backend_s *be);
+void nthw_mod_flm_free(struct flow_api_backend_s *be);
+int nthw_mod_flm_reset(struct flow_api_backend_s *be);
-int hw_mod_flm_control_flush(struct flow_api_backend_s *be);
-int hw_mod_flm_control_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
+int nthw_mod_flm_control_flush(struct flow_api_backend_s *be);
+int nthw_mod_flm_control_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
-int hw_mod_flm_status_update(struct flow_api_backend_s *be);
-int hw_mod_flm_status_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
+int nthw_mod_flm_status_update(struct flow_api_backend_s *be);
+int nthw_mod_flm_status_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
-int hw_mod_flm_scan_flush(struct flow_api_backend_s *be);
-int hw_mod_flm_scan_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
+int nthw_mod_flm_scan_flush(struct flow_api_backend_s *be);
+int nthw_mod_flm_scan_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
-int hw_mod_flm_load_bin_flush(struct flow_api_backend_s *be);
-int hw_mod_flm_load_bin_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
+int nthw_mod_flm_load_bin_flush(struct flow_api_backend_s *be);
+int nthw_mod_flm_load_bin_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
-int hw_mod_flm_prio_flush(struct flow_api_backend_s *be);
-int hw_mod_flm_prio_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
+int nthw_mod_flm_prio_flush(struct flow_api_backend_s *be);
+int nthw_mod_flm_prio_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value);
-int hw_mod_flm_pst_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_flm_pst_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_pst_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_flm_pst_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value);
-int hw_mod_flm_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_flm_rcp_set_mask(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_flm_rcp_set_mask(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t *value);
-int hw_mod_flm_rcp_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_rcp_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value);
-int hw_mod_flm_buf_ctrl_update(struct flow_api_backend_s *be);
-int hw_mod_flm_buf_ctrl_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
+int nthw_mod_flm_buf_ctrl_update(struct flow_api_backend_s *be);
+int nthw_mod_flm_buf_ctrl_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
-int hw_mod_flm_stat_update(struct flow_api_backend_s *be);
-int hw_mod_flm_stat_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
+int nthw_mod_flm_stat_update(struct flow_api_backend_s *be);
+int nthw_mod_flm_stat_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value);
-int hw_mod_flm_lrn_data_set_flush(struct flow_api_backend_s *be, enum hw_flm_e field,
+int nthw_mod_flm_lrn_data_set_flush(struct flow_api_backend_s *be, enum hw_flm_e field,
const uint32_t *value, uint32_t records,
uint32_t *handled_records, uint32_t *inf_word_cnt,
uint32_t *sta_word_cnt);
-int hw_mod_flm_inf_sta_data_update_get(struct flow_api_backend_s *be, enum hw_flm_e field,
+int nthw_mod_flm_inf_sta_data_update_get(struct flow_api_backend_s *be, enum hw_flm_e field,
uint32_t *inf_value, uint32_t inf_size,
uint32_t *inf_word_cnt, uint32_t *sta_value,
uint32_t sta_size, uint32_t *sta_word_cnt);
-uint32_t hw_mod_flm_scrub_timeout_decode(uint32_t t_enc);
-uint32_t hw_mod_flm_scrub_timeout_encode(uint32_t t);
-int hw_mod_flm_scrub_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_flm_scrub_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+uint32_t nthw_mod_flm_scrub_timeout_decode(uint32_t t_enc);
+uint32_t nthw_mod_flm_scrub_timeout_encode(uint32_t t);
+int nthw_mod_flm_scrub_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_flm_scrub_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value);
struct hsh_func_s {
@@ -731,12 +731,12 @@ enum hw_hsh_e {
HW_HSH_RCP_K,
HW_HSH_RCP_AUTO_IPV4_MASK
};
-bool hw_mod_hsh_present(struct flow_api_backend_s *be);
-int hw_mod_hsh_alloc(struct flow_api_backend_s *be);
-void hw_mod_hsh_free(struct flow_api_backend_s *be);
-int hw_mod_hsh_reset(struct flow_api_backend_s *be);
-int hw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_hsh_rcp_set(struct flow_api_backend_s *be, enum hw_hsh_e field, uint32_t index,
+bool nthw_mod_hsh_present(struct flow_api_backend_s *be);
+int nthw_mod_hsh_alloc(struct flow_api_backend_s *be);
+void nthw_mod_hsh_free(struct flow_api_backend_s *be);
+int nthw_mod_hsh_reset(struct flow_api_backend_s *be);
+int nthw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_hsh_rcp_set(struct flow_api_backend_s *be, enum hw_hsh_e field, uint32_t index,
uint32_t word_off, uint32_t value);
struct qsl_func_s {
@@ -773,23 +773,23 @@ enum hw_qsl_e {
HW_QSL_UNMQ_DEST_QUEUE,
HW_QSL_UNMQ_EN,
};
-bool hw_mod_qsl_present(struct flow_api_backend_s *be);
-int hw_mod_qsl_alloc(struct flow_api_backend_s *be);
-void hw_mod_qsl_free(struct flow_api_backend_s *be);
-int hw_mod_qsl_reset(struct flow_api_backend_s *be);
-int hw_mod_qsl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_qsl_rcp_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+bool nthw_mod_qsl_present(struct flow_api_backend_s *be);
+int nthw_mod_qsl_alloc(struct flow_api_backend_s *be);
+void nthw_mod_qsl_free(struct flow_api_backend_s *be);
+int nthw_mod_qsl_reset(struct flow_api_backend_s *be);
+int nthw_mod_qsl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_qsl_rcp_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value);
-int hw_mod_qsl_qst_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_qsl_qst_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qst_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_qsl_qst_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value);
-int hw_mod_qsl_qen_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_qsl_qen_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qen_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_qsl_qen_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value);
-int hw_mod_qsl_qen_get(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qen_get(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t *value);
-int hw_mod_qsl_unmq_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_qsl_unmq_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_unmq_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_qsl_unmq_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value);
struct slc_lr_func_s {
@@ -812,12 +812,12 @@ enum hw_slc_lr_e {
HW_SLC_LR_RCP_TAIL_OFS,
HW_SLC_LR_RCP_PCAP
};
-bool hw_mod_slc_lr_present(struct flow_api_backend_s *be);
-int hw_mod_slc_lr_alloc(struct flow_api_backend_s *be);
-void hw_mod_slc_lr_free(struct flow_api_backend_s *be);
-int hw_mod_slc_lr_reset(struct flow_api_backend_s *be);
-int hw_mod_slc_lr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_slc_lr_rcp_set(struct flow_api_backend_s *be, enum hw_slc_lr_e field, uint32_t index,
+bool nthw_mod_slc_lr_present(struct flow_api_backend_s *be);
+int nthw_mod_slc_lr_alloc(struct flow_api_backend_s *be);
+void nthw_mod_slc_lr_free(struct flow_api_backend_s *be);
+int nthw_mod_slc_lr_reset(struct flow_api_backend_s *be);
+int nthw_mod_slc_lr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_slc_lr_rcp_set(struct flow_api_backend_s *be, enum hw_slc_lr_e field, uint32_t index,
uint32_t value);
struct pdb_func_s {
@@ -855,12 +855,12 @@ enum hw_pdb_e {
HW_PDB_CONFIG_TS_FORMAT,
HW_PDB_CONFIG_PORT_OFS,
};
-bool hw_mod_pdb_present(struct flow_api_backend_s *be);
-int hw_mod_pdb_alloc(struct flow_api_backend_s *be);
-void hw_mod_pdb_free(struct flow_api_backend_s *be);
-int hw_mod_pdb_reset(struct flow_api_backend_s *be);
-int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint32_t index,
+bool nthw_mod_pdb_present(struct flow_api_backend_s *be);
+int nthw_mod_pdb_alloc(struct flow_api_backend_s *be);
+void nthw_mod_pdb_free(struct flow_api_backend_s *be);
+int nthw_mod_pdb_reset(struct flow_api_backend_s *be);
+int nthw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint32_t index,
uint32_t value);
struct tpe_func_s {
@@ -930,53 +930,53 @@ enum hw_tpe_e {
HW_TPE_CSU_RCP_INNER_L3_CMD,
HW_TPE_CSU_RCP_INNER_L4_CMD,
};
-bool hw_mod_tpe_present(struct flow_api_backend_s *be);
-int hw_mod_tpe_alloc(struct flow_api_backend_s *be);
-void hw_mod_tpe_free(struct flow_api_backend_s *be);
-int hw_mod_tpe_reset(struct flow_api_backend_s *be);
+bool nthw_mod_tpe_present(struct flow_api_backend_s *be);
+int nthw_mod_tpe_alloc(struct flow_api_backend_s *be);
+void nthw_mod_tpe_free(struct flow_api_backend_s *be);
+int nthw_mod_tpe_reset(struct flow_api_backend_s *be);
-int hw_mod_tpe_rpp_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_rpp_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpp_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_rpp_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_rpp_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_rpp_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpp_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_rpp_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_ifr_counters_update(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ifr_counters_update(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value);
-int hw_mod_tpe_ins_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_ins_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ins_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_ins_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_rpl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_rpl_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_rpl_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_rpl_ext_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_rpl_ext_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_ext_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_rpl_ext_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_rpl_rpl_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_rpl_rpl_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_rpl_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_rpl_rpl_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value);
-int hw_mod_tpe_cpy_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_cpy_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_cpy_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_cpy_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_hfu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_hfu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_hfu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_hfu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
-int hw_mod_tpe_csu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
-int hw_mod_tpe_csu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_csu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count);
+int nthw_mod_tpe_csu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value);
enum debug_mode_e {
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index 97594bd26d..dd25b51e14 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -418,19 +418,19 @@ static int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
* remove unmatched queue if setup in QSL
* remove exception queue setting in QSL UNM
*/
- hw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_DEST_QUEUE, eth_dev->port, 0);
- hw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_EN, eth_dev->port, 0);
- hw_mod_qsl_unmq_flush(&ndev->be, eth_dev->port, 1);
+ nthw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_DEST_QUEUE, eth_dev->port, 0);
+ nthw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_EN, eth_dev->port, 0);
+ nthw_mod_qsl_unmq_flush(&ndev->be, eth_dev->port, 1);
if (ndev->flow_profile == FLOW_ETH_DEV_PROFILE_INLINE) {
for (int i = 0; i < eth_dev->num_queues; ++i) {
uint32_t qen_value = 0;
uint32_t queue_id = (uint32_t)eth_dev->rx_queue[i].hw_id;
- hw_mod_qsl_qen_get(&ndev->be, HW_QSL_QEN_EN, queue_id / 4, &qen_value);
- hw_mod_qsl_qen_set(&ndev->be, HW_QSL_QEN_EN, queue_id / 4,
+ nthw_mod_qsl_qen_get(&ndev->be, HW_QSL_QEN_EN, queue_id / 4, &qen_value);
+ nthw_mod_qsl_qen_set(&ndev->be, HW_QSL_QEN_EN, queue_id / 4,
qen_value & ~(1U << (queue_id % 4)));
- hw_mod_qsl_qen_flush(&ndev->be, queue_id / 4, 1);
+ nthw_mod_qsl_qen_flush(&ndev->be, queue_id / 4, 1);
}
}
@@ -678,14 +678,14 @@ static struct flow_eth_dev *flow_get_eth_dev(uint8_t adapter_no, uint8_t port_no
* Init QSL UNM - unmatched - redirects otherwise discarded
* packets in QSL
*/
- if (hw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_DEST_QUEUE, eth_dev->port,
+ if (nthw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_DEST_QUEUE, eth_dev->port,
eth_dev->rx_queue[0].hw_id) < 0)
goto err_exit0;
- if (hw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_EN, eth_dev->port, 1) < 0)
+ if (nthw_mod_qsl_unmq_set(&ndev->be, HW_QSL_UNMQ_EN, eth_dev->port, 1) < 0)
goto err_exit0;
- if (hw_mod_qsl_unmq_flush(&ndev->be, eth_dev->port, 1) < 0)
+ if (nthw_mod_qsl_unmq_flush(&ndev->be, eth_dev->port, 1) < 0)
goto err_exit0;
}
@@ -699,10 +699,10 @@ static struct flow_eth_dev *flow_get_eth_dev(uint8_t adapter_no, uint8_t port_no
uint32_t qen_value = 0;
uint32_t queue_id = (uint32_t)eth_dev->rx_queue[i].hw_id;
- hw_mod_qsl_qen_get(&ndev->be, HW_QSL_QEN_EN, queue_id / 4, &qen_value);
- hw_mod_qsl_qen_set(&ndev->be, HW_QSL_QEN_EN, queue_id / 4,
+ nthw_mod_qsl_qen_get(&ndev->be, HW_QSL_QEN_EN, queue_id / 4, &qen_value);
+ nthw_mod_qsl_qen_set(&ndev->be, HW_QSL_QEN_EN, queue_id / 4,
qen_value | (1 << (queue_id % 4)));
- hw_mod_qsl_qen_flush(&ndev->be, queue_id / 4, 1);
+ nthw_mod_qsl_qen_flush(&ndev->be, queue_id / 4, 1);
}
}
@@ -1276,7 +1276,7 @@ static const struct flow_filter_ops ops = {
/*
* Other
*/
- .hw_mod_hsh_rcp_flush = hw_mod_hsh_rcp_flush,
+ .nthw_mod_hsh_rcp_flush = nthw_mod_hsh_rcp_flush,
};
void nthw_init_flow_filter(void)
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
index b53252662b..76ff79cbe1 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
@@ -70,11 +70,11 @@ static int hsh_set_part(struct flow_nic_dev *ndev, int hsh_idx, struct hsh_words
words[word].free = false;
- res |= hw_mod_hsh_rcp_set(&ndev->be, words[word].pe, hsh_idx, 0, pe);
- NT_LOG(DBG, FILTER, "hw_mod_hsh_rcp_set(&ndev->be, %d, %d, 0, %" PRIu32 ")",
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, words[word].pe, hsh_idx, 0, pe);
+ NT_LOG(DBG, FILTER, "nthw_mod_hsh_rcp_set(&ndev->be, %d, %d, 0, %" PRIu32 ")",
(int)words[word].pe, hsh_idx, pe);
- res |= hw_mod_hsh_rcp_set(&ndev->be, words[word].ofs, hsh_idx, 0, ofs);
- NT_LOG(DBG, FILTER, "hw_mod_hsh_rcp_set(&ndev->be, %d, %d, 0, %" PRIu32 ")",
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, words[word].ofs, hsh_idx, 0, ofs);
+ NT_LOG(DBG, FILTER, "nthw_mod_hsh_rcp_set(&ndev->be, %d, %d, 0, %" PRIu32 ")",
(int)words[word].ofs, hsh_idx, ofs);
@@ -95,10 +95,10 @@ static int hsh_set_part(struct flow_nic_dev *ndev, int hsh_idx, struct hsh_words
mask = 0x0;
}
/* reorder QW words mask from little to big endian */
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_WORD_MASK, hsh_idx,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_WORD_MASK, hsh_idx,
words[word].index + words_count - mask_off, mask);
NT_LOG(DBG, FILTER,
- "hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_WORD_MASK, %d, %d, 0x%08" PRIX32 ")",
+ "mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_WORD_MASK, %d, %d, 0x%08" PRIX32 ")",
hsh_idx, words[word].index + words_count - mask_off, mask);
toeplitz_mask[words[word].index + mask_off - 1] = mask;
}
@@ -166,33 +166,33 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
};
int res = 0;
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, hsh_idx, 0, 0);
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, hsh_idx, 0, 0);
/* enable hashing */
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_LOAD_DIST_TYPE, hsh_idx, 0, 2);
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_LOAD_DIST_TYPE, hsh_idx, 0, 2);
/* configure selected hash function and its key */
bool toeplitz = false;
switch (rss_conf.algorithm) {
case RTE_ETH_HASH_FUNCTION_DEFAULT:
/* Use default NTH10 hashing algorithm */
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TOEPLITZ, hsh_idx, 0, 0);
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TOEPLITZ, hsh_idx, 0, 0);
/* Use 1st 32-bits from rss_key to configure NTH10 SEED */
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_SEED, hsh_idx, 0,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_SEED, hsh_idx, 0,
rss_conf.rss_key[0] << 24 | rss_conf.rss_key[1] << 16 |
rss_conf.rss_key[2] << 8 | rss_conf.rss_key[3]);
break;
case RTE_ETH_HASH_FUNCTION_TOEPLITZ:
toeplitz = true;
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TOEPLITZ, hsh_idx, 0, 1);
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TOEPLITZ, hsh_idx, 0, 1);
uint8_t empty_key = 0;
/* Toeplitz key (always 40B) words have to be programmed in reverse order */
for (uint8_t i = 0; i <= (MAX_RSS_KEY_LEN - 4); i += 4) {
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_K, hsh_idx, 9 - i / 4,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_K, hsh_idx, 9 - i / 4,
rss_conf.rss_key[i] << 24 | rss_conf.rss_key[i + 1] << 16 |
rss_conf.rss_key[i + 2] << 8 | rss_conf.rss_key[i + 3]);
NT_LOG(DBG, FILTER,
- "hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_K, %d, %d, 0x%" PRIX32 ")",
+ "nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_K, %d, %d, 0x%" PRIX32 ")",
hsh_idx, 9 - i / 4, rss_conf.rss_key[i] << 24 |
rss_conf.rss_key[i + 1] << 16 | rss_conf.rss_key[i + 2] << 8 |
rss_conf.rss_key[i + 3]);
@@ -432,7 +432,7 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
0, 32, toeplitz);
}
}
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_AUTO_IPV4_MASK,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_AUTO_IPV4_MASK,
hsh_idx, 0, 1);
} else {
/* IPv4 */
@@ -539,9 +539,9 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
res |= hsh_set_part(ndev, hsh_idx, words, DYN_L3, 9, 8,
toeplitz);
} else {
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_P_MASK,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_P_MASK,
hsh_idx, 0, 1);
- res |= hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TNL_P,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_TNL_P,
hsh_idx, 0, 0);
}
} else {
@@ -555,9 +555,9 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
toeplitz);
}
} else {
- res |= hw_mod_hsh_rcp_set(&ndev->be,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be,
HW_HSH_RCP_P_MASK, hsh_idx, 0, 1);
- res |= hw_mod_hsh_rcp_set(&ndev->be,
+ res |= nthw_mod_hsh_rcp_set(&ndev->be,
HW_HSH_RCP_TNL_P, hsh_idx, 0, 1);
}
}
@@ -644,7 +644,7 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
}
if (fields || res != 0) {
- hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, hsh_idx, 0, 0);
+ nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, hsh_idx, 0, 0);
if (sprint_nt_rss_mask(rss_buffer, rss_buffer_len, " ", rss_conf.rss_hf) == 0) {
NT_LOG(ERR, FILTER, "RSS configuration%s is not supported for hash func %s.",
rss_buffer, (enum rte_eth_hash_function)toeplitz ?
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_km.c b/drivers/net/ntnic/nthw/flow_api/flow_km.c
index 9c76e8639c..1052773668 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_km.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_km.c
@@ -479,7 +479,7 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
int sw = 0;
int swx = 0;
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_PRESET_ALL, index, 0, 0);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_PRESET_ALL, index, 0, 0);
/* set extractor words, offs, contrib */
for (int i = 0; i < km->num_ftype_elem; i++) {
@@ -490,24 +490,24 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
/* SWX */
if (km->match_map[i]->extr_start_offs_id == SB_VNI) {
NT_LOG(DBG, FILTER, "Set KM SWX sel A - VNI");
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_CCH, index,
- 0, 1);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
+ nthw_mod_km_rcp_set(km->be,
+ HW_KM_RCP_SWX_CCH, index, 0, 1);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
index, 0, SWX_SEL_ALL32);
} else if (km->match_map[i]->extr_start_offs_id ==
SB_MAC_PORT) {
NT_LOG(DBG, FILTER,
"Set KM SWX sel A - PTC + MAC");
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
index, 0, SWX_SEL_ALL32);
} else if (km->match_map[i]->extr_start_offs_id ==
SB_KCC_ID) {
NT_LOG(DBG, FILTER, "Set KM SWX sel A - KCC ID");
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_CCH, index,
- 0, 1);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
+ nthw_mod_km_rcp_set(km->be,
+ HW_KM_RCP_SWX_CCH, index, 0, 1);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_SWX_SEL_A,
index, 0, SWX_SEL_ALL32);
} else {
@@ -523,11 +523,11 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
} else {
if (sw == 0) {
/* DW8 */
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_DYN, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_DYN, index, 0,
km->match_map[i]->extr_start_offs_id);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_OFS, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_OFS, index, 0,
km->match_map[i]->rel_offs);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW8_SEL_A, index, 0,
DW8_SEL_FIRST32);
NT_LOG(DBG, FILTER,
"Set KM DW8 sel A: dyn: %i, offs: %i",
@@ -536,11 +536,11 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
} else if (sw == 1) {
/* DW10 */
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_DYN, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_DYN, index, 0,
km->match_map[i]->extr_start_offs_id);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_OFS, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_OFS, index, 0,
km->match_map[i]->rel_offs);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_DW10_SEL_A, index, 0,
DW10_SEL_FIRST32);
NT_LOG(DBG, FILTER,
"Set KM DW10 sel A: dyn: %i, offs: %i",
@@ -558,24 +558,24 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
case KM_USE_EXTRACTOR_QWORD:
if (qw == 0) {
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_DYN, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_DYN, index, 0,
km->match_map[i]->extr_start_offs_id);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_OFS, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_OFS, index, 0,
km->match_map[i]->rel_offs);
switch (km->match_map[i]->word_len) {
case 1:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
QW0_SEL_FIRST32);
break;
case 2:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
QW0_SEL_FIRST64);
break;
case 4:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW0_SEL_A, index, 0,
QW0_SEL_ALL128);
break;
@@ -589,24 +589,24 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
km->match_map[i]->rel_offs, km->match_map[i]->word_len);
} else if (qw == 1) {
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_DYN, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_DYN, index, 0,
km->match_map[i]->extr_start_offs_id);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_OFS, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_OFS, index, 0,
km->match_map[i]->rel_offs);
switch (km->match_map[i]->word_len) {
case 1:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
QW4_SEL_FIRST32);
break;
case 2:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
QW4_SEL_FIRST64);
break;
case 4:
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_QW4_SEL_A, index, 0,
QW4_SEL_ALL128);
break;
@@ -633,7 +633,7 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
/* set mask A */
for (int i = 0; i < km->key_word_size; i++) {
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_MASK_A, index,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_MASK_A, index,
(km->be->km.nb_km_rcp_mask_a_word_size - 1) - i,
km->entry_mask[i]);
NT_LOG(DBG, FILTER, "Set KM mask A: %08x", km->entry_mask[i]);
@@ -642,24 +642,24 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
if (km->target == KM_CAM) {
/* set info - Color */
if (km->info_set) {
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_INFO_A, index, 0, 1);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_INFO_A, index, 0, 1);
NT_LOG(DBG, FILTER, "Set KM info A");
}
/* set key length A */
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_EL_A, index, 0,
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_EL_A, index, 0,
km->key_word_size + !!km->info_set - 1); /* select id is -1 */
/* set Flow Type for Key A */
NT_LOG(DBG, FILTER, "Set KM EL A: %i", km->key_word_size + !!km->info_set - 1);
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_FTM_A, index, 0, 1 << km->flow_type);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_FTM_A, index, 0, 1 << km->flow_type);
NT_LOG(DBG, FILTER, "Set KM FTM A - ft: %i", km->flow_type);
/* Set Paired - only on the CAM part though... TODO split CAM and TCAM */
if ((uint32_t)(km->key_word_size + !!km->info_set) >
km->be->km.nb_cam_record_words) {
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_PAIRED, index, 0, 1);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_PAIRED, index, 0, 1);
NT_LOG(DBG, FILTER, "Set KM CAM Paired");
km->cam_paired = 1;
}
@@ -682,9 +682,9 @@ int km_rcp_set(struct km_flow_def_s *km, int index)
}
/* Set BANK_A */
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_BANK_A, index, 0, bank_bm);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_BANK_A, index, 0, bank_bm);
/* Set Kl_A */
- hw_mod_km_rcp_set(km->be, HW_KM_RCP_KL_A, index, 0, km->key_word_size - 1);
+ nthw_mod_km_rcp_set(km->be, HW_KM_RCP_KL_A, index, 0, km->key_word_size - 1);
} else {
return -1;
@@ -699,10 +699,10 @@ static int cam_populate(struct km_flow_def_s *km, int bank)
int cnt = km->key_word_size + !!km->info_set;
for (uint32_t i = 0; i < km->be->km.nb_cam_record_words && cnt; i++, cnt--) {
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank, km->record_indexes[bank],
- km->entry_word[i]);
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank, km->record_indexes[bank],
- km->flow_type);
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
+ km->record_indexes[bank], km->entry_word[i]);
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
+ km->record_indexes[bank], km->flow_type);
}
km->cam_dist[CAM_KM_DIST_IDX(bank)].km_owner = km;
@@ -711,17 +711,18 @@ static int cam_populate(struct km_flow_def_s *km, int bank)
RTE_ASSERT(km->cam_paired);
for (uint32_t i = 0; i < km->be->km.nb_cam_record_words && cnt; i++, cnt--) {
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
km->record_indexes[bank] + 1,
km->entry_word[km->be->km.nb_cam_record_words + i]);
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
km->record_indexes[bank] + 1, km->flow_type);
}
km->cam_dist[CAM_KM_DIST_IDX(bank) + 1].km_owner = km;
}
- res |= hw_mod_km_cam_flush(km->be, bank, km->record_indexes[bank], km->cam_paired ? 2 : 1);
+ res |= nthw_mod_km_cam_flush(km->be, bank, km->record_indexes[bank],
+ km->cam_paired ? 2 : 1);
return res;
}
@@ -732,10 +733,10 @@ static int cam_reset_entry(struct km_flow_def_s *km, int bank)
int cnt = km->key_word_size + !!km->info_set;
for (uint32_t i = 0; i < km->be->km.nb_cam_record_words && cnt; i++, cnt--) {
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank, km->record_indexes[bank],
- 0);
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank, km->record_indexes[bank],
- 0);
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
+ km->record_indexes[bank], 0);
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
+ km->record_indexes[bank], 0);
}
km->cam_dist[CAM_KM_DIST_IDX(bank)].km_owner = NULL;
@@ -744,16 +745,17 @@ static int cam_reset_entry(struct km_flow_def_s *km, int bank)
RTE_ASSERT(km->cam_paired);
for (uint32_t i = 0; i < km->be->km.nb_cam_record_words && cnt; i++, cnt--) {
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_W0 + i, bank,
km->record_indexes[bank] + 1, 0);
- res |= hw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
+ res |= nthw_mod_km_cam_set(km->be, HW_KM_CAM_FT0 + i, bank,
km->record_indexes[bank] + 1, 0);
}
km->cam_dist[CAM_KM_DIST_IDX(bank) + 1].km_owner = NULL;
}
- res |= hw_mod_km_cam_flush(km->be, bank, km->record_indexes[bank], km->cam_paired ? 2 : 1);
+ res |= nthw_mod_km_cam_flush(km->be, bank, km->record_indexes[bank],
+ km->cam_paired ? 2 : 1);
return res;
}
@@ -979,14 +981,16 @@ static int tcam_write_word(struct km_flow_def_s *km, int bank, int record, uint3
a = a & a_m;
for (int val = 0; val < 256; val++) {
- err |= hw_mod_km_tcam_get(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
+ err |= nthw_mod_km_tcam_get(km->be, HW_KM_TCAM_T,
+ bank, byte, val, all_recs);
if ((val & a_m) == a)
all_recs[rec_val] |= rec_bit;
else
all_recs[rec_val] &= ~rec_bit;
- err |= hw_mod_km_tcam_set(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
+ err |= nthw_mod_km_tcam_set(km->be, HW_KM_TCAM_T, bank,
+ byte, val, all_recs);
if (err)
break;
@@ -994,7 +998,7 @@ static int tcam_write_word(struct km_flow_def_s *km, int bank, int record, uint3
}
/* flush bank */
- err |= hw_mod_km_tcam_flush(km->be, bank, ALL_BANK_ENTRIES);
+ err |= nthw_mod_km_tcam_flush(km->be, bank, ALL_BANK_ENTRIES);
if (err == 0) {
RTE_ASSERT(km->tcam_dist[TCAM_DIST_IDX(bank, record)].km_owner == NULL);
@@ -1021,11 +1025,11 @@ static int km_write_data_to_tcam(struct km_flow_def_s *km)
}
/* Write KM_TCI */
- err |= hw_mod_km_tci_set(km->be, HW_KM_TCI_COLOR, km->tcam_start_bank, km->tcam_record,
+ err |= nthw_mod_km_tci_set(km->be, HW_KM_TCI_COLOR, km->tcam_start_bank, km->tcam_record,
km->info);
- err |= hw_mod_km_tci_set(km->be, HW_KM_TCI_FT, km->tcam_start_bank, km->tcam_record,
+ err |= nthw_mod_km_tci_set(km->be, HW_KM_TCI_FT, km->tcam_start_bank, km->tcam_record,
km->flow_type);
- err |= hw_mod_km_tci_flush(km->be, km->tcam_start_bank, km->tcam_record, 1);
+ err |= nthw_mod_km_tci_flush(km->be, km->tcam_start_bank, km->tcam_record, 1);
for (int i = 0; i < km->key_word_size && !err; i++) {
err = tcam_write_word(km, km->tcam_start_bank + i, km->tcam_record,
@@ -1051,13 +1055,13 @@ static int tcam_reset_bank(struct km_flow_def_s *km, int bank, int record)
for (int byte = 0; byte < 4; byte++) {
for (int val = 0; val < 256; val++) {
- err = hw_mod_km_tcam_get(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
+ err = nthw_mod_km_tcam_get(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
if (err)
break;
all_recs[rec_val] &= ~rec_bit;
- err = hw_mod_km_tcam_set(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
+ err = nthw_mod_km_tcam_set(km->be, HW_KM_TCAM_T, bank, byte, val, all_recs);
if (err)
break;
@@ -1068,7 +1072,7 @@ static int tcam_reset_bank(struct km_flow_def_s *km, int bank, int record)
return err;
/* flush bank */
- err = hw_mod_km_tcam_flush(km->be, bank, ALL_BANK_ENTRIES);
+ err = nthw_mod_km_tcam_flush(km->be, bank, ALL_BANK_ENTRIES);
km->tcam_dist[TCAM_DIST_IDX(bank, record)].km_owner = NULL;
NT_LOG(DBG, FILTER, "Reset TCAM bank %i, rec_val %i rec bit %08x", bank, rec_val,
@@ -1087,9 +1091,9 @@ static int tcam_reset_entry(struct km_flow_def_s *km)
}
/* Write KM_TCI */
- hw_mod_km_tci_set(km->be, HW_KM_TCI_COLOR, km->tcam_start_bank, km->tcam_record, 0);
- hw_mod_km_tci_set(km->be, HW_KM_TCI_FT, km->tcam_start_bank, km->tcam_record, 0);
- hw_mod_km_tci_flush(km->be, km->tcam_start_bank, km->tcam_record, 1);
+ nthw_mod_km_tci_set(km->be, HW_KM_TCI_COLOR, km->tcam_start_bank, km->tcam_record, 0);
+ nthw_mod_km_tci_set(km->be, HW_KM_TCI_FT, km->tcam_start_bank, km->tcam_record, 0);
+ nthw_mod_km_tci_flush(km->be, km->tcam_start_bank, km->tcam_record, 1);
for (int i = 0; i < km->key_word_size && !err; i++)
err = tcam_reset_bank(km, km->tcam_start_bank + i, km->tcam_record);
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 490ab2a45e..21aa49e952 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
@@ -18,17 +18,17 @@ static const struct {
int (*reset)(struct flow_api_backend_s *be);
bool (*present)(struct flow_api_backend_s *be);
} module[] = {
- { "CAT", hw_mod_cat_alloc, hw_mod_cat_free, hw_mod_cat_reset, hw_mod_cat_present },
- { "KM", hw_mod_km_alloc, hw_mod_km_free, hw_mod_km_reset, hw_mod_km_present },
- { "FLM", hw_mod_flm_alloc, hw_mod_flm_free, hw_mod_flm_reset, hw_mod_flm_present },
- { "HSH", hw_mod_hsh_alloc, hw_mod_hsh_free, hw_mod_hsh_reset, hw_mod_hsh_present },
- { "QSL", hw_mod_qsl_alloc, hw_mod_qsl_free, hw_mod_qsl_reset, hw_mod_qsl_present },
+ { "CAT", nthw_mod_cat_alloc, nthw_mod_cat_free, nthw_mod_cat_reset, nthw_mod_cat_present },
+ { "KM", nthw_mod_km_alloc, nthw_mod_km_free, nthw_mod_km_reset, nthw_mod_km_present },
+ { "FLM", nthw_mod_flm_alloc, nthw_mod_flm_free, nthw_mod_flm_reset, nthw_mod_flm_present },
+ { "HSH", nthw_mod_hsh_alloc, nthw_mod_hsh_free, nthw_mod_hsh_reset, nthw_mod_hsh_present },
+ { "QSL", nthw_mod_qsl_alloc, nthw_mod_qsl_free, nthw_mod_qsl_reset, nthw_mod_qsl_present },
{
- "SLC LR", hw_mod_slc_lr_alloc, hw_mod_slc_lr_free, hw_mod_slc_lr_reset,
- hw_mod_slc_lr_present
+ "SLC LR", nthw_mod_slc_lr_alloc, nthw_mod_slc_lr_free, nthw_mod_slc_lr_reset,
+ nthw_mod_slc_lr_present
},
- { "PDB", hw_mod_pdb_alloc, hw_mod_pdb_free, hw_mod_pdb_reset, hw_mod_pdb_present },
- { "TPE", hw_mod_tpe_alloc, hw_mod_tpe_free, hw_mod_tpe_reset, hw_mod_tpe_present },
+ { "PDB", nthw_mod_pdb_alloc, nthw_mod_pdb_free, nthw_mod_pdb_reset, nthw_mod_pdb_present },
+ { "TPE", nthw_mod_tpe_alloc, nthw_mod_tpe_free, nthw_mod_tpe_reset, nthw_mod_tpe_present },
};
#define MOD_COUNT (ARRAY_SIZE(module))
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
index e778c7568a..df9338052e 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_cat.c
@@ -19,12 +19,12 @@ static int hw_mod_cat_kcs_flush(struct flow_api_backend_s *be, enum km_flm_if_se
static int hw_mod_cat_fte_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int km_if_id, int start_idx, int count);
-bool hw_mod_cat_present(struct flow_api_backend_s *be)
+bool nthw_mod_cat_present(struct flow_api_backend_s *be)
{
return be->iface->get_cat_present(be->be_dev);
}
-int hw_mod_cat_alloc(struct flow_api_backend_s *be)
+int nthw_mod_cat_alloc(struct flow_api_backend_s *be)
{
_VER_ = be->iface->get_cat_version(be->be_dev);
NT_LOG(DBG, FILTER, "CAT MODULE VERSION %i.%i", VER_MAJOR(_VER_), VER_MINOR(_VER_));
@@ -175,7 +175,7 @@ int hw_mod_cat_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_cat_free(struct flow_api_backend_s *be)
+void nthw_mod_cat_free(struct flow_api_backend_s *be)
{
if (be->cat.base) {
free(be->cat.base);
@@ -185,52 +185,52 @@ void hw_mod_cat_free(struct flow_api_backend_s *be)
static int cfn_reset(struct flow_api_backend_s *be, int i)
{
- int err = hw_mod_cat_cfn_set(be, HW_CAT_CFN_PRESET_ALL, i, 0, 0);
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_ISL, i, 0,
+ int err = nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PRESET_ALL, i, 0, 0);
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_ISL, i, 0,
0xffffffff); /* accept both ISL or not ISL */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_CFP, i, 0,
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_CFP, i, 0,
0xffffffff); /* accept both CFP or not CFP */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_MAC, i, 0, 0xffffffff); /* accept all MACs */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L2, i, 0, 0xffffffff); /* accept all L2 prot */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_VNTAG, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_VLAN, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_MPLS, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L3, i, 0, 0xffffffff); /* accept all L3 prot */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_FRAG, i, 0, 0xffffffff); /* accept all fragments */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_IP_PROT, i, 0,
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_MAC, i, 0, 0xffffffff); /* accept all MACs */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L2, i, 0, 0xffffffff); /* accept all L2 prot */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_VNTAG, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_VLAN, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_MPLS, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L3, i, 0, 0xffffffff); /* accept all L3 prot */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_FRAG, i, 0, 0xffffffff); /* accept all fragments */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_IP_PROT, i, 0,
0xffffffff); /* IP prot check disabled */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L4, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TUNNEL, i, 0, 0xffffffff);/* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L2, i, 0, 0xffffffff);/* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_VLAN, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_MPLS, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L3, i, 0, 0xffffffff);/* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_FRAG, i, 0, 0xffffffff); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_IP_PROT, i, 0,
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_L4, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TUNNEL, i, 0, 0xffffffff);/* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L2, i, 0, 0xffffffff);/* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_VLAN, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_MPLS, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L3, i, 0, 0xffffffff);/* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_FRAG, i, 0, 0xffffffff); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_IP_PROT, i, 0,
0xffffffff); /* inner IP prot check disabled */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L4, i, 0, 0xffffffff);/* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_CV, i, 0, 3); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_FCS, i, 0, 3); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TRUNC, i, 0,
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PTC_TNL_L4, i, 0, 0xffffffff);/* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_CV, i, 0, 3); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_FCS, i, 0, 3); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TRUNC, i, 0,
0xffffffff); /* accept all truncations */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_L3_CS, i, 0, 3); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_L4_CS, i, 0, 3); /* accept all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_PM_OR_INV, i, 0, 1);
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_LC_INV, i, 0, 1);
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_KM0_OR, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_L3_CS, i, 0, 3); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_L4_CS, i, 0, 3); /* accept all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_PM_OR_INV, i, 0, 1);
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_LC_INV, i, 0, 1);
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_KM0_OR, i, 0, 0xffffffff); /* or all */
if (_VER_ >= 21) {
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_KM1_OR, i, 0, 0xffffffff); /* or all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_L3_CS, i, 0, 0xffffffff); /* or all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_L4_CS, i, 0, 0xffffffff); /* or all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TTL_EXP, i, 0, 0xffffffff); /* or all */
- hw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_TTL_EXP, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_KM1_OR, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_L3_CS, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_L4_CS, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TTL_EXP, i, 0, 0xffffffff); /* or all */
+ nthw_mod_cat_cfn_set(be, HW_CAT_CFN_ERR_TNL_TTL_EXP, i, 0, 0xffffffff); /* or all */
}
return err;
}
-int hw_mod_cat_cfn_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_cat_cfn_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
switch (count) {
case ALL_ENTRIES:
@@ -734,8 +734,8 @@ static int hw_mod_cat_cfn_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_cfn_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index, int word_off,
- uint32_t value)
+int nthw_mod_cat_cfn_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+ int index, int word_off, uint32_t value)
{
return hw_mod_cat_cfn_mod(be, field, index, word_off, &value, 0);
}
@@ -794,13 +794,13 @@ static int hw_mod_cat_kce_flush(struct flow_api_backend_s *be, enum km_flm_if_se
return be->iface->cat_kce_flush(be->be_dev, &be->cat, km_if_idx, start_idx, count);
}
-int hw_mod_cat_kce_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kce_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_kce_flush(be, if_num, 0, start_idx, count);
}
-int hw_mod_cat_kce_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kce_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_kce_flush(be, if_num, 1, start_idx, count);
@@ -859,25 +859,25 @@ static int hw_mod_cat_kce_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_kce_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_kce_mod(be, field, if_num, 0, index, &value, 0);
}
-int hw_mod_cat_kce_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_kce_mod(be, field, if_num, 0, index, value, 1);
}
-int hw_mod_cat_kce_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_kce_mod(be, field, if_num, 1, index, &value, 0);
}
-int hw_mod_cat_kce_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kce_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_kce_mod(be, field, if_num, 1, index, value, 1);
@@ -906,13 +906,13 @@ static int hw_mod_cat_kcs_flush(struct flow_api_backend_s *be, enum km_flm_if_se
return be->iface->cat_kcs_flush(be->be_dev, &be->cat, km_if_idx, start_idx, count);
}
-int hw_mod_cat_kcs_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kcs_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_kcs_flush(be, if_num, 0, start_idx, count);
}
-int hw_mod_cat_kcs_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_kcs_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_kcs_flush(be, if_num, 1, start_idx, count);
@@ -971,25 +971,25 @@ static int hw_mod_cat_kcs_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_kcs_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_kcs_mod(be, field, if_num, 0, index, &value, 0);
}
-int hw_mod_cat_kcs_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_kcs_mod(be, field, if_num, 0, index, value, 1);
}
-int hw_mod_cat_kcs_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_kcs_mod(be, field, if_num, 1, index, &value, 0);
}
-int hw_mod_cat_kcs_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_kcs_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_kcs_mod(be, field, if_num, 1, index, value, 1);
@@ -1021,13 +1021,13 @@ static int hw_mod_cat_fte_flush(struct flow_api_backend_s *be, enum km_flm_if_se
return be->iface->cat_fte_flush(be->be_dev, &be->cat, km_if_idx, start_idx, count);
}
-int hw_mod_cat_fte_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_fte_km_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_fte_flush(be, if_num, 0, start_idx, count);
}
-int hw_mod_cat_fte_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
+int nthw_mod_cat_fte_flm_flush(struct flow_api_backend_s *be, enum km_flm_if_select_e if_num,
int start_idx, int count)
{
return hw_mod_cat_fte_flush(be, if_num, 1, start_idx, count);
@@ -1088,31 +1088,31 @@ static int hw_mod_cat_fte_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_fte_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_km_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_fte_mod(be, field, if_num, 0, index, &value, 0);
}
-int hw_mod_cat_fte_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_km_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_fte_mod(be, field, if_num, 0, index, value, 1);
}
-int hw_mod_cat_fte_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_flm_set(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t value)
{
return hw_mod_cat_fte_mod(be, field, if_num, 1, index, &value, 0);
}
-int hw_mod_cat_fte_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
+int nthw_mod_cat_fte_flm_get(struct flow_api_backend_s *be, enum hw_cat_e field,
enum km_flm_if_select_e if_num, int index, uint32_t *value)
{
return hw_mod_cat_fte_mod(be, field, if_num, 1, index, value, 1);
}
-int hw_mod_cat_cte_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_cat_cte_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->cat.nb_cat_funcs;
@@ -1158,19 +1158,19 @@ static int hw_mod_cat_cte_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_cte_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cte_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value)
{
return hw_mod_cat_cte_mod(be, field, index, &value, 0);
}
-int hw_mod_cat_cte_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cte_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t *value)
{
return hw_mod_cat_cte_mod(be, field, index, value, 1);
}
-int hw_mod_cat_cts_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_cat_cts_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
int addr_size = (_VER_ < 15) ? 8 : ((be->cat.cts_num + 1) / 2);
@@ -1224,19 +1224,19 @@ static int hw_mod_cat_cts_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_cts_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cts_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value)
{
return hw_mod_cat_cts_mod(be, field, index, &value, 0);
}
-int hw_mod_cat_cts_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cts_get(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t *value)
{
return hw_mod_cat_cts_mod(be, field, index, value, 1);
}
-int hw_mod_cat_cot_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_cat_cot_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->max_categories;
@@ -1335,7 +1335,7 @@ static int hw_mod_cat_cot_mod(struct flow_api_backend_s *be, enum hw_cat_e field
return 0;
}
-int hw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
+int nthw_mod_cat_cot_set(struct flow_api_backend_s *be, enum hw_cat_e field, int index,
uint32_t value)
{
return hw_mod_cat_cot_mod(be, field, index, &value, 0);
@@ -1406,14 +1406,14 @@ static int hw_mod_cat_len_flush(struct flow_api_backend_s *be, int start_idx, in
return be->iface->cat_len_flush(be->be_dev, &be->cat, start_idx, count);
}
-int hw_mod_cat_reset(struct flow_api_backend_s *be)
+int nthw_mod_cat_reset(struct flow_api_backend_s *be)
{
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->cat));
NT_LOG(DBG, FILTER, "INIT CAT CFN");
- if (hw_mod_cat_cfn_flush(be, 0, ALL_ENTRIES))
+ if (nthw_mod_cat_cfn_flush(be, 0, ALL_ENTRIES))
return -1;
if (_VER_ <= 18) {
@@ -1471,17 +1471,17 @@ int hw_mod_cat_reset(struct flow_api_backend_s *be)
NT_LOG(DBG, FILTER, "INIT CAT CTE");
- if (hw_mod_cat_cte_flush(be, 0, ALL_ENTRIES))
+ if (nthw_mod_cat_cte_flush(be, 0, ALL_ENTRIES))
return -1;
NT_LOG(DBG, FILTER, "INIT CAT CTS");
- if (hw_mod_cat_cts_flush(be, 0, ALL_ENTRIES))
+ if (nthw_mod_cat_cts_flush(be, 0, ALL_ENTRIES))
return -1;
NT_LOG(DBG, FILTER, "INIT CAT COT");
- if (hw_mod_cat_cot_flush(be, 0, ALL_ENTRIES))
+ if (nthw_mod_cat_cot_flush(be, 0, ALL_ENTRIES))
return -1;
NT_LOG(DBG, FILTER, "INIT CAT CCT");
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
index 4babc30d2b..b2cb82daab 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c
@@ -12,12 +12,12 @@
#define _MOD_ "FLM"
#define _VER_ be->flm.ver
-bool hw_mod_flm_present(struct flow_api_backend_s *be)
+bool nthw_mod_flm_present(struct flow_api_backend_s *be)
{
return be->iface->get_flm_present(be->be_dev);
}
-int hw_mod_flm_alloc(struct flow_api_backend_s *be)
+int nthw_mod_flm_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_flm_version(be->be_dev);
@@ -165,7 +165,7 @@ int hw_mod_flm_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_flm_free(struct flow_api_backend_s *be)
+void nthw_mod_flm_free(struct flow_api_backend_s *be)
{
if (be->flm.base) {
free(be->flm.base);
@@ -173,23 +173,23 @@ void hw_mod_flm_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_flm_reset(struct flow_api_backend_s *be)
+int nthw_mod_flm_reset(struct flow_api_backend_s *be)
{
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->flm));
NT_LOG(DBG, FILTER, "INIT FLM");
- hw_mod_flm_control_set(be, HW_FLM_CONTROL_SPLIT_SDRAM_USAGE, 0x10);
+ nthw_mod_flm_control_set(be, HW_FLM_CONTROL_SPLIT_SDRAM_USAGE, 0x10);
- hw_mod_flm_control_flush(be);
- hw_mod_flm_scrub_flush(be, 0, ALL_ENTRIES);
- hw_mod_flm_scan_flush(be);
- hw_mod_flm_rcp_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_flm_control_flush(be);
+ nthw_mod_flm_scrub_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_flm_scan_flush(be);
+ nthw_mod_flm_rcp_flush(be, 0, ALL_ENTRIES);
return 0;
}
-int hw_mod_flm_control_flush(struct flow_api_backend_s *be)
+int nthw_mod_flm_control_flush(struct flow_api_backend_s *be)
{
return be->iface->flm_control_flush(be->be_dev, &be->flm);
}
@@ -289,12 +289,12 @@ static int hw_mod_flm_control_mod(struct flow_api_backend_s *be, enum hw_flm_e f
return 0;
}
-int hw_mod_flm_control_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
+int nthw_mod_flm_control_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
{
return hw_mod_flm_control_mod(be, field, &value, 0);
}
-int hw_mod_flm_status_update(struct flow_api_backend_s *be)
+int nthw_mod_flm_status_update(struct flow_api_backend_s *be)
{
return be->iface->flm_status_update(be->be_dev, &be->flm);
}
@@ -356,12 +356,12 @@ static int hw_mod_flm_status_mod(struct flow_api_backend_s *be, enum hw_flm_e fi
return 0;
}
-int hw_mod_flm_status_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
+int nthw_mod_flm_status_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
{
return hw_mod_flm_status_mod(be, field, value, 1);
}
-int hw_mod_flm_scan_flush(struct flow_api_backend_s *be)
+int nthw_mod_flm_scan_flush(struct flow_api_backend_s *be)
{
return be->iface->flm_scan_flush(be->be_dev, &be->flm);
}
@@ -391,12 +391,12 @@ static int hw_mod_flm_scan_mod(struct flow_api_backend_s *be, enum hw_flm_e fiel
return 0;
}
-int hw_mod_flm_scan_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
+int nthw_mod_flm_scan_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
{
return hw_mod_flm_scan_mod(be, field, &value, 0);
}
-int hw_mod_flm_load_bin_flush(struct flow_api_backend_s *be)
+int nthw_mod_flm_load_bin_flush(struct flow_api_backend_s *be)
{
return be->iface->flm_load_bin_flush(be->be_dev, &be->flm);
}
@@ -426,12 +426,12 @@ static int hw_mod_flm_load_bin_mod(struct flow_api_backend_s *be, enum hw_flm_e
return 0;
}
-int hw_mod_flm_load_bin_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
+int nthw_mod_flm_load_bin_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
{
return hw_mod_flm_load_bin_mod(be, field, &value, 0);
}
-int hw_mod_flm_prio_flush(struct flow_api_backend_s *be)
+int nthw_mod_flm_prio_flush(struct flow_api_backend_s *be)
{
return be->iface->flm_prio_flush(be->be_dev, &be->flm);
}
@@ -489,12 +489,12 @@ static int hw_mod_flm_prio_mod(struct flow_api_backend_s *be, enum hw_flm_e fiel
return 0;
}
-int hw_mod_flm_prio_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
+int nthw_mod_flm_prio_set(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t value)
{
return hw_mod_flm_prio_mod(be, field, &value, 0);
}
-int hw_mod_flm_pst_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_flm_pst_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->flm.nb_pst_profiles;
@@ -550,13 +550,13 @@ static int hw_mod_flm_pst_mod(struct flow_api_backend_s *be, enum hw_flm_e field
return 0;
}
-int hw_mod_flm_pst_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_pst_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value)
{
return hw_mod_flm_pst_mod(be, field, index, &value, 0);
}
-int hw_mod_flm_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_flm_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->flm.nb_categories;
@@ -569,7 +569,7 @@ int hw_mod_flm_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count
return be->iface->flm_rcp_flush(be->be_dev, &be->flm, start_idx, count);
}
-int hw_mod_flm_scrub_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_flm_scrub_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->flm.nb_scrub_profiles;
@@ -696,7 +696,7 @@ static int hw_mod_flm_rcp_mod(struct flow_api_backend_s *be, enum hw_flm_e field
return 0;
}
-int hw_mod_flm_rcp_set_mask(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_rcp_set_mask(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t *value)
{
if (field != HW_FLM_RCP_MASK)
@@ -705,7 +705,7 @@ int hw_mod_flm_rcp_set_mask(struct flow_api_backend_s *be, enum hw_flm_e field,
return hw_mod_flm_rcp_mod(be, field, index, value, 0);
}
-int hw_mod_flm_rcp_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_rcp_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value)
{
if (field == HW_FLM_RCP_MASK)
@@ -714,7 +714,7 @@ int hw_mod_flm_rcp_set(struct flow_api_backend_s *be, enum hw_flm_e field, int i
return hw_mod_flm_rcp_mod(be, field, index, &value, 0);
}
-int hw_mod_flm_buf_ctrl_update(struct flow_api_backend_s *be)
+int nthw_mod_flm_buf_ctrl_update(struct flow_api_backend_s *be)
{
return be->iface->flm_buf_ctrl_update(be->be_dev, &be->flm);
}
@@ -754,17 +754,17 @@ static int hw_mod_flm_buf_ctrl_mod_get(struct flow_api_backend_s *be, enum hw_fl
return 0;
}
-int hw_mod_flm_buf_ctrl_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
+int nthw_mod_flm_buf_ctrl_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
{
return hw_mod_flm_buf_ctrl_mod_get(be, field, value);
}
-int hw_mod_flm_stat_update(struct flow_api_backend_s *be)
+int nthw_mod_flm_stat_update(struct flow_api_backend_s *be)
{
return be->iface->flm_stat_update(be->be_dev, &be->flm);
}
-int hw_mod_flm_stat_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
+int nthw_mod_flm_stat_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint32_t *value)
{
switch (_VER_) {
case 25:
@@ -899,7 +899,7 @@ int hw_mod_flm_stat_get(struct flow_api_backend_s *be, enum hw_flm_e field, uint
return 0;
}
-int hw_mod_flm_lrn_data_set_flush(struct flow_api_backend_s *be, enum hw_flm_e field,
+int nthw_mod_flm_lrn_data_set_flush(struct flow_api_backend_s *be, enum hw_flm_e field,
const uint32_t *value, uint32_t records,
uint32_t *handled_records, uint32_t *inf_word_cnt,
uint32_t *sta_word_cnt)
@@ -932,7 +932,7 @@ int hw_mod_flm_lrn_data_set_flush(struct flow_api_backend_s *be, enum hw_flm_e f
return ret;
}
-int hw_mod_flm_inf_sta_data_update_get(struct flow_api_backend_s *be, enum hw_flm_e field,
+int nthw_mod_flm_inf_sta_data_update_get(struct flow_api_backend_s *be, enum hw_flm_e field,
uint32_t *inf_value, uint32_t inf_size,
uint32_t *inf_word_cnt, uint32_t *sta_value,
uint32_t sta_size, uint32_t *sta_word_cnt)
@@ -972,7 +972,7 @@ int hw_mod_flm_inf_sta_data_update_get(struct flow_api_backend_s *be, enum hw_fl
* Note that this represents a lower bound on the timeout, depending on the flow
* scanner interval and overall load, the timeout can be substantially longer.
*/
-uint32_t hw_mod_flm_scrub_timeout_decode(uint32_t t_enc)
+uint32_t nthw_mod_flm_scrub_timeout_decode(uint32_t t_enc)
{
uint32_t t_bits_2_0 = t_enc & 0x07;
uint32_t t_bits_7_3 = (t_enc >> 3) & 0x1F;
@@ -985,7 +985,7 @@ uint32_t hw_mod_flm_scrub_timeout_decode(uint32_t t_enc)
return t_sec > UINT32_MAX ? UINT32_MAX : (uint32_t)t_sec;
}
-uint32_t hw_mod_flm_scrub_timeout_encode(uint32_t t)
+uint32_t nthw_mod_flm_scrub_timeout_encode(uint32_t t)
{
uint32_t t_enc = 0;
@@ -994,7 +994,7 @@ uint32_t hw_mod_flm_scrub_timeout_encode(uint32_t t)
do {
t_enc++;
- t_dec = hw_mod_flm_scrub_timeout_decode(t_enc);
+ t_dec = nthw_mod_flm_scrub_timeout_decode(t_enc);
} while (t_enc <= 0xEF && t_dec < t);
}
@@ -1044,7 +1044,7 @@ static int hw_mod_flm_scrub_mod(struct flow_api_backend_s *be, enum hw_flm_e fie
return 0;
}
-int hw_mod_flm_scrub_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
+int nthw_mod_flm_scrub_set(struct flow_api_backend_s *be, enum hw_flm_e field, int index,
uint32_t value)
{
return hw_mod_flm_scrub_mod(be, field, index, &value, 0);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
index 9821247ebb..a76cec5cfd 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_hsh.c
@@ -12,12 +12,12 @@
#define _MOD_ "HSH"
#define _VER_ be->hsh.ver
-bool hw_mod_hsh_present(struct flow_api_backend_s *be)
+bool nthw_mod_hsh_present(struct flow_api_backend_s *be)
{
return be->iface->get_hsh_present(be->be_dev);
}
-int hw_mod_hsh_alloc(struct flow_api_backend_s *be)
+int nthw_mod_hsh_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_hsh_version(be->be_dev);
@@ -60,7 +60,7 @@ int hw_mod_hsh_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_hsh_free(struct flow_api_backend_s *be)
+void nthw_mod_hsh_free(struct flow_api_backend_s *be)
{
if (be->hsh.base) {
free(be->hsh.base);
@@ -68,16 +68,16 @@ void hw_mod_hsh_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_hsh_reset(struct flow_api_backend_s *be)
+int nthw_mod_hsh_reset(struct flow_api_backend_s *be)
{
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->hsh));
NT_LOG(DBG, FILTER, "INIT HSH RCP");
- return hw_mod_hsh_rcp_flush(be, 0, be->hsh.nb_rcp);
+ return nthw_mod_hsh_rcp_flush(be, 0, be->hsh.nb_rcp);
}
-int hw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_hsh_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->hsh.nb_rcp;
@@ -278,7 +278,7 @@ static int hw_mod_hsh_rcp_mod(struct flow_api_backend_s *be, enum hw_hsh_e field
return 0;
}
-int hw_mod_hsh_rcp_set(struct flow_api_backend_s *be, enum hw_hsh_e field, uint32_t index,
+int nthw_mod_hsh_rcp_set(struct flow_api_backend_s *be, enum hw_hsh_e field, uint32_t index,
uint32_t word_off, uint32_t value)
{
return hw_mod_hsh_rcp_mod(be, field, index, word_off, &value, 0);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
index a1b9abae66..81de05253f 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_km.c
@@ -17,12 +17,12 @@
#define KM_RCP_MASK_D_A_SIZE 12 /* Mask for double size word extractors for DW8/DW10 */
#define KM_RCP_MASK_B_SIZE 6
-bool hw_mod_km_present(struct flow_api_backend_s *be)
+bool nthw_mod_km_present(struct flow_api_backend_s *be)
{
return be->iface->get_km_present(be->be_dev);
}
-int hw_mod_km_alloc(struct flow_api_backend_s *be)
+int nthw_mod_km_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_km_version(be->be_dev);
@@ -106,7 +106,7 @@ int hw_mod_km_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_km_free(struct flow_api_backend_s *be)
+void nthw_mod_km_free(struct flow_api_backend_s *be)
{
if (be->km.base) {
free(be->km.base);
@@ -114,7 +114,7 @@ void hw_mod_km_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_km_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_km_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->km.nb_categories;
@@ -349,19 +349,20 @@ static int hw_mod_km_rcp_mod(struct flow_api_backend_s *be, enum hw_km_e field,
return 0;
}
-int hw_mod_km_rcp_set(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
+int nthw_mod_km_rcp_set(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
uint32_t value)
{
return hw_mod_km_rcp_mod(be, field, index, word_off, &value, 0);
}
-int hw_mod_km_rcp_get(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
+int nthw_mod_km_rcp_get(struct flow_api_backend_s *be, enum hw_km_e field, int index, int word_off,
uint32_t *value)
{
return hw_mod_km_rcp_mod(be, field, index, word_off, value, 1);
}
-int hw_mod_km_cam_flush(struct flow_api_backend_s *be, int start_bank, int start_record, int count)
+int nthw_mod_km_cam_flush(struct flow_api_backend_s *be, int start_bank,
+ int start_record, int count)
{
if (count == ALL_ENTRIES)
count = be->km.nb_cam_records * be->km.nb_cam_banks;
@@ -467,13 +468,13 @@ static int hw_mod_km_cam_mod(struct flow_api_backend_s *be, enum hw_km_e field,
return 0;
}
-int hw_mod_km_cam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
+int nthw_mod_km_cam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
uint32_t value)
{
return hw_mod_km_cam_mod(be, field, bank, record, &value, 0);
}
-int hw_mod_km_tcam_flush(struct flow_api_backend_s *be, int start_bank, int count)
+int nthw_mod_km_tcam_flush(struct flow_api_backend_s *be, int start_bank, int count)
{
if (count == ALL_ENTRIES)
count = be->km.nb_tcam_banks * 4 * 256;
@@ -560,19 +561,20 @@ static int hw_mod_km_tcam_mod(struct flow_api_backend_s *be, enum hw_km_e field,
return 0;
}
-int hw_mod_km_tcam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
+int nthw_mod_km_tcam_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
int byte_val, uint32_t *value_set)
{
return hw_mod_km_tcam_mod(be, field, bank, byte, byte_val, value_set, 0);
}
-int hw_mod_km_tcam_get(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
+int nthw_mod_km_tcam_get(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int byte,
int byte_val, uint32_t *value_set)
{
return hw_mod_km_tcam_mod(be, field, bank, byte, byte_val, value_set, 1);
}
-int hw_mod_km_tci_flush(struct flow_api_backend_s *be, int start_bank, int start_record, int count)
+int nthw_mod_km_tci_flush(struct flow_api_backend_s *be, int start_bank,
+ int start_record, int count)
{
if (count == ALL_ENTRIES)
count = be->km.nb_tcam_banks * be->km.nb_tcam_bank_width;
@@ -624,7 +626,7 @@ static int hw_mod_km_tci_mod(struct flow_api_backend_s *be, enum hw_km_e field,
return 0;
}
-int hw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
+int nthw_mod_km_tci_set(struct flow_api_backend_s *be, enum hw_km_e field, int bank, int record,
uint32_t value)
{
return hw_mod_km_tci_mod(be, field, bank, record, &value, 0);
@@ -646,7 +648,7 @@ static int hw_mod_km_tcq_flush(struct flow_api_backend_s *be, int start_bank,
return be->iface->km_tcq_flush(be->be_dev, &be->km, start_bank, start_record, count);
}
-int hw_mod_km_reset(struct flow_api_backend_s *be)
+int nthw_mod_km_reset(struct flow_api_backend_s *be)
{
uint32_t tcam_v_set[3] = { 0x00000000, 0x00000000, 0x00000000 };
@@ -654,11 +656,11 @@ int hw_mod_km_reset(struct flow_api_backend_s *be)
nthw_zero_module_cache((struct common_func_s *)(&be->km));
NT_LOG(DBG, FILTER, "INIT KM RCP");
- hw_mod_km_rcp_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_km_rcp_flush(be, 0, ALL_ENTRIES);
/* init CAM - all zero */
NT_LOG(DBG, FILTER, "INIT KM CAM");
- hw_mod_km_cam_flush(be, 0, 0, ALL_ENTRIES);
+ nthw_mod_km_cam_flush(be, 0, 0, ALL_ENTRIES);
/* init TCAM - all zero */
NT_LOG(DBG, FILTER, "INIT KM TCAM");
@@ -667,14 +669,14 @@ int hw_mod_km_reset(struct flow_api_backend_s *be)
/* TCAM entries are cache controlled,
* thus need to hard reset initially to sync cache with HW
*/
- hw_mod_km_tcam_set(be, HW_KM_TCAM_BANK_RESET, i, 0, 0, tcam_v_set);
+ nthw_mod_km_tcam_set(be, HW_KM_TCAM_BANK_RESET, i, 0, 0, tcam_v_set);
}
- hw_mod_km_tcam_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_km_tcam_flush(be, 0, ALL_ENTRIES);
/* init TCI - all zero */
NT_LOG(DBG, FILTER, "INIT KM TCI");
- hw_mod_km_tci_flush(be, 0, 0, ALL_ENTRIES);
+ nthw_mod_km_tci_flush(be, 0, 0, ALL_ENTRIES);
NT_LOG(DBG, FILTER, "INIT KM TCQ");
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
index c5357a98c5..8bfc5fa9a1 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_pdb.c
@@ -12,12 +12,12 @@
#define _MOD_ "PDB"
#define _VER_ be->pdb.ver
-bool hw_mod_pdb_present(struct flow_api_backend_s *be)
+bool nthw_mod_pdb_present(struct flow_api_backend_s *be)
{
return be->iface->get_pdb_present(be->be_dev);
}
-int hw_mod_pdb_alloc(struct flow_api_backend_s *be)
+int nthw_mod_pdb_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_pdb_version(be->be_dev);
@@ -50,7 +50,7 @@ int hw_mod_pdb_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_pdb_free(struct flow_api_backend_s *be)
+void nthw_mod_pdb_free(struct flow_api_backend_s *be)
{
if (be->pdb.base) {
free(be->pdb.base);
@@ -58,7 +58,7 @@ void hw_mod_pdb_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_pdb_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->pdb.nb_pdb_rcp_categories;
@@ -223,7 +223,7 @@ static int hw_mod_pdb_rcp_mod(struct flow_api_backend_s *be, enum hw_pdb_e field
return 0;
}
-int hw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint32_t index,
+int nthw_mod_pdb_rcp_set(struct flow_api_backend_s *be, enum hw_pdb_e field, uint32_t index,
uint32_t value)
{
return hw_mod_pdb_rcp_mod(be, field, index, &value, 0);
@@ -234,14 +234,14 @@ static int hw_mod_pdb_config_flush(struct flow_api_backend_s *be)
return be->iface->pdb_config_flush(be->be_dev, &be->pdb);
}
-int hw_mod_pdb_reset(struct flow_api_backend_s *be)
+int nthw_mod_pdb_reset(struct flow_api_backend_s *be)
{
int err = 0;
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->hsh));
NT_LOG(DBG, FILTER, "INIT PDB RCP");
- err |= hw_mod_pdb_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_pdb_rcp_flush(be, 0, ALL_ENTRIES);
NT_LOG(DBG, FILTER, "INIT PDB CONFIG");
err |= hw_mod_pdb_config_flush(be);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
index 261cb84dc2..c7c56ef94f 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_qsl.c
@@ -15,12 +15,12 @@
#define QSL_QEN_ENTRIES 32
#define QSL_QNMQ_ENTRIES 256
-bool hw_mod_qsl_present(struct flow_api_backend_s *be)
+bool nthw_mod_qsl_present(struct flow_api_backend_s *be)
{
return be->iface->get_qsl_present(be->be_dev);
}
-int hw_mod_qsl_alloc(struct flow_api_backend_s *be)
+int nthw_mod_qsl_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_qsl_version(be->be_dev);
@@ -64,7 +64,7 @@ int hw_mod_qsl_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_qsl_free(struct flow_api_backend_s *be)
+void nthw_mod_qsl_free(struct flow_api_backend_s *be)
{
if (be->qsl.base) {
free(be->qsl.base);
@@ -72,19 +72,19 @@ void hw_mod_qsl_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_qsl_reset(struct flow_api_backend_s *be)
+int nthw_mod_qsl_reset(struct flow_api_backend_s *be)
{
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->qsl));
NT_LOG(DBG, FILTER, "INIT QSL RCP");
- hw_mod_qsl_rcp_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_qsl_rcp_flush(be, 0, ALL_ENTRIES);
NT_LOG(DBG, FILTER, "INIT QSL QST");
- hw_mod_qsl_qst_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_qsl_qst_flush(be, 0, ALL_ENTRIES);
NT_LOG(DBG, FILTER, "INIT QSL QEN");
- hw_mod_qsl_qen_flush(be, 0, ALL_ENTRIES);
+ nthw_mod_qsl_qen_flush(be, 0, ALL_ENTRIES);
NT_LOG(DBG, FILTER, "INIT QSL UNMQ");
be->iface->qsl_unmq_flush(be->be_dev, &be->qsl, 0, 256);
@@ -92,7 +92,7 @@ int hw_mod_qsl_reset(struct flow_api_backend_s *be)
return 0;
}
-int hw_mod_qsl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_qsl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->qsl.nb_rcp_categories;
@@ -206,13 +206,13 @@ static int hw_mod_qsl_rcp_mod(struct flow_api_backend_s *be, enum hw_qsl_e field
return 0;
}
-int hw_mod_qsl_rcp_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_rcp_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value)
{
return hw_mod_qsl_rcp_mod(be, field, index, &value, 0);
}
-int hw_mod_qsl_qst_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_qsl_qst_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->qsl.nb_qst_entries;
@@ -286,13 +286,13 @@ static int hw_mod_qsl_qst_mod(struct flow_api_backend_s *be, enum hw_qsl_e field
return 0;
}
-int hw_mod_qsl_qst_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qst_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value)
{
return hw_mod_qsl_qst_mod(be, field, index, &value, 0);
}
-int hw_mod_qsl_qen_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_qsl_qen_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = QSL_QEN_ENTRIES;
@@ -336,19 +336,19 @@ static int hw_mod_qsl_qen_mod(struct flow_api_backend_s *be, enum hw_qsl_e field
return 0;
}
-int hw_mod_qsl_qen_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qen_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value)
{
return hw_mod_qsl_qen_mod(be, field, index, &value, 0);
}
-int hw_mod_qsl_qen_get(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_qen_get(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t *value)
{
return hw_mod_qsl_qen_mod(be, field, index, value, 1);
}
-int hw_mod_qsl_unmq_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_qsl_unmq_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = QSL_QNMQ_ENTRIES;
@@ -396,7 +396,7 @@ static int hw_mod_qsl_unmq_mod(struct flow_api_backend_s *be, enum hw_qsl_e fiel
return 0;
}
-int hw_mod_qsl_unmq_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
+int nthw_mod_qsl_unmq_set(struct flow_api_backend_s *be, enum hw_qsl_e field, uint32_t index,
uint32_t value)
{
return hw_mod_qsl_unmq_mod(be, field, index, &value, 0);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
index 4741a2e310..20ce217614 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_slc_lr.c
@@ -11,12 +11,12 @@
#define _MOD_ "SLC_LR"
#define _VER_ be->slc_lr.ver
-bool hw_mod_slc_lr_present(struct flow_api_backend_s *be)
+bool nthw_mod_slc_lr_present(struct flow_api_backend_s *be)
{
return be->iface->get_slc_lr_present(be->be_dev);
}
-int hw_mod_slc_lr_alloc(struct flow_api_backend_s *be)
+int nthw_mod_slc_lr_alloc(struct flow_api_backend_s *be)
{
_VER_ = be->iface->get_slc_lr_version(be->be_dev);
NT_LOG(DBG, FILTER, "SLC LR MODULE VERSION %i.%i", VER_MAJOR(_VER_), VER_MINOR(_VER_));
@@ -37,7 +37,7 @@ int hw_mod_slc_lr_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_slc_lr_free(struct flow_api_backend_s *be)
+void nthw_mod_slc_lr_free(struct flow_api_backend_s *be)
{
if (be->slc_lr.base) {
free(be->slc_lr.base);
@@ -45,16 +45,16 @@ void hw_mod_slc_lr_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_slc_lr_reset(struct flow_api_backend_s *be)
+int nthw_mod_slc_lr_reset(struct flow_api_backend_s *be)
{
/* Zero entire cache area */
nthw_zero_module_cache((struct common_func_s *)(&be->slc_lr));
NT_LOG(DBG, FILTER, "INIT SLC LR RCP");
- return hw_mod_slc_lr_rcp_flush(be, 0, be->max_categories);
+ return nthw_mod_slc_lr_rcp_flush(be, 0, be->max_categories);
}
-int hw_mod_slc_lr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_slc_lr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->max_categories;
@@ -161,7 +161,7 @@ static int hw_mod_slc_lr_rcp_mod(struct flow_api_backend_s *be, enum hw_slc_lr_e
return 0;
}
-int hw_mod_slc_lr_rcp_set(struct flow_api_backend_s *be, enum hw_slc_lr_e field, uint32_t index,
+int nthw_mod_slc_lr_rcp_set(struct flow_api_backend_s *be, enum hw_slc_lr_e field, uint32_t index,
uint32_t value)
{
return hw_mod_slc_lr_rcp_mod(be, field, index, &value, 0);
diff --git a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
index 1862d77350..b65e37ce7b 100644
--- a/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
+++ b/drivers/net/ntnic/nthw/flow_api/hw_mod/hw_mod_tpe.c
@@ -11,12 +11,12 @@
#define _MOD_ "TPE"
#define _VER_ be->tpe.ver
-bool hw_mod_tpe_present(struct flow_api_backend_s *be)
+bool nthw_mod_tpe_present(struct flow_api_backend_s *be)
{
return be->iface->get_tpe_present(be->be_dev);
}
-int hw_mod_tpe_alloc(struct flow_api_backend_s *be)
+int nthw_mod_tpe_alloc(struct flow_api_backend_s *be)
{
int nb;
_VER_ = be->iface->get_tpe_version(be->be_dev);
@@ -107,7 +107,7 @@ int hw_mod_tpe_alloc(struct flow_api_backend_s *be)
return 0;
}
-void hw_mod_tpe_free(struct flow_api_backend_s *be)
+void nthw_mod_tpe_free(struct flow_api_backend_s *be)
{
if (be->tpe.base) {
free(be->tpe.base);
@@ -115,7 +115,7 @@ void hw_mod_tpe_free(struct flow_api_backend_s *be)
}
}
-int hw_mod_tpe_reset(struct flow_api_backend_s *be)
+int nthw_mod_tpe_reset(struct flow_api_backend_s *be)
{
int err = 0;
@@ -123,17 +123,17 @@ int hw_mod_tpe_reset(struct flow_api_backend_s *be)
nthw_zero_module_cache((struct common_func_s *)(&be->tpe));
NT_LOG(DBG, FILTER, "INIT TPE");
- err |= hw_mod_tpe_rpp_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_ins_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_rpl_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_rpl_ext_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_rpl_rpl_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_cpy_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_hfu_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_csu_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_rpp_ifr_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_ifr_rcp_flush(be, 0, ALL_ENTRIES);
- err |= hw_mod_tpe_ifr_counters_update(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_rpp_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_ins_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_rpl_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_rpl_ext_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_rpl_rpl_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_cpy_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_hfu_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_csu_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_rpp_ifr_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_ifr_rcp_flush(be, 0, ALL_ENTRIES);
+ err |= nthw_mod_tpe_ifr_counters_update(be, 0, ALL_ENTRIES);
return err;
}
@@ -142,7 +142,7 @@ int hw_mod_tpe_reset(struct flow_api_backend_s *be)
* RPP_IFR_RCP
*/
-int hw_mod_tpe_rpp_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_rpp_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_ifr_categories;
@@ -197,7 +197,7 @@ static int hw_mod_tpe_rpp_ifr_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe
return 0;
}
-int hw_mod_tpe_rpp_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpp_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_rpp_ifr_rcp_mod(be, field, index, &value, 0);
@@ -207,7 +207,7 @@ int hw_mod_tpe_rpp_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e fiel
* RPP_RCP
*/
-int hw_mod_tpe_rpp_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_rpp_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rcp_categories;
@@ -290,7 +290,7 @@ static int hw_mod_tpe_rpp_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_rpp_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpp_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_rpp_rcp_mod(be, field, index, &value, 0);
@@ -300,7 +300,7 @@ int hw_mod_tpe_rpp_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* IFR_RCP
*/
-int hw_mod_tpe_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_ifr_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_ifr_categories;
@@ -355,7 +355,7 @@ static int hw_mod_tpe_ifr_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_ifr_rcp_mod(be, field, index, &value, 0);
@@ -365,7 +365,7 @@ int hw_mod_tpe_ifr_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* IFR_COUNTER
*/
-int hw_mod_tpe_ifr_counters_update(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_ifr_counters_update(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_ifr_categories;
@@ -402,7 +402,7 @@ static int hw_mod_tpe_ifr_counters_mod(struct flow_api_backend_s *be, enum hw_tp
return 0;
}
-int hw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value)
{
return hw_mod_tpe_ifr_counters_mod(be, field, index, value, 1);
@@ -412,7 +412,7 @@ int hw_mod_tpe_ifr_counters_get(struct flow_api_backend_s *be, enum hw_tpe_e fie
* INS_RCP
*/
-int hw_mod_tpe_ins_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_ins_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rcp_categories;
@@ -503,7 +503,7 @@ static int hw_mod_tpe_ins_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_ins_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_ins_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_ins_rcp_mod(be, field, index, &value, 0);
@@ -513,7 +513,7 @@ int hw_mod_tpe_ins_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* RPL_RCP
*/
-int hw_mod_tpe_rpl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_rpl_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rcp_categories;
@@ -616,7 +616,7 @@ static int hw_mod_tpe_rpl_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_rpl_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_rpl_rcp_mod(be, field, index, &value, 0);
@@ -626,7 +626,7 @@ int hw_mod_tpe_rpl_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* RPL_EXT
*/
-int hw_mod_tpe_rpl_ext_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_rpl_ext_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rpl_ext_categories;
@@ -713,7 +713,7 @@ static int hw_mod_tpe_rpl_ext_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_rpl_ext_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_ext_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_rpl_ext_mod(be, field, index, &value, 0);
@@ -723,7 +723,7 @@ int hw_mod_tpe_rpl_ext_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* RPL_RPL
*/
-int hw_mod_tpe_rpl_rpl_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_rpl_rpl_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rpl_depth;
@@ -813,7 +813,7 @@ static int hw_mod_tpe_rpl_rpl_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_rpl_rpl_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_rpl_rpl_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t *value)
{
return hw_mod_tpe_rpl_rpl_mod(be, field, index, value, 0);
@@ -823,7 +823,7 @@ int hw_mod_tpe_rpl_rpl_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* CPY_RCP
*/
-int hw_mod_tpe_cpy_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_cpy_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
const uint32_t cpy_size = be->tpe.nb_cpy_writers * be->tpe.nb_rcp_categories;
@@ -922,7 +922,7 @@ static int hw_mod_tpe_cpy_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_cpy_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_cpy_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_cpy_rcp_mod(be, field, index, &value, 0);
@@ -932,7 +932,7 @@ int hw_mod_tpe_cpy_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* HFU_RCP
*/
-int hw_mod_tpe_hfu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_hfu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rcp_categories;
@@ -1099,7 +1099,7 @@ static int hw_mod_tpe_hfu_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_hfu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_hfu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_hfu_rcp_mod(be, field, index, &value, 0);
@@ -1109,7 +1109,7 @@ int hw_mod_tpe_hfu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, i
* CSU_RCP
*/
-int hw_mod_tpe_csu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
+int nthw_mod_tpe_csu_rcp_flush(struct flow_api_backend_s *be, int start_idx, int count)
{
if (count == ALL_ENTRIES)
count = be->tpe.nb_rcp_categories;
@@ -1204,7 +1204,7 @@ static int hw_mod_tpe_csu_rcp_mod(struct flow_api_backend_s *be, enum hw_tpe_e f
return 0;
}
-int hw_mod_tpe_csu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
+int nthw_mod_tpe_csu_rcp_set(struct flow_api_backend_s *be, enum hw_tpe_e field, int index,
uint32_t value)
{
return hw_mod_tpe_csu_rcp_mod(be, field, index, &value, 0);
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
index 18d550a327..b1a2d9dfa3 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
@@ -138,9 +138,9 @@ struct hw_db_inline_resource_db {
} match_set[HW_DB_INLINE_MATCH_SET_NB];
};
-int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
+int nthw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
{
- /* Note: calloc is required for functionality in the hw_db_inline_destroy() */
+ /* Note: calloc is required for functionality in the nthw_db_inline_destroy() */
struct hw_db_inline_resource_db *db = calloc(1, sizeof(struct hw_db_inline_resource_db));
if (db == NULL)
@@ -150,7 +150,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->cot = calloc(db->nb_cot, sizeof(struct hw_db_inline_resource_db_cot));
if (db->cot == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -158,7 +158,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->qsl = calloc(db->nb_qsl, sizeof(struct hw_db_inline_resource_db_qsl));
if (db->qsl == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -166,7 +166,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->slc_lr = calloc(db->nb_slc_lr, sizeof(struct hw_db_inline_resource_db_slc_lr));
if (db->slc_lr == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -174,7 +174,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->tpe = calloc(db->nb_tpe, sizeof(struct hw_db_inline_resource_db_tpe));
if (db->tpe == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -182,7 +182,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->tpe_ext = calloc(db->nb_tpe_ext, sizeof(struct hw_db_inline_resource_db_tpe_ext));
if (db->tpe_ext == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -190,7 +190,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->cat = calloc(db->nb_cat, sizeof(struct hw_db_inline_resource_db_cat));
if (db->cat == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -200,7 +200,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->flm = calloc(db->nb_flm_rcp, sizeof(struct hw_db_inline_resource_db_flm_rcp));
if (db->flm == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -209,7 +209,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
calloc(db->nb_flm_ft, sizeof(struct hw_db_inline_resource_db_flm_ft));
if (db->flm[i].ft == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -217,7 +217,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
calloc(db->nb_cat, sizeof(struct hw_db_inline_resource_db_flm_match_set));
if (db->flm[i].match_set == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -225,7 +225,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
sizeof(struct hw_db_inline_resource_db_flm_cfn_map));
if (db->flm[i].cfn_map == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
}
@@ -235,7 +235,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->km = calloc(db->nb_km_rcp, sizeof(struct hw_db_inline_resource_db_km_rcp));
if (db->km == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -244,7 +244,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
sizeof(struct hw_db_inline_resource_db_km_ft));
if (db->km[i].ft == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
}
@@ -252,7 +252,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->cfn = calloc(db->nb_cat, sizeof(struct hw_db_inline_resource_db_cfn));
if (db->cfn == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -260,7 +260,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->hsh = calloc(db->nb_hsh, sizeof(struct hw_db_inline_resource_db_hsh));
if (db->hsh == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -268,7 +268,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
db->scrub = calloc(db->nb_scrub, sizeof(struct hw_db_inline_resource_db_scrub));
if (db->scrub == NULL) {
- hw_db_inline_destroy(db);
+ nthw_db_inline_destroy(db);
return -1;
}
@@ -283,7 +283,7 @@ int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle)
return 0;
}
-void hw_db_inline_destroy(void *db_handle)
+void nthw_db_inline_destroy(void *db_handle)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -319,7 +319,7 @@ void hw_db_inline_destroy(void *db_handle)
free(db);
}
-struct hw_db_idx *hw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_idx *nthw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_handle,
enum hw_db_idx_type type, struct hw_db_idx *idxs, uint32_t size)
{
(void)ndev;
@@ -332,7 +332,7 @@ struct hw_db_idx *hw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_hand
return NULL;
}
-void hw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct hw_db_idx *idxs,
+void nthw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct hw_db_idx *idxs,
uint32_t size, FILE *file)
{
(void)ndev;
@@ -563,7 +563,7 @@ void hw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct
fprintf(file, " FLM_RCP %" PRIu32 "\n", idxs[i].id1);
fprintf(file, " SCRUB %" PRIu32 "\n", idxs[i].ids);
fprintf(file, " Timeout: %" PRIu32 ", encoded timeout: %" PRIu32 "\n",
- hw_mod_flm_scrub_timeout_decode(data->timeout), data->timeout);
+ nthw_mod_flm_scrub_timeout_decode(data->timeout), data->timeout);
break;
}
@@ -614,7 +614,7 @@ void hw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct
}
}
-void hw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *file)
+void nthw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *file)
{
(void)ndev;
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -627,7 +627,7 @@ void hw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *fil
db->cfn[id].cfn_hw, db->cfn[id].priority);
}
-const void *hw_db_inline_find_data(struct flow_nic_dev *ndev, void *db_handle,
+const void *nthw_db_inline_find_data(struct flow_nic_dev *ndev, void *db_handle,
enum hw_db_idx_type type, struct hw_db_idx *idxs, uint32_t size)
{
(void)ndev;
@@ -715,13 +715,13 @@ static void hw_db_set_ft(struct flow_nic_dev *ndev, int type, int cfn_index, int
switch (type) {
case HW_DB_FT_TYPE_FLM:
- hw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST, fte_index,
- ¤t_bm);
+ nthw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ fte_index, ¤t_bm);
break;
case HW_DB_FT_TYPE_KM:
- hw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST, fte_index,
- ¤t_bm);
+ nthw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ fte_index, ¤t_bm);
break;
default:
@@ -733,15 +733,15 @@ static void hw_db_set_ft(struct flow_nic_dev *ndev, int type, int cfn_index, int
if (current_bm != final_bm) {
switch (type) {
case HW_DB_FT_TYPE_FLM:
- hw_mod_cat_fte_flm_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_flm_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index, final_bm);
- hw_mod_cat_fte_flm_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index, 1);
+ nthw_mod_cat_fte_flm_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index, 1);
break;
case HW_DB_FT_TYPE_KM:
- hw_mod_cat_fte_km_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_km_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index, final_bm);
- hw_mod_cat_fte_km_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index, 1);
+ nthw_mod_cat_fte_km_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index, 1);
break;
default:
@@ -761,7 +761,7 @@ static void hw_db_set_ft(struct flow_nic_dev *ndev, int type, int cfn_index, int
* Note: QSL recipe 0 uses DISCARD in order to allow for exception paths (UNMQ)
* Consequently another QSL recipe with hard DROP is needed
*/
-int hw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id, uint32_t ft,
+int nthw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id, uint32_t ft,
uint32_t qsl_hw_id)
{
(void)ft;
@@ -772,23 +772,23 @@ int hw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id,
(void)offset;
/* QSL for traffic policing */
- if (hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DROP, qsl_hw_id, 0x3) < 0)
+ if (nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DROP, qsl_hw_id, 0x3) < 0)
return -1;
- if (hw_mod_qsl_rcp_flush(&ndev->be, qsl_hw_id, 1) < 0)
+ if (nthw_mod_qsl_rcp_flush(&ndev->be, qsl_hw_id, 1) < 0)
return -1;
/* Select and enable QSL recipe */
- if (hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 1, qsl_hw_id))
+ if (nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 1, qsl_hw_id))
return -1;
- if (hw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6))
+ if (nthw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6))
return -1;
- if (hw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id, 0x8))
+ if (nthw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id, 0x8))
return -1;
- if (hw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1))
+ if (nthw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1))
return -1;
/* KM: Match all FTs for look-up A */
@@ -803,26 +803,26 @@ int hw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id,
hw_db_set_ft(ndev, HW_DB_FT_TYPE_FLM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_C, ft, 1);
/* Make all CFN checks TRUE */
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0))
return -1;
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x1))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x1))
return -1;
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L3, cat_hw_id, 0, 0x0))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L3, cat_hw_id, 0, 0x0))
return -1;
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_INV, cat_hw_id, 0, 0x1))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_INV, cat_hw_id, 0, 0x1))
return -1;
/* Final match: look-up_A == TRUE && look-up_C == TRUE */
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM0_OR, cat_hw_id, 0, 0x1))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM0_OR, cat_hw_id, 0, 0x1))
return -1;
- if (hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM1_OR, cat_hw_id, 0, 0x3))
+ if (nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM1_OR, cat_hw_id, 0, 0x3))
return -1;
- if (hw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1))
+ if (nthw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1))
return -1;
return 0;
@@ -833,12 +833,12 @@ static void hw_db_inline_setup_default_flm_rcp(struct flow_nic_dev *ndev, int fl
uint32_t flm_mask[10];
memset(flm_mask, 0xff, sizeof(flm_mask));
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, flm_rcp, 0x0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_LOOKUP, flm_rcp, 1);
- hw_mod_flm_rcp_set_mask(&ndev->be, HW_FLM_RCP_MASK, flm_rcp, flm_mask);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_KID, flm_rcp, flm_rcp + 2);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, flm_rcp, 0x0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_LOOKUP, flm_rcp, 1);
+ nthw_mod_flm_rcp_set_mask(&ndev->be, HW_FLM_RCP_MASK, flm_rcp, flm_mask);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_KID, flm_rcp, flm_rcp + 2);
- hw_mod_flm_rcp_flush(&ndev->be, flm_rcp, 1);
+ nthw_mod_flm_rcp_flush(&ndev->be, flm_rcp, 1);
}
@@ -861,16 +861,16 @@ static void hw_db_copy_ft(struct flow_nic_dev *ndev, int type, int cfn_dst, int
switch (type) {
case HW_DB_FT_TYPE_FLM:
- hw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_dst, ¤t_bm_dst);
- hw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_flm_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_src, ¤t_bm_src);
break;
case HW_DB_FT_TYPE_KM:
- hw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_dst, ¤t_bm_dst);
- hw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_km_get(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_src, ¤t_bm_src);
break;
@@ -885,15 +885,15 @@ static void hw_db_copy_ft(struct flow_nic_dev *ndev, int type, int cfn_dst, int
if (current_bm_dst != final_bm_dst) {
switch (type) {
case HW_DB_FT_TYPE_FLM:
- hw_mod_cat_fte_flm_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_flm_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_dst, final_bm_dst);
- hw_mod_cat_fte_flm_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index_dst, 1);
+ nthw_mod_cat_fte_flm_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index_dst, 1);
break;
case HW_DB_FT_TYPE_KM:
- hw_mod_cat_fte_km_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_fte_km_set(&ndev->be, HW_CAT_FTE_ENABLE_BM, KM_FLM_IF_FIRST,
fte_index_dst, final_bm_dst);
- hw_mod_cat_fte_km_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index_dst, 1);
+ nthw_mod_cat_fte_km_flush(&ndev->be, KM_FLM_IF_FIRST, fte_index_dst, 1);
break;
default:
@@ -938,118 +938,122 @@ static int hw_db_inline_filter_apply(struct flow_nic_dev *ndev,
/* Setup CAT.CFN */
{
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_INV, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_INV, cat_hw_id, 0, 0x0);
/* Protocol checks */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_INV, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_ISL, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_CFP, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_MAC, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L2, cat_hw_id, 0, cat->ptc_mask_l2);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_VNTAG, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_VLAN, cat_hw_id, 0, cat->vlan_mask);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_MPLS, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L3, cat_hw_id, 0, cat->ptc_mask_l3);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_FRAG, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_INV, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_ISL, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_CFP, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_MAC, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L2, cat_hw_id, 0, cat->ptc_mask_l2);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_VNTAG, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_VLAN, cat_hw_id, 0, cat->vlan_mask);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_MPLS, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L3, cat_hw_id, 0, cat->ptc_mask_l3);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_FRAG, cat_hw_id, 0,
cat->ptc_mask_frag);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_IP_PROT, cat_hw_id, 0, cat->ip_prot);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L4, cat_hw_id, 0, cat->ptc_mask_l4);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TUNNEL, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_IP_PROT, cat_hw_id, 0, cat->ip_prot);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_L4, cat_hw_id, 0, cat->ptc_mask_l4);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TUNNEL, cat_hw_id, 0,
cat->ptc_mask_tunnel);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L2, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_VLAN, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_MPLS, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L3, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L2, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_VLAN, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_MPLS, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L3, cat_hw_id, 0,
cat->ptc_mask_l3_tunnel);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_FRAG, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_IP_PROT, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_FRAG, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_IP_PROT, cat_hw_id, 0,
cat->ip_prot_tunnel);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L4, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PTC_TNL_L4, cat_hw_id, 0,
cat->ptc_mask_l4_tunnel);
/* Error checks */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_INV, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_CV, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_FCS, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TRUNC, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_L3_CS, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_L4_CS, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_L3_CS, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_L4_CS, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TTL_EXP, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_INV, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_CV, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_FCS, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TRUNC, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_L3_CS, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_L4_CS, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_L3_CS, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_L4_CS, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TTL_EXP, cat_hw_id, 0,
cat->err_mask_ttl);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_TTL_EXP, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ERR_TNL_TTL_EXP, cat_hw_id, 0,
cat->err_mask_ttl_tunnel);
/* MAC port check */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_MAC_PORT, cat_hw_id, 0,
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_MAC_PORT, cat_hw_id, 0,
cat->mac_port_mask);
/* Pattern match checks */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_CMP, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_DCT, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_EXT_INV, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_CMB, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_AND_INV, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_OR_INV, cat_hw_id, 0, -1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_INV, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_CMP, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_DCT, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_EXT_INV, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_CMB, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_AND_INV, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_OR_INV, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PM_INV, cat_hw_id, 0, -1);
/* Length checks */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_LC, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_LC_INV, cat_hw_id, 0, -1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_LC, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_LC_INV, cat_hw_id, 0, -1);
/* KM and FLM */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM0_OR, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM1_OR, cat_hw_id, 0, 0x3);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM0_OR, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_KM1_OR, cat_hw_id, 0, 0x3);
- hw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
}
/* Setup CAT.CTS */
{
const int offset = ((int)ndev->be.cat.cts_num + 1) / 2;
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 0, cat_hw_id);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 0, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 1, hsh_hw_id);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 1, qsl_hw_id);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 2, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 2,
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 0,
+ cat_hw_id);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 0, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 1,
+ hsh_hw_id);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 1,
+ qsl_hw_id);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 2, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 2,
slc_lr_hw_id);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 3, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 3, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 4, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 4, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 5, tpe_hw_id);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 5, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 3, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 3, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 4, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 4, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + 5,
+ tpe_hw_id);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + 5, 0);
- hw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6);
+ nthw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6);
}
/* Setup CAT.CTE */
{
- hw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id,
+ nthw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id,
0x001 | 0x004 | (qsl_hw_id ? 0x008 : 0) |
(slc_lr_hw_id ? 0x020 : 0) | 0x040 |
(tpe_hw_id ? 0x400 : 0));
- hw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1);
}
/* Setup CAT.KM */
{
uint32_t bm = 0;
- hw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
+ nthw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
km_rcp);
- hw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
+ nthw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
- hw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, &bm);
- hw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, bm | (1 << (cat_hw_id % 8)));
- hw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
+ nthw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
hw_db_set_ft(ndev, HW_DB_FT_TYPE_KM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_A, km_ft, 1);
}
@@ -1058,15 +1062,15 @@ static int hw_db_inline_filter_apply(struct flow_nic_dev *ndev,
{
uint32_t bm = 0;
- hw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
+ nthw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
flm_rcp);
- hw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
+ nthw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
- hw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, &bm);
- hw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, bm | (1 << (cat_hw_id % 8)));
- hw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
+ nthw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
hw_db_set_ft(ndev, HW_DB_FT_TYPE_FLM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_A, km_ft, 1);
hw_db_set_ft(ndev, HW_DB_FT_TYPE_FLM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_C, flm_ft, 1);
@@ -1074,15 +1078,15 @@ static int hw_db_inline_filter_apply(struct flow_nic_dev *ndev,
/* Setup CAT.COT */
{
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, cat_hw_id, 0);
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_COLOR, cat_hw_id, cot->frag_rcp << 10);
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_KM, cat_hw_id,
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, cat_hw_id, 0);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_COLOR, cat_hw_id, cot->frag_rcp << 10);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_KM, cat_hw_id,
cot->matcher_color_contrib);
- hw_mod_cat_cot_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cot_flush(&ndev->be, cat_hw_id, 1);
}
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x1);
- hw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cat_hw_id, 0, 0x1);
+ nthw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
return 0;
}
@@ -1092,40 +1096,42 @@ static void hw_db_inline_filter_clear(struct flow_nic_dev *ndev,
int cat_hw_id)
{
/* Setup CAT.CFN */
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0x0);
- hw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_SET_ALL_DEFAULTS, cat_hw_id, 0, 0x0);
+ nthw_mod_cat_cfn_flush(&ndev->be, cat_hw_id, 1);
/* Setup CAT.CTS */
{
const int offset = ((int)ndev->be.cat.cts_num + 1) / 2;
for (int i = 0; i < 6; ++i) {
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cat_hw_id + i, 0);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cat_hw_id + i, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A,
+ offset * cat_hw_id + i, 0);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B,
+ offset * cat_hw_id + i, 0);
}
- hw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6);
+ nthw_mod_cat_cts_flush(&ndev->be, offset * cat_hw_id, 6);
}
/* Setup CAT.CTE */
{
- hw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id, 0);
- hw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cat_hw_id, 0);
+ nthw_mod_cat_cte_flush(&ndev->be, cat_hw_id, 1);
}
/* Setup CAT.KM */
{
uint32_t bm = 0;
- hw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
+ nthw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
0);
- hw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
+ nthw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
- hw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, &bm);
- hw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, bm & ~(1 << (cat_hw_id % 8)));
- hw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
+ nthw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
for (int ft = 0; ft < (int)db->nb_km_ft; ++ft) {
hw_db_set_ft(ndev, HW_DB_FT_TYPE_KM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_A, ft,
@@ -1137,15 +1143,15 @@ static void hw_db_inline_filter_clear(struct flow_nic_dev *ndev,
{
uint32_t bm = 0;
- hw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
+ nthw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cat_hw_id,
0);
- hw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
+ nthw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id, 1);
- hw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, &bm);
- hw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cat_hw_id / 8, bm & ~(1 << (cat_hw_id % 8)));
- hw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
+ nthw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cat_hw_id / 8, 1);
for (int ft = 0; ft < (int)db->nb_flm_ft; ++ft) {
hw_db_set_ft(ndev, HW_DB_FT_TYPE_FLM, cat_hw_id, HW_DB_FT_LOOKUP_KEY_A, ft,
@@ -1155,8 +1161,8 @@ static void hw_db_inline_filter_clear(struct flow_nic_dev *ndev,
}
}
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, cat_hw_id, 0);
- hw_mod_cat_cot_flush(&ndev->be, cat_hw_id, 1);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, cat_hw_id, 0);
+ nthw_mod_cat_cot_flush(&ndev->be, cat_hw_id, 1);
}
static void hw_db_inline_filter_copy(struct flow_nic_dev *ndev,
@@ -1164,54 +1170,56 @@ static void hw_db_inline_filter_copy(struct flow_nic_dev *ndev,
{
uint32_t val = 0;
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_COPY_FROM, cfn_dst, 0, cfn_src);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cfn_dst, 0, 0x0);
- hw_mod_cat_cfn_flush(&ndev->be, cfn_dst, 1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_COPY_FROM, cfn_dst, 0, cfn_src);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cfn_dst, 0, 0x0);
+ nthw_mod_cat_cfn_flush(&ndev->be, cfn_dst, 1);
/* Setup CAT.CTS */
{
const int offset = ((int)ndev->be.cat.cts_num + 1) / 2;
for (int i = 0; i < offset; ++i) {
- hw_mod_cat_cts_get(&ndev->be, HW_CAT_CTS_CAT_A, offset * cfn_src + i,
- &val);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A, offset * cfn_dst + i, val);
- hw_mod_cat_cts_get(&ndev->be, HW_CAT_CTS_CAT_B, offset * cfn_src + i,
- &val);
- hw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B, offset * cfn_dst + i, val);
+ nthw_mod_cat_cts_get(&ndev->be, HW_CAT_CTS_CAT_A,
+ offset * cfn_src + i, &val);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_A,
+ offset * cfn_dst + i, val);
+ nthw_mod_cat_cts_get(&ndev->be, HW_CAT_CTS_CAT_B,
+ offset * cfn_src + i, &val);
+ nthw_mod_cat_cts_set(&ndev->be, HW_CAT_CTS_CAT_B,
+ offset * cfn_dst + i, val);
}
- hw_mod_cat_cts_flush(&ndev->be, offset * cfn_dst, offset);
+ nthw_mod_cat_cts_flush(&ndev->be, offset * cfn_dst, offset);
}
/* Setup CAT.CTE */
{
- hw_mod_cat_cte_get(&ndev->be, HW_CAT_CTE_ENABLE_BM, cfn_src, &val);
- hw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cfn_dst, val);
- hw_mod_cat_cte_flush(&ndev->be, cfn_dst, 1);
+ nthw_mod_cat_cte_get(&ndev->be, HW_CAT_CTE_ENABLE_BM, cfn_src, &val);
+ nthw_mod_cat_cte_set(&ndev->be, HW_CAT_CTE_ENABLE_BM, cfn_dst, val);
+ nthw_mod_cat_cte_flush(&ndev->be, cfn_dst, 1);
}
/* Setup CAT.KM */
{
uint32_t bit_src = 0;
- hw_mod_cat_kcs_km_get(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_src,
+ nthw_mod_cat_kcs_km_get(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_src,
&val);
- hw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_dst,
+ nthw_mod_cat_kcs_km_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_dst,
val);
- hw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst, 1);
+ nthw_mod_cat_kcs_km_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst, 1);
- hw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_src / 8, &val);
bit_src = (val >> (cfn_src % 8)) & 0x1;
- hw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_dst / 8, &val);
val &= ~(1 << (cfn_dst % 8));
- hw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_km_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_dst / 8, val | (bit_src << (cfn_dst % 8)));
- hw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst / 8, 1);
+ nthw_mod_cat_kce_km_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst / 8, 1);
for (int ft = 0; ft < (int)db->nb_km_ft; ++ft) {
hw_db_copy_ft(ndev, HW_DB_FT_TYPE_KM, cfn_dst, cfn_src,
@@ -1223,23 +1231,23 @@ static void hw_db_inline_filter_copy(struct flow_nic_dev *ndev,
{
uint32_t bit_src = 0;
- hw_mod_cat_kcs_flm_get(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_src,
+ nthw_mod_cat_kcs_flm_get(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_src,
&val);
- hw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_dst,
+ nthw_mod_cat_kcs_flm_set(&ndev->be, HW_CAT_KCS_CATEGORY, KM_FLM_IF_FIRST, cfn_dst,
val);
- hw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst, 1);
+ nthw_mod_cat_kcs_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst, 1);
- hw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_src / 8, &val);
bit_src = (val >> (cfn_src % 8)) & 0x1;
- hw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_get(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_dst / 8, &val);
val &= ~(1 << (cfn_dst % 8));
- hw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
+ nthw_mod_cat_kce_flm_set(&ndev->be, HW_CAT_KCE_ENABLE_BM, KM_FLM_IF_FIRST,
cfn_dst / 8, val | (bit_src << (cfn_dst % 8)));
- hw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst / 8, 1);
+ nthw_mod_cat_kce_flm_flush(&ndev->be, KM_FLM_IF_FIRST, cfn_dst / 8, 1);
for (int ft = 0; ft < (int)db->nb_flm_ft; ++ft) {
hw_db_copy_ft(ndev, HW_DB_FT_TYPE_FLM, cfn_dst, cfn_src,
@@ -1251,12 +1259,12 @@ static void hw_db_inline_filter_copy(struct flow_nic_dev *ndev,
/* Setup CAT.COT */
{
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_COPY_FROM, cfn_dst, cfn_src);
- hw_mod_cat_cot_flush(&ndev->be, cfn_dst, 1);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_COPY_FROM, cfn_dst, cfn_src);
+ nthw_mod_cat_cot_flush(&ndev->be, cfn_dst, 1);
}
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cfn_dst, 0, 0x1);
- hw_mod_cat_cfn_flush(&ndev->be, cfn_dst, 1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_ENABLE, cfn_dst, 0, 0x1);
+ nthw_mod_cat_cfn_flush(&ndev->be, cfn_dst, 1);
}
/*
@@ -1443,7 +1451,7 @@ static void hw_db_inline_match_set_ref(struct flow_nic_dev *ndev, void *db_handl
}
struct hw_db_match_set_idx
-hw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
+nthw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_match_set_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1554,7 +1562,7 @@ static void hw_db_inline_action_set_ref(struct flow_nic_dev *ndev, void *db_hand
}
struct hw_db_action_set_idx
-hw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
+nthw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_action_set_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1626,7 +1634,7 @@ static void hw_db_inline_cot_ref(struct flow_nic_dev *ndev __rte_unused, void *d
db->cot[idx.ids].ref += 1;
}
-struct hw_db_cot_idx hw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_cot_idx nthw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cot_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1724,7 +1732,7 @@ static void hw_db_inline_qsl_ref(struct flow_nic_dev *ndev, void *db_handle,
nthw_flow_nic_ref_resource(ndev, RES_QSL_RCP, idx.ids);
}
-struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_qsl_idx nthw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_qsl_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1771,48 +1779,49 @@ struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_ha
memcpy(&db->qsl[qsl_idx.ids].data, data, sizeof(struct hw_db_inline_qsl_data));
db->qsl[qsl_idx.ids].qst_idx = qst_idx;
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, qsl_idx.ids, 0x0);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, qsl_idx.ids, 0x0);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DISCARD, qsl_idx.ids, data->discard);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DROP, qsl_idx.ids, data->drop * 0x3);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_LR, qsl_idx.ids, data->retransmit * 0x3);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DISCARD, qsl_idx.ids, data->discard);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DROP, qsl_idx.ids, data->drop * 0x3);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_LR, qsl_idx.ids, data->retransmit * 0x3);
if (data->table_size == 0) {
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_LO, qsl_idx.ids, 0x0);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_HI, qsl_idx.ids, 0x0);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_IDX, qsl_idx.ids, 0x0);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_MSK, qsl_idx.ids, 0x0);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_LO, qsl_idx.ids, 0x0);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_HI, qsl_idx.ids, 0x0);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_IDX, qsl_idx.ids, 0x0);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_MSK, qsl_idx.ids, 0x0);
} else {
const uint32_t table_start = qst_idx;
const uint32_t table_end = table_start + data->table_size - 1;
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_LO, qsl_idx.ids, table_start);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_HI, qsl_idx.ids, table_end);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_LO, qsl_idx.ids, table_start);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_HI, qsl_idx.ids, table_end);
/* Toeplitz hash function uses TBL_IDX and TBL_MSK. */
uint32_t msk = queue_mask(table_end - table_start + 1);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_IDX, qsl_idx.ids, table_start);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_MSK, qsl_idx.ids, msk);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_IDX, qsl_idx.ids, table_start);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_TBL_MSK, qsl_idx.ids, msk);
for (uint32_t i = 0; i < data->table_size; ++i) {
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL, table_start + i, 0x0);
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL,
+ table_start + i, 0x0);
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_TX_PORT, table_start + i,
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_TX_PORT, table_start + i,
data->table[i].tx_port);
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_LRE, table_start + i,
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_LRE, table_start + i,
data->table[i].tx_port_en);
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_QUEUE, table_start + i,
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_QUEUE, table_start + i,
data->table[i].queue);
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_EN, table_start + i,
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_EN, table_start + i,
data->table[i].queue_en);
}
- hw_mod_qsl_qst_flush(&ndev->be, table_start, data->table_size);
+ nthw_mod_qsl_qst_flush(&ndev->be, table_start, data->table_size);
}
- hw_mod_qsl_rcp_flush(&ndev->be, qsl_idx.ids, 1);
+ nthw_mod_qsl_rcp_flush(&ndev->be, qsl_idx.ids, 1);
return qsl_idx;
}
@@ -1828,19 +1837,19 @@ static void hw_db_inline_qsl_deref(struct flow_nic_dev *ndev, void *db_handle,
if (nthw_flow_nic_deref_resource(ndev, RES_QSL_RCP, idx.ids) == 0) {
const int table_size = (int)db->qsl[idx.ids].data.table_size;
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, idx.ids, 0x0);
- hw_mod_qsl_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, idx.ids, 0x0);
+ nthw_mod_qsl_rcp_flush(&ndev->be, idx.ids, 1);
if (table_size > 0) {
const int table_start = db->qsl[idx.ids].qst_idx;
for (int i = 0; i < (int)table_size; ++i) {
- hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL,
+ nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL,
table_start + i, 0x0);
nthw_flow_nic_free_resource(ndev, RES_QSL_QST, table_start + i);
}
- hw_mod_qsl_qst_flush(&ndev->be, table_start, table_size);
+ nthw_mod_qsl_qst_flush(&ndev->be, table_start, table_size);
}
memset(&db->qsl[idx.ids].data, 0x0, sizeof(struct hw_db_inline_qsl_data));
@@ -1873,7 +1882,7 @@ static void hw_db_inline_slc_lr_ref(struct flow_nic_dev *ndev, void *db_handle,
db->slc_lr[idx.ids].ref += 1;
}
-struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_slc_lr_idx nthw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_slc_lr_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -1905,10 +1914,10 @@ struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void
db->slc_lr[idx.ids].ref = 1;
memcpy(&db->slc_lr[idx.ids].data, data, sizeof(struct hw_db_inline_slc_lr_data));
- hw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_SLC_EN, idx.ids, data->head_slice_en);
- hw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_DYN, idx.ids, data->head_slice_dyn);
- hw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_OFS, idx.ids, data->head_slice_ofs);
- hw_mod_slc_lr_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_SLC_EN, idx.ids, data->head_slice_en);
+ nthw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_DYN, idx.ids, data->head_slice_dyn);
+ nthw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_HEAD_OFS, idx.ids, data->head_slice_ofs);
+ nthw_mod_slc_lr_rcp_flush(&ndev->be, idx.ids, 1);
return idx;
}
@@ -1924,8 +1933,8 @@ static void hw_db_inline_slc_lr_deref(struct flow_nic_dev *ndev, void *db_handle
db->slc_lr[idx.ids].ref -= 1;
if (db->slc_lr[idx.ids].ref <= 0) {
- hw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_PRESET_ALL, idx.ids, 0x0);
- hw_mod_slc_lr_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_PRESET_ALL, idx.ids, 0x0);
+ nthw_mod_slc_lr_rcp_flush(&ndev->be, idx.ids, 1);
memset(&db->slc_lr[idx.ids].data, 0x0, sizeof(struct hw_db_inline_slc_lr_data));
db->slc_lr[idx.ids].ref = 0;
@@ -1980,7 +1989,7 @@ static void hw_db_inline_tpe_ref(struct flow_nic_dev *ndev, void *db_handle,
db->tpe[idx.ids].ref += 1;
}
-struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_tpe_idx nthw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2013,98 +2022,98 @@ struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_ha
memcpy(&db->tpe[idx.ids].data, data, sizeof(struct hw_db_inline_tpe_data));
if (data->insert_len > 0) {
- hw_mod_tpe_rpp_rcp_set(&ndev->be, HW_TPE_RPP_RCP_EXP, idx.ids, data->insert_len);
- hw_mod_tpe_rpp_rcp_flush(&ndev->be, idx.ids, 1);
-
- hw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_DYN, idx.ids, 1);
- hw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_OFS, idx.ids, 0);
- hw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_LEN, idx.ids, data->insert_len);
- hw_mod_tpe_ins_rcp_flush(&ndev->be, idx.ids, 1);
-
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_DYN, idx.ids, 1);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_OFS, idx.ids, 0);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_LEN, idx.ids, data->insert_len);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_RPL_PTR, idx.ids, 0);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_EXT_PRIO, idx.ids, 1);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_ETH_TYPE_WR, idx.ids,
+ nthw_mod_tpe_rpp_rcp_set(&ndev->be, HW_TPE_RPP_RCP_EXP, idx.ids, data->insert_len);
+ nthw_mod_tpe_rpp_rcp_flush(&ndev->be, idx.ids, 1);
+
+ nthw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_DYN, idx.ids, 1);
+ nthw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_OFS, idx.ids, 0);
+ nthw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_INS_RCP_LEN, idx.ids, data->insert_len);
+ nthw_mod_tpe_ins_rcp_flush(&ndev->be, idx.ids, 1);
+
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_DYN, idx.ids, 1);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_OFS, idx.ids, 0);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_LEN, idx.ids, data->insert_len);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_RPL_PTR, idx.ids, 0);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_EXT_PRIO, idx.ids, 1);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_RPL_RCP_ETH_TYPE_WR, idx.ids,
data->calc_eth_type_from_inner_ip);
- hw_mod_tpe_rpl_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_rpl_rcp_flush(&ndev->be, idx.ids, 1);
}
for (uint32_t i = 0; i < 6; ++i) {
if (data->writer[i].en) {
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_READER_SELECT,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_READER_SELECT,
idx.ids + db->nb_tpe * i,
data->writer[i].reader_select);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_DYN,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_DYN,
idx.ids + db->nb_tpe * i, data->writer[i].dyn);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_OFS,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_OFS,
idx.ids + db->nb_tpe * i, data->writer[i].ofs);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_LEN,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_LEN,
idx.ids + db->nb_tpe * i, data->writer[i].len);
} else {
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_READER_SELECT,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_READER_SELECT,
idx.ids + db->nb_tpe * i, 0);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_DYN,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_DYN,
idx.ids + db->nb_tpe * i, 0);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_OFS,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_OFS,
idx.ids + db->nb_tpe * i, 0);
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_LEN,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_CPY_RCP_LEN,
idx.ids + db->nb_tpe * i, 0);
}
- hw_mod_tpe_cpy_rcp_flush(&ndev->be, idx.ids + db->nb_tpe * i, 1);
+ nthw_mod_tpe_cpy_rcp_flush(&ndev->be, idx.ids + db->nb_tpe * i, 1);
}
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_WR, idx.ids, data->len_a_en);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_OUTER_L4_LEN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_WR, idx.ids, data->len_a_en);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_OUTER_L4_LEN, idx.ids,
data->new_outer);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_POS_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_POS_DYN, idx.ids,
data->len_a_pos_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_POS_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_POS_OFS, idx.ids,
data->len_a_pos_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_ADD_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_ADD_DYN, idx.ids,
data->len_a_add_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_ADD_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_ADD_OFS, idx.ids,
data->len_a_add_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_SUB_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_A_SUB_DYN, idx.ids,
data->len_a_sub_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_WR, idx.ids, data->len_b_en);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_POS_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_WR, idx.ids, data->len_b_en);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_POS_DYN, idx.ids,
data->len_b_pos_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_POS_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_POS_OFS, idx.ids,
data->len_b_pos_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_ADD_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_ADD_DYN, idx.ids,
data->len_b_add_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_ADD_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_ADD_OFS, idx.ids,
data->len_b_add_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_SUB_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_B_SUB_DYN, idx.ids,
data->len_b_sub_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_WR, idx.ids, data->len_c_en);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_POS_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_WR, idx.ids, data->len_c_en);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_POS_DYN, idx.ids,
data->len_c_pos_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_POS_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_POS_OFS, idx.ids,
data->len_c_pos_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_ADD_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_ADD_DYN, idx.ids,
data->len_c_add_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_ADD_OFS, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_ADD_OFS, idx.ids,
data->len_c_add_ofs);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_SUB_DYN, idx.ids,
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_LEN_C_SUB_DYN, idx.ids,
data->len_c_sub_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_WR, idx.ids, data->ttl_en);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_POS_DYN, idx.ids, data->ttl_dyn);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_POS_OFS, idx.ids, data->ttl_ofs);
- hw_mod_tpe_hfu_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_WR, idx.ids, data->ttl_en);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_POS_DYN, idx.ids, data->ttl_dyn);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_HFU_RCP_TTL_POS_OFS, idx.ids, data->ttl_ofs);
+ nthw_mod_tpe_hfu_rcp_flush(&ndev->be, idx.ids, 1);
- hw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_OUTER_L3_CMD, idx.ids, 3);
- hw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_OUTER_L4_CMD, idx.ids, 3);
- hw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_INNER_L3_CMD, idx.ids, 3);
- hw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_INNER_L4_CMD, idx.ids, 3);
- hw_mod_tpe_csu_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_OUTER_L3_CMD, idx.ids, 3);
+ nthw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_OUTER_L4_CMD, idx.ids, 3);
+ nthw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_INNER_L3_CMD, idx.ids, 3);
+ nthw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_CSU_RCP_INNER_L4_CMD, idx.ids, 3);
+ nthw_mod_tpe_csu_rcp_flush(&ndev->be, idx.ids, 1);
return idx;
}
@@ -2121,25 +2130,25 @@ static void hw_db_inline_tpe_deref(struct flow_nic_dev *ndev, void *db_handle,
if (db->tpe[idx.ids].ref <= 0) {
for (uint32_t i = 0; i < 6; ++i) {
- hw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_PRESET_ALL,
+ nthw_mod_tpe_cpy_rcp_set(&ndev->be, HW_TPE_PRESET_ALL,
idx.ids + db->nb_tpe * i, 0);
- hw_mod_tpe_cpy_rcp_flush(&ndev->be, idx.ids + db->nb_tpe * i, 1);
+ nthw_mod_tpe_cpy_rcp_flush(&ndev->be, idx.ids + db->nb_tpe * i, 1);
}
- hw_mod_tpe_rpp_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_rpp_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_rpp_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_rpp_rcp_flush(&ndev->be, idx.ids, 1);
- hw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_ins_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_ins_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_ins_rcp_flush(&ndev->be, idx.ids, 1);
- hw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_rpl_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_rpl_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_rpl_rcp_flush(&ndev->be, idx.ids, 1);
- hw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_hfu_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_hfu_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_hfu_rcp_flush(&ndev->be, idx.ids, 1);
- hw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_csu_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_csu_rcp_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_csu_rcp_flush(&ndev->be, idx.ids, 1);
memset(&db->tpe[idx.ids].data, 0x0, sizeof(struct hw_db_inline_tpe_data));
db->tpe[idx.ids].ref = 0;
@@ -2167,7 +2176,7 @@ static void hw_db_inline_tpe_ext_ref(struct flow_nic_dev *ndev, void *db_handle,
db->tpe_ext[idx.ids].ref += 1;
}
-struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_tpe_ext_idx nthw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_ext_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2213,18 +2222,18 @@ struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, voi
db->tpe_ext[idx.ids].replace_ram_idx = rpl_rpl_index;
memcpy(&db->tpe_ext[idx.ids].data, data, sizeof(struct hw_db_inline_tpe_ext_data));
- hw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_RPL_EXT_RPL_PTR, idx.ids, rpl_rpl_index);
- hw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_RPL_EXT_META_RPL_LEN, idx.ids, data->size);
- hw_mod_tpe_rpl_ext_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_RPL_EXT_RPL_PTR, idx.ids, rpl_rpl_index);
+ nthw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_RPL_EXT_META_RPL_LEN, idx.ids, data->size);
+ nthw_mod_tpe_rpl_ext_flush(&ndev->be, idx.ids, 1);
for (int i = 0; i < rpl_rpl_length; ++i) {
uint32_t rpl_data[4];
memcpy(rpl_data, data->hdr32 + i * 4, sizeof(rpl_data));
- hw_mod_tpe_rpl_rpl_set(&ndev->be, HW_TPE_RPL_RPL_VALUE, rpl_rpl_index + i,
+ nthw_mod_tpe_rpl_rpl_set(&ndev->be, HW_TPE_RPL_RPL_VALUE, rpl_rpl_index + i,
rpl_data);
}
- hw_mod_tpe_rpl_rpl_flush(&ndev->be, rpl_rpl_index, rpl_rpl_length);
+ nthw_mod_tpe_rpl_rpl_flush(&ndev->be, rpl_rpl_index, rpl_rpl_length);
return idx;
}
@@ -2243,17 +2252,17 @@ static void hw_db_inline_tpe_ext_deref(struct flow_nic_dev *ndev, void *db_handl
const int rpl_rpl_length = ((int)db->tpe_ext[idx.ids].data.size + 15) / 16;
const int rpl_rpl_index = db->tpe_ext[idx.ids].replace_ram_idx;
- hw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
- hw_mod_tpe_rpl_ext_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_tpe_rpl_ext_set(&ndev->be, HW_TPE_PRESET_ALL, idx.ids, 0);
+ nthw_mod_tpe_rpl_ext_flush(&ndev->be, idx.ids, 1);
for (int i = 0; i < rpl_rpl_length; ++i) {
uint32_t rpl_zero[] = { 0, 0, 0, 0 };
- hw_mod_tpe_rpl_rpl_set(&ndev->be, HW_TPE_RPL_RPL_VALUE, rpl_rpl_index + i,
+ nthw_mod_tpe_rpl_rpl_set(&ndev->be, HW_TPE_RPL_RPL_VALUE, rpl_rpl_index + i,
rpl_zero);
nthw_flow_nic_free_resource(ndev, RES_TPE_RPL, rpl_rpl_index + i);
}
- hw_mod_tpe_rpl_rpl_flush(&ndev->be, rpl_rpl_index, rpl_rpl_length);
+ nthw_mod_tpe_rpl_rpl_flush(&ndev->be, rpl_rpl_index, rpl_rpl_length);
memset(&db->tpe_ext[idx.ids].data, 0x0, sizeof(struct hw_db_inline_tpe_ext_data));
db->tpe_ext[idx.ids].ref = 0;
@@ -2292,7 +2301,7 @@ static int hw_db_inline_cat_compare(const struct hw_db_inline_cat_data *data1,
data1->ip_prot_tunnel == data2->ip_prot_tunnel;
}
-struct hw_db_cat_idx hw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_cat_idx nthw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cat_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2363,7 +2372,7 @@ static void hw_db_inline_km_ref(struct flow_nic_dev *ndev, void *db_handle, stru
db->km[idx.id1].ref += 1;
}
-struct hw_db_km_idx hw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_km_idx nthw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_rcp_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2436,7 +2445,7 @@ static void hw_db_inline_km_ft_ref(struct flow_nic_dev *ndev, void *db_handle,
}
}
-struct hw_db_km_ft hw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_km_ft nthw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_ft_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2533,7 +2542,7 @@ static void hw_db_inline_flm_ref(struct flow_nic_dev *ndev, void *db_handle,
db->flm[idx.id1].ref += 1;
}
-struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_idx nthw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_rcp_data *data, int group)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2566,31 +2575,31 @@ struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_ha
data->mask[9], data->mask[8], data->mask[7], data->mask[6], /* QW0 */
};
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, idx.id1, 0x0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_LOOKUP, idx.id1, 1);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, idx.id1, 0x0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_LOOKUP, idx.id1, 1);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_DYN, idx.id1, data->qw0_dyn);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_OFS, idx.id1, data->qw0_ofs);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_SEL, idx.id1, 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW4_DYN, idx.id1, data->qw4_dyn);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW4_OFS, idx.id1, data->qw4_ofs);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_DYN, idx.id1, data->qw0_dyn);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_OFS, idx.id1, data->qw0_ofs);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW0_SEL, idx.id1, 0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW4_DYN, idx.id1, data->qw4_dyn);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_QW4_OFS, idx.id1, data->qw4_ofs);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_DYN, idx.id1, data->sw8_dyn);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_OFS, idx.id1, data->sw8_ofs);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_SEL, idx.id1, 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW9_DYN, idx.id1, data->sw9_dyn);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW9_OFS, idx.id1, data->sw9_ofs);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_DYN, idx.id1, data->sw8_dyn);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_OFS, idx.id1, data->sw8_ofs);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW8_SEL, idx.id1, 0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW9_DYN, idx.id1, data->sw9_dyn);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_SW9_OFS, idx.id1, data->sw9_ofs);
- hw_mod_flm_rcp_set_mask(&ndev->be, HW_FLM_RCP_MASK, idx.id1, flm_mask);
+ nthw_mod_flm_rcp_set_mask(&ndev->be, HW_FLM_RCP_MASK, idx.id1, flm_mask);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_KID, idx.id1, idx.id1 + 2);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_OPN, idx.id1, data->outer_prot ? 1 : 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_IPN, idx.id1, data->inner_prot ? 1 : 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_BYT_DYN, idx.id1, 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_BYT_OFS, idx.id1, -20);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_TXPLM, idx.id1, UINT32_MAX);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_KID, idx.id1, idx.id1 + 2);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_OPN, idx.id1, data->outer_prot ? 1 : 0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_IPN, idx.id1, data->inner_prot ? 1 : 0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_BYT_DYN, idx.id1, 0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_BYT_OFS, idx.id1, -20);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_TXPLM, idx.id1, UINT32_MAX);
- hw_mod_flm_rcp_flush(&ndev->be, idx.id1, 1);
+ nthw_mod_flm_rcp_flush(&ndev->be, idx.id1, 1);
}
return idx;
@@ -2638,7 +2647,7 @@ static void hw_db_inline_flm_ft_ref(struct flow_nic_dev *ndev, void *db_handle,
db->flm[idx.id2].ft[idx.id1].ref += 1;
}
-struct hw_db_flm_ft hw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_ft nthw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2673,7 +2682,7 @@ struct hw_db_flm_ft hw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void
return idx;
}
-struct hw_db_flm_ft hw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_ft nthw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2776,7 +2785,7 @@ static void hw_db_inline_hsh_ref(struct flow_nic_dev *ndev, void *db_handle,
db->hsh[idx.ids].ref += 1;
}
-struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_hsh_idx nthw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_hsh_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2832,7 +2841,7 @@ struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_ha
memcpy(&db->hsh[idx.ids].data, data, sizeof(struct hw_db_inline_hsh_data));
flow_nic_mark_resource_used(ndev, RES_HSH_RCP, idx.ids);
- hw_mod_hsh_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_hsh_rcp_flush(&ndev->be, idx.ids, 1);
return idx;
}
@@ -2854,10 +2863,10 @@ static void hw_db_inline_hsh_deref(struct flow_nic_dev *ndev, void *db_handle,
* it is not used by any flow
*/
if (idx.ids > 0) {
- int res = hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL,
+ int res = nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL,
idx.ids, 0, 0x0);
NT_LOG(ERR, FILTER, "Failed to preset HSH RCP %u: %d", idx.ids, res);
- hw_mod_hsh_rcp_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_hsh_rcp_flush(&ndev->be, idx.ids, 1);
memset(&db->hsh[idx.ids].data, 0x0, sizeof(struct hw_db_inline_hsh_data));
nthw_flow_nic_free_resource(ndev, RES_HSH_RCP, idx.ids);
@@ -2888,7 +2897,7 @@ static void hw_db_inline_scrub_ref(struct flow_nic_dev *ndev, void *db_handle,
db->scrub[idx.ids].ref += 1;
}
-struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_scrub_idx nthw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_scrub_data *data)
{
struct hw_db_inline_resource_db *db = (struct hw_db_inline_resource_db *)db_handle;
@@ -2924,11 +2933,11 @@ struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, voi
return idx;
}
- int res = hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_T, idx.ids, data->timeout);
- res |= hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_R, idx.ids,
+ int res = nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_T, idx.ids, data->timeout);
+ res |= nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_R, idx.ids,
NTNIC_SCANNER_TIMEOUT_RESOLUTION);
- res |= hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_DEL, idx.ids, SCRUB_DEL);
- res |= hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_INF, idx.ids, SCRUB_INF);
+ res |= nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_DEL, idx.ids, SCRUB_DEL);
+ res |= nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_INF, idx.ids, SCRUB_INF);
if (res != 0) {
idx.error = 1;
@@ -2939,7 +2948,7 @@ struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, voi
memcpy(&db->scrub[idx.ids].data, data, sizeof(struct hw_db_inline_scrub_data));
flow_nic_mark_resource_used(ndev, RES_SCRUB_RCP, idx.ids);
- hw_mod_flm_scrub_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_flm_scrub_flush(&ndev->be, idx.ids, 1);
return idx;
}
@@ -2958,8 +2967,8 @@ static void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
/* NOTE: scrub id 0 is reserved for "default" timeout 0, which shall not be removed
*/
if (idx.ids > 0) {
- hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_T, idx.ids, 0);
- hw_mod_flm_scrub_flush(&ndev->be, idx.ids, 1);
+ nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_T, idx.ids, 0);
+ nthw_mod_flm_scrub_flush(&ndev->be, idx.ids, 1);
memset(&db->scrub[idx.ids].data, 0x0,
sizeof(struct hw_db_inline_scrub_data));
@@ -2970,7 +2979,7 @@ static void hw_db_inline_scrub_deref(struct flow_nic_dev *ndev, void *db_handle,
}
}
-void hw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
+void nthw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
uint32_t size)
{
for (uint32_t i = 0; i < size; ++i) {
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
index e7f66dc075..b2bd2f6d2d 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.h
@@ -280,62 +280,62 @@ struct hw_db_inline_scrub_data {
/**/
-int hw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle);
-void hw_db_inline_destroy(void *db_handle);
+int nthw_db_inline_create(struct flow_nic_dev *ndev, void **db_handle);
+void nthw_db_inline_destroy(void *db_handle);
-void hw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
+void nthw_db_inline_deref_idxs(struct flow_nic_dev *ndev, void *db_handle, struct hw_db_idx *idxs,
uint32_t size);
-const void *hw_db_inline_find_data(struct flow_nic_dev *ndev, void *db_handle,
+const void *nthw_db_inline_find_data(struct flow_nic_dev *ndev, void *db_handle,
enum hw_db_idx_type type, struct hw_db_idx *idxs, uint32_t size);
-struct hw_db_idx *hw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_idx *nthw_db_inline_find_idx(struct flow_nic_dev *ndev, void *db_handle,
enum hw_db_idx_type type, struct hw_db_idx *idxs, uint32_t size);
-void hw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct hw_db_idx *idxs,
+void nthw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struct hw_db_idx *idxs,
uint32_t size, FILE *file);
-void hw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *file);
+void nthw_db_inline_dump_cfn(struct flow_nic_dev *ndev, void *db_handle, FILE *file);
/**/
struct hw_db_match_set_idx
-hw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
+nthw_db_inline_match_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_match_set_data *data);
struct hw_db_action_set_idx
-hw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
+nthw_db_inline_action_set_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_action_set_data *data);
/**/
-struct hw_db_cot_idx hw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_cot_idx nthw_db_inline_cot_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cot_data *data);
-struct hw_db_qsl_idx hw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_qsl_idx nthw_db_inline_qsl_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_qsl_data *data);
-struct hw_db_slc_lr_idx hw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_slc_lr_idx nthw_db_inline_slc_lr_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_slc_lr_data *data);
-struct hw_db_tpe_idx hw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_tpe_idx nthw_db_inline_tpe_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_data *data);
-struct hw_db_tpe_ext_idx hw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_tpe_ext_idx nthw_db_inline_tpe_ext_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_tpe_ext_data *data);
-struct hw_db_hsh_idx hw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_hsh_idx nthw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_hsh_data *data);
/**/
-struct hw_db_cat_idx hw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_cat_idx nthw_db_inline_cat_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_cat_data *data);
/**/
-struct hw_db_km_idx hw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_km_idx nthw_db_inline_km_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_rcp_data *data);
-struct hw_db_km_ft hw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_km_ft nthw_db_inline_km_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_km_ft_data *data);
/**/
-struct hw_db_flm_idx hw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_idx nthw_db_inline_flm_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_rcp_data *data, int group);
-struct hw_db_flm_ft hw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_ft nthw_db_inline_flm_ft_default(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data);
-struct hw_db_flm_ft hw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_ft nthw_db_inline_flm_ft_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_flm_ft_data *data);
-struct hw_db_flm_scrub_idx hw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
+struct hw_db_flm_scrub_idx nthw_db_inline_scrub_add(struct flow_nic_dev *ndev, void *db_handle,
const struct hw_db_inline_scrub_data *data);
-int hw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id, uint32_t ft,
+int nthw_db_inline_setup_mbr_filter(struct flow_nic_dev *ndev, uint32_t cat_hw_id, uint32_t ft,
uint32_t qsl_hw_id);
#endif /* _FLOW_API_HW_DB_INLINE_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 2291642ca9..71b9bcd3d7 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
@@ -94,7 +94,7 @@ static void *flm_lrn_queue_arr;
static int flow_mtr_supported(struct flow_eth_dev *dev)
{
- return hw_mod_flm_present(&dev->ndev->be) && dev->ndev->be.flm.nb_variant == 2;
+ return nthw_mod_flm_present(&dev->ndev->be) && dev->ndev->be.flm.nb_variant == 2;
}
static uint64_t flow_mtr_meter_policy_n_max(void)
@@ -401,7 +401,7 @@ static uint32_t flm_lrn_update(struct flow_eth_dev *dev, uint32_t *inf_word_cnt,
uint32_t handled_records = 0;
if (r.num) {
- if (hw_mod_flm_lrn_data_set_flush(&dev->ndev->be, HW_FLM_FLOW_LRN_DATA, r.p,
+ if (nthw_mod_flm_lrn_data_set_flush(&dev->ndev->be, HW_FLM_FLOW_LRN_DATA, r.p,
r.num, &handled_records, inf_word_cnt, sta_word_cnt))
NT_LOG(ERR, FILTER, "Flow programming failed");
}
@@ -546,7 +546,7 @@ static uint32_t flm_update(struct flow_eth_dev *dev)
if (sta_records > MAX_STA_DATA_RECORDS_PER_READ)
sta_records = MAX_STA_DATA_RECORDS_PER_READ;
- hw_mod_flm_inf_sta_data_update_get(&dev->ndev->be, HW_FLM_FLOW_INF_STA_DATA,
+ nthw_mod_flm_inf_sta_data_update_get(&dev->ndev->be, HW_FLM_FLOW_INF_STA_DATA,
inf_data, inf_records * WORDS_PER_INF_DATA,
&inf_word_cnt, sta_data,
sta_records * WORDS_PER_STA_DATA,
@@ -564,9 +564,9 @@ static uint32_t flm_update(struct flow_eth_dev *dev)
if (flm_lrn_update(dev, &inf_word_cnt, &sta_word_cnt) != 0)
return 1;
- hw_mod_flm_buf_ctrl_update(&dev->ndev->be);
- hw_mod_flm_buf_ctrl_get(&dev->ndev->be, HW_FLM_BUF_CTRL_INF_AVAIL, &inf_word_cnt);
- hw_mod_flm_buf_ctrl_get(&dev->ndev->be, HW_FLM_BUF_CTRL_STA_AVAIL, &sta_word_cnt);
+ nthw_mod_flm_buf_ctrl_update(&dev->ndev->be);
+ nthw_mod_flm_buf_ctrl_get(&dev->ndev->be, HW_FLM_BUF_CTRL_INF_AVAIL, &inf_word_cnt);
+ nthw_mod_flm_buf_ctrl_get(&dev->ndev->be, HW_FLM_BUF_CTRL_STA_AVAIL, &sta_word_cnt);
return inf_word_cnt + sta_word_cnt;
}
@@ -626,15 +626,15 @@ static int flm_sdram_calibrate(struct flow_nic_dev *ndev)
uint32_t fail_value = 0;
uint32_t value = 0;
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_PRESET_ALL, 0x0);
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_SPLIT_SDRAM_USAGE, 0x10);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_PRESET_ALL, 0x0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_SPLIT_SDRAM_USAGE, 0x10);
+ nthw_mod_flm_control_flush(&ndev->be);
/* Wait for ddr4 calibration/init done */
for (uint32_t i = 0; i < 1000000; ++i) {
- hw_mod_flm_status_update(&ndev->be);
- hw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_CALIB_SUCCESS, &value);
- hw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_CALIB_FAIL, &fail_value);
+ nthw_mod_flm_status_update(&ndev->be);
+ nthw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_CALIB_SUCCESS, &value);
+ nthw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_CALIB_FAIL, &fail_value);
if (value & 0x80000000) {
success = 1;
@@ -666,19 +666,19 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
* Make sure no lookup is performed during init, i.e.
* disable every category and disable FLM
*/
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_ENABLE, 0x0);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_ENABLE, 0x0);
+ nthw_mod_flm_control_flush(&ndev->be);
for (uint32_t i = 1; i < ndev->be.flm.nb_categories; ++i)
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, i, 0x0);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, i, 0x0);
- hw_mod_flm_rcp_flush(&ndev->be, 1, ndev->be.flm.nb_categories - 1);
+ nthw_mod_flm_rcp_flush(&ndev->be, 1, ndev->be.flm.nb_categories - 1);
/* Wait for FLM to enter Idle state */
for (uint32_t i = 0; i < 1000000; ++i) {
uint32_t value = 0;
- hw_mod_flm_status_update(&ndev->be);
- hw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_IDLE, &value);
+ nthw_mod_flm_status_update(&ndev->be);
+ nthw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_IDLE, &value);
if (value) {
success = 1;
@@ -696,13 +696,13 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
success = 0;
/* Start SDRAM initialization */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_INIT, 0x1);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_INIT, 0x1);
+ nthw_mod_flm_control_flush(&ndev->be);
for (uint32_t i = 0; i < 1000000; ++i) {
uint32_t value = 0;
- hw_mod_flm_status_update(&ndev->be);
- hw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_INITDONE, &value);
+ nthw_mod_flm_status_update(&ndev->be);
+ nthw_mod_flm_status_get(&ndev->be, HW_FLM_STATUS_INITDONE, &value);
if (value) {
success = 1;
@@ -719,12 +719,12 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
}
/* Set the INIT value back to zero to clear the bit in the SW register cache */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_INIT, 0x0);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_INIT, 0x0);
+ nthw_mod_flm_control_flush(&ndev->be);
/* Enable FLM */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_ENABLE, enable);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_ENABLE, enable);
+ nthw_mod_flm_control_flush(&ndev->be);
int nb_rpp_per_ps = ndev->be.flm.nb_rpp_clock_in_ps;
int nb_load_aps_max = ndev->be.flm.nb_load_aps_max;
@@ -735,8 +735,8 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
(nb_load_aps_max * NTNIC_SCANNER_LOAD);
}
- hw_mod_flm_scan_set(&ndev->be, HW_FLM_SCAN_I, scan_i_value);
- hw_mod_flm_scan_flush(&ndev->be);
+ nthw_mod_flm_scan_set(&ndev->be, HW_FLM_SCAN_I, scan_i_value);
+ nthw_mod_flm_scan_flush(&ndev->be);
return 0;
}
@@ -1666,11 +1666,11 @@ static int interpret_flow_actions(const struct flow_eth_dev *dev,
memcpy_mask_if(&age_tmp, action[aidx].conf,
action_mask ? action_mask[aidx].conf : NULL,
sizeof(struct rte_flow_action_age));
- fd->age.timeout = hw_mod_flm_scrub_timeout_encode(age->timeout);
+ fd->age.timeout = nthw_mod_flm_scrub_timeout_encode(age->timeout);
fd->age.context = age->context;
NT_LOG(DBG, FILTER,
"normalized timeout: %u, original timeout: %u, context: %p",
- hw_mod_flm_scrub_timeout_decode(fd->age.timeout),
+ nthw_mod_flm_scrub_timeout_decode(fd->age.timeout),
age->timeout, fd->age.context);
}
@@ -3271,7 +3271,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
.frag_rcp = empty_pattern ? fd->flm_mtu_fragmentation_recipe : 0,
};
struct hw_db_cot_idx cot_idx =
- hw_db_inline_cot_add(dev->ndev, dev->ndev->hw_db_handle, &cot_data);
+ nthw_db_inline_cot_add(dev->ndev, dev->ndev->hw_db_handle, &cot_data);
local_idxs[(*local_idx_counter)++] = cot_idx.raw;
if (cot_idx.error) {
@@ -3282,7 +3282,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
/* Finalize QSL */
struct hw_db_qsl_idx qsl_idx =
- hw_db_inline_qsl_add(dev->ndev, dev->ndev->hw_db_handle, qsl_data);
+ nthw_db_inline_qsl_add(dev->ndev, dev->ndev->hw_db_handle, qsl_data);
local_idxs[(*local_idx_counter)++] = qsl_idx.raw;
if (qsl_idx.error) {
@@ -3293,7 +3293,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
/* Setup HSH */
struct hw_db_hsh_idx hsh_idx =
- hw_db_inline_hsh_add(dev->ndev, dev->ndev->hw_db_handle, hsh_data);
+ nthw_db_inline_hsh_add(dev->ndev, dev->ndev->hw_db_handle, hsh_data);
local_idxs[(*local_idx_counter)++] = hsh_idx.raw;
if (hsh_idx.error) {
@@ -3312,7 +3312,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
.head_slice_ofs = fd->header_strip_end_ofs,
};
slc_lr_idx =
- hw_db_inline_slc_lr_add(dev->ndev, dev->ndev->hw_db_handle, &slc_lr_data);
+ nthw_db_inline_slc_lr_add(dev->ndev, dev->ndev->hw_db_handle, &slc_lr_data);
local_idxs[(*local_idx_counter)++] = slc_lr_idx.raw;
if (slc_lr_idx.error) {
@@ -3334,7 +3334,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
memcpy(tpe_ext_data.hdr8, fd->tun_hdr.d.hdr8, (fd->tun_hdr.len + 15) & ~15);
struct hw_db_tpe_ext_idx tpe_ext_idx =
- hw_db_inline_tpe_ext_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_tpe_ext_add(dev->ndev, dev->ndev->hw_db_handle,
&tpe_ext_data);
local_idxs[(*local_idx_counter)++] = tpe_ext_idx.raw;
@@ -3398,7 +3398,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
}
struct hw_db_tpe_idx tpe_idx =
- hw_db_inline_tpe_add(dev->ndev, dev->ndev->hw_db_handle, &tpe_data);
+ nthw_db_inline_tpe_add(dev->ndev, dev->ndev->hw_db_handle, &tpe_data);
local_idxs[(*local_idx_counter)++] = tpe_idx.raw;
@@ -3411,7 +3411,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
/* Setup SCRUB profile */
struct hw_db_inline_scrub_data scrub_data = { .timeout = fd->age.timeout };
struct hw_db_flm_scrub_idx scrub_idx =
- hw_db_inline_scrub_add(dev->ndev, dev->ndev->hw_db_handle, &scrub_data);
+ nthw_db_inline_scrub_add(dev->ndev, dev->ndev->hw_db_handle, &scrub_data);
local_idxs[(*local_idx_counter)++] = scrub_idx.raw;
if (scrub_idx.error) {
@@ -3434,7 +3434,7 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
.scrub = scrub_idx,
};
struct hw_db_action_set_idx action_set_idx =
- hw_db_inline_action_set_add(dev->ndev, dev->ndev->hw_db_handle, &action_set_data);
+ nthw_db_inline_action_set_add(dev->ndev, dev->ndev->hw_db_handle, &action_set_data);
local_idxs[(*local_idx_counter)++] = action_set_idx.raw;
if (action_set_idx.error) {
@@ -3450,8 +3450,8 @@ static int setup_flow_flm_actions(struct flow_eth_dev *dev,
.action_set = action_set_idx,
};
struct hw_db_flm_ft flm_ft_idx = empty_pattern
- ? hw_db_inline_flm_ft_default(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data)
- : hw_db_inline_flm_ft_add(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data);
+ ? nthw_db_inline_flm_ft_default(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data)
+ : nthw_db_inline_flm_ft_add(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data);
local_idxs[(*local_idx_counter)++] = flm_ft_idx.raw;
if (flm_ft_idx.error) {
@@ -3527,7 +3527,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
};
memcpy(flm_data.mask, packet_mask, sizeof(uint32_t) * 10);
struct hw_db_flm_idx flm_idx =
- hw_db_inline_flm_add(dev->ndev, dev->ndev->hw_db_handle, &flm_data,
+ nthw_db_inline_flm_add(dev->ndev, dev->ndev->hw_db_handle, &flm_data,
attr->group);
fh->db_idxs[fh->db_idx_counter++] = flm_idx.raw;
@@ -3601,7 +3601,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
.frag_rcp = fd->flm_mtu_fragmentation_recipe,
};
struct hw_db_cot_idx cot_idx =
- hw_db_inline_cot_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_cot_add(dev->ndev, dev->ndev->hw_db_handle,
&cot_data);
fh->db_idxs[fh->db_idx_counter++] = cot_idx.raw;
action_set_data.cot = cot_idx;
@@ -3614,7 +3614,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
/* Finalize QSL */
struct hw_db_qsl_idx qsl_idx =
- hw_db_inline_qsl_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_qsl_add(dev->ndev, dev->ndev->hw_db_handle,
&qsl_data);
fh->db_idxs[fh->db_idx_counter++] = qsl_idx.raw;
action_set_data.qsl = qsl_idx;
@@ -3627,7 +3627,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
/* Setup HSH */
struct hw_db_hsh_idx hsh_idx =
- hw_db_inline_hsh_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_hsh_add(dev->ndev, dev->ndev->hw_db_handle,
&hsh_data);
fh->db_idxs[fh->db_idx_counter++] = hsh_idx.raw;
action_set_data.hsh = hsh_idx;
@@ -3650,7 +3650,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
.ttl_ofs = fd->ttl_sub_ipv4 ? 8 : 7,
};
struct hw_db_tpe_idx tpe_idx =
- hw_db_inline_tpe_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_tpe_add(dev->ndev, dev->ndev->hw_db_handle,
&tpe_data);
fh->db_idxs[fh->db_idx_counter++] = tpe_idx.raw;
action_set_data.tpe = tpe_idx;
@@ -3665,7 +3665,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
}
struct hw_db_action_set_idx action_set_idx =
- hw_db_inline_action_set_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_action_set_add(dev->ndev, dev->ndev->hw_db_handle,
&action_set_data);
fh->db_idxs[fh->db_idx_counter++] = action_set_idx.raw;
@@ -3698,7 +3698,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
.ip_prot_tunnel = fd->tunnel_ip_prot,
};
struct hw_db_cat_idx cat_idx =
- hw_db_inline_cat_add(dev->ndev, dev->ndev->hw_db_handle, &cat_data);
+ nthw_db_inline_cat_add(dev->ndev, dev->ndev->hw_db_handle, &cat_data);
fh->db_idxs[fh->db_idx_counter++] = cat_idx.raw;
if (cat_idx.error) {
@@ -3748,7 +3748,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
if (found_flow != NULL) {
/* Reuse existing KM RCP */
const struct hw_db_inline_km_rcp_data *other_km_rcp_data =
- hw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
HW_DB_IDX_TYPE_KM_RCP,
(struct hw_db_idx *)
found_flow->flm_db_idxs,
@@ -3784,7 +3784,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
}
struct hw_db_km_idx km_idx =
- hw_db_inline_km_add(dev->ndev, dev->ndev->hw_db_handle, &km_rcp_data);
+ nthw_db_inline_km_add(dev->ndev, dev->ndev->hw_db_handle, &km_rcp_data);
fh->db_idxs[fh->db_idx_counter++] = km_idx.raw;
@@ -3801,7 +3801,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
.action_set = action_set_idx,
};
struct hw_db_km_ft km_ft_idx =
- hw_db_inline_km_ft_add(dev->ndev, dev->ndev->hw_db_handle, &km_ft_data);
+ nthw_db_inline_km_ft_add(dev->ndev, dev->ndev->hw_db_handle, &km_ft_data);
fh->db_idxs[fh->db_idx_counter++] = km_ft_idx.raw;
if (km_ft_idx.error) {
@@ -3823,14 +3823,14 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
if (fd->km.target == KM_CAM) {
uint32_t ft_a_mask = 0;
- hw_mod_km_rcp_get(&dev->ndev->be, HW_KM_RCP_FTM_A,
+ nthw_mod_km_rcp_get(&dev->ndev->be, HW_KM_RCP_FTM_A,
(int)km_rcp_data.rcp, 0, &ft_a_mask);
- hw_mod_km_rcp_set(&dev->ndev->be, HW_KM_RCP_FTM_A,
+ nthw_mod_km_rcp_set(&dev->ndev->be, HW_KM_RCP_FTM_A,
(int)km_rcp_data.rcp, 0,
ft_a_mask | (1 << fd->km.flow_type));
}
- hw_mod_km_rcp_flush(&dev->ndev->be, (int)km_rcp_data.rcp, 1);
+ nthw_mod_km_rcp_flush(&dev->ndev->be, (int)km_rcp_data.rcp, 1);
km_write_data_match_entry(&fd->km, 0);
}
@@ -3845,7 +3845,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
.priority = attr->priority & 0xff,
};
struct hw_db_match_set_idx match_set_idx =
- hw_db_inline_match_set_add(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_match_set_add(dev->ndev, dev->ndev->hw_db_handle,
&match_set_data);
fh->db_idxs[fh->db_idx_counter++] = match_set_idx.raw;
@@ -3863,7 +3863,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
};
struct hw_db_flm_ft flm_ft_idx =
- hw_db_inline_flm_ft_add(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data);
+ nthw_db_inline_flm_ft_add(dev->ndev, dev->ndev->hw_db_handle, &flm_ft_data);
fh->db_idxs[fh->db_idx_counter++] = flm_ft_idx.raw;
if (flm_ft_idx.error) {
@@ -3880,12 +3880,12 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
error_out:
if (fh->type == FLOW_HANDLE_TYPE_FLM) {
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)fh->flm_db_idxs,
fh->flm_db_idx_counter);
} else {
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)fh->db_idxs, fh->db_idx_counter);
}
@@ -3915,25 +3915,25 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
flow_nic_mark_resource_used(ndev, RES_FLM_RCP, 0);
/* COT is locked to CFN. Don't set color for CFN 0 */
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, 0, 0);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, 0, 0);
- if (hw_mod_cat_cot_flush(&ndev->be, 0, 1) < 0)
+ if (nthw_mod_cat_cot_flush(&ndev->be, 0, 1) < 0)
goto err_exit0;
/* Initialize QSL with unmatched recipe index 0 - discard */
- if (hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DISCARD, 0, 0x1) < 0)
+ if (nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_DISCARD, 0, 0x1) < 0)
goto err_exit0;
- if (hw_mod_qsl_rcp_flush(&ndev->be, 0, 1) < 0)
+ if (nthw_mod_qsl_rcp_flush(&ndev->be, 0, 1) < 0)
goto err_exit0;
flow_nic_mark_resource_used(ndev, RES_QSL_RCP, 0);
/* Initialize QST with default index 0 */
- if (hw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL, 0, 0x0) < 0)
+ if (nthw_mod_qsl_qst_set(&ndev->be, HW_QSL_QST_PRESET_ALL, 0, 0x0) < 0)
goto err_exit0;
- if (hw_mod_qsl_qst_flush(&ndev->be, 0, 1) < 0)
+ if (nthw_mod_qsl_qst_flush(&ndev->be, 0, 1) < 0)
goto err_exit0;
flow_nic_mark_resource_used(ndev, RES_QSL_QST, 0);
@@ -3946,13 +3946,13 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
/* PDB setup Direct Virtio Scatter-Gather descriptor of 12 bytes for its recipe 0
*/
- if (hw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_DESCRIPTOR, 0, 7) < 0)
+ if (nthw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_DESCRIPTOR, 0, 7) < 0)
goto err_exit0;
- if (hw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_DESC_LEN, 0, 6) < 0)
+ if (nthw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_DESC_LEN, 0, 6) < 0)
goto err_exit0;
- if (hw_mod_pdb_rcp_flush(&ndev->be, 0, 1) < 0)
+ if (nthw_mod_pdb_rcp_flush(&ndev->be, 0, 1) < 0)
goto err_exit0;
flow_nic_mark_resource_used(ndev, RES_PDB_RCP, 0);
@@ -3967,15 +3967,15 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
.algorithm = 0,
};
hsh_set(ndev, 0, hsh_5_tuple);
- hw_mod_hsh_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_hsh_rcp_flush(&ndev->be, 0, 1);
flow_nic_mark_resource_used(ndev, RES_HSH_RCP, 0);
/* Initialize SCRUB with default index 0, i.e. flow will never AGE-out */
- if (hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_PRESET_ALL, 0, 0) < 0)
+ if (nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_PRESET_ALL, 0, 0) < 0)
goto err_exit0;
- if (hw_mod_flm_scrub_flush(&ndev->be, 0, 1) < 0)
+ if (nthw_mod_flm_scrub_flush(&ndev->be, 0, 1) < 0)
goto err_exit0;
flow_nic_mark_resource_used(ndev, RES_SCRUB_RCP, 0);
@@ -3984,7 +3984,7 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
flow_nic_mark_resource_used(ndev, RES_CAT_CFN, NT_VIOLATING_MBR_CFN);
flow_nic_mark_resource_used(ndev, RES_QSL_RCP, NT_VIOLATING_MBR_QSL);
- if (hw_db_inline_setup_mbr_filter(ndev, NT_VIOLATING_MBR_CFN,
+ if (nthw_db_inline_setup_mbr_filter(ndev, NT_VIOLATING_MBR_CFN,
NT_FLM_VIOLATING_MBR_FLOW_TYPE,
NT_VIOLATING_MBR_QSL) < 0)
goto err_exit0;
@@ -3997,54 +3997,54 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
goto err_exit0;
/* Learn done status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LDS, 0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LDS, 0);
/* Learn fail status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LFS, 1);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LFS, 1);
/* Learn ignore status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LIS, 1);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_LIS, 1);
/* Unlearn done status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_UDS, 0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_UDS, 0);
/* Unlearn ignore status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_UIS, 0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_UIS, 0);
/* Relearn done status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RDS, 0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RDS, 0);
/* Relearn ignore status */
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RIS, 0);
- hw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RBL, 4);
- hw_mod_flm_control_flush(&ndev->be);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RIS, 0);
+ nthw_mod_flm_control_set(&ndev->be, HW_FLM_CONTROL_RBL, 4);
+ nthw_mod_flm_control_flush(&ndev->be);
/* Set the sliding windows size for flm load */
uint32_t bin = (uint32_t)(((FLM_LOAD_WINDOWS_SIZE * 1000000000000ULL) /
(32ULL * ndev->be.flm.nb_rpp_clock_in_ps)) -
1ULL);
- hw_mod_flm_load_bin_set(&ndev->be, HW_FLM_LOAD_BIN, bin);
- hw_mod_flm_load_bin_flush(&ndev->be);
+ nthw_mod_flm_load_bin_set(&ndev->be, HW_FLM_LOAD_BIN, bin);
+ nthw_mod_flm_load_bin_flush(&ndev->be);
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT0,
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT0,
0); /* Drop at 100% FIFO fill level */
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT0, 1);
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT1,
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT0, 1);
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT1,
14); /* Drop at 87,5% FIFO fill level */
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT1, 1);
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT2,
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT1, 1);
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT2,
10); /* Drop at 62,5% FIFO fill level */
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT2, 1);
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT3,
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT2, 1);
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_LIMIT3,
6); /* Drop at 37,5% FIFO fill level */
- hw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT3, 1);
- hw_mod_flm_prio_flush(&ndev->be);
+ nthw_mod_flm_prio_set(&ndev->be, HW_FLM_PRIO_FT3, 1);
+ nthw_mod_flm_prio_flush(&ndev->be);
/* TODO How to set and use these limits */
for (uint32_t i = 0; i < ndev->be.flm.nb_pst_profiles; ++i) {
- hw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_BP, i,
+ nthw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_BP, i,
NTNIC_FLOW_PERIODIC_STATS_BYTE_LIMIT);
- hw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_PP, i,
+ nthw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_PP, i,
NTNIC_FLOW_PERIODIC_STATS_PKT_LIMIT);
- hw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_TP, i,
+ nthw_mod_flm_pst_set(&ndev->be, HW_FLM_PST_TP, i,
NTNIC_FLOW_PERIODIC_STATS_BYTE_TIMEOUT);
}
- hw_mod_flm_pst_flush(&ndev->be, 0, ALL_ENTRIES);
+ nthw_mod_flm_pst_flush(&ndev->be, 0, ALL_ENTRIES);
ndev->id_table_handle = ntnic_id_table_create();
@@ -4077,7 +4077,7 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
if (nthw_flow_group_handle_create(&ndev->group_handle, ndev->be.flm.nb_categories))
goto err_exit0;
- if (hw_db_inline_create(ndev, &ndev->hw_db_handle))
+ if (nthw_db_inline_create(ndev, &ndev->hw_db_handle))
goto err_exit0;
ndev->flow_mgnt_prepared = 1;
@@ -4102,8 +4102,8 @@ int done_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
nthw_flow_nic_free_resource(ndev, RES_KM_FLOW_TYPE, 0);
nthw_flow_nic_free_resource(ndev, RES_KM_CATEGORY, 0);
- hw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, 0, 0);
- hw_mod_flm_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_flm_rcp_set(&ndev->be, HW_FLM_RCP_PRESET_ALL, 0, 0);
+ nthw_mod_flm_rcp_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_FLM_FLOW_TYPE, 0);
nthw_flow_nic_free_resource(ndev, RES_FLM_FLOW_TYPE, 1);
nthw_flow_nic_free_resource(ndev, RES_FLM_RCP, 0);
@@ -4123,38 +4123,38 @@ int done_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
nthw_flow_group_handle_destroy(&ndev->group_handle);
ntnic_id_table_destroy(ndev->id_table_handle);
- hw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PRESET_ALL, 0, 0, 0);
- hw_mod_cat_cfn_flush(&ndev->be, 0, 1);
- hw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, 0, 0);
- hw_mod_cat_cot_flush(&ndev->be, 0, 1);
+ nthw_mod_cat_cfn_set(&ndev->be, HW_CAT_CFN_PRESET_ALL, 0, 0, 0);
+ nthw_mod_cat_cfn_flush(&ndev->be, 0, 1);
+ nthw_mod_cat_cot_set(&ndev->be, HW_CAT_COT_PRESET_ALL, 0, 0);
+ nthw_mod_cat_cot_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_CAT_CFN, 0);
- hw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, 0, 0);
- hw_mod_qsl_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_qsl_rcp_set(&ndev->be, HW_QSL_RCP_PRESET_ALL, 0, 0);
+ nthw_mod_qsl_rcp_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_QSL_RCP, 0);
- hw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_PRESET_ALL, 0, 0);
- hw_mod_slc_lr_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_slc_lr_rcp_set(&ndev->be, HW_SLC_LR_RCP_PRESET_ALL, 0, 0);
+ nthw_mod_slc_lr_rcp_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_SLC_LR_RCP, 0);
- hw_mod_tpe_reset(&ndev->be);
+ nthw_mod_tpe_reset(&ndev->be);
nthw_flow_nic_free_resource(ndev, RES_TPE_RCP, 0);
nthw_flow_nic_free_resource(ndev, RES_TPE_EXT, 0);
nthw_flow_nic_free_resource(ndev, RES_TPE_RPL, 0);
- hw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_PRESET_ALL, 0, 0);
- hw_mod_pdb_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_pdb_rcp_set(&ndev->be, HW_PDB_RCP_PRESET_ALL, 0, 0);
+ nthw_mod_pdb_rcp_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_PDB_RCP, 0);
- hw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, 0, 0, 0);
- hw_mod_hsh_rcp_flush(&ndev->be, 0, 1);
+ nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, 0, 0, 0);
+ nthw_mod_hsh_rcp_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_HSH_RCP, 0);
- hw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_PRESET_ALL, 0, 0);
- hw_mod_flm_scrub_flush(&ndev->be, 0, 1);
+ nthw_mod_flm_scrub_set(&ndev->be, HW_FLM_SCRUB_PRESET_ALL, 0, 0);
+ nthw_mod_flm_scrub_flush(&ndev->be, 0, 1);
nthw_flow_nic_free_resource(ndev, RES_SCRUB_RCP, 0);
- hw_db_inline_destroy(ndev->hw_db_handle);
+ nthw_db_inline_destroy(ndev->hw_db_handle);
#ifdef FLOW_DEBUG
ndev->be.iface->set_debug_mode(ndev->be.be_dev, FLOW_BACKEND_DEBUG_MODE_NONE);
@@ -4288,7 +4288,7 @@ int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
NT_LOG(DBG, FILTER, "removing flow :%p", fh);
if (fh->type == FLOW_HANDLE_TYPE_FLM) {
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)fh->flm_db_idxs,
fh->flm_db_idx_counter);
@@ -4301,7 +4301,7 @@ int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
km_clear_data_match_entry(&fh->fd->km);
const struct hw_db_inline_km_rcp_data *other_km_rcp_data =
- hw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
HW_DB_IDX_TYPE_KM_RCP,
(struct hw_db_idx *)fh->flm_db_idxs,
fh->flm_db_idx_counter);
@@ -4309,14 +4309,14 @@ int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
if (other_km_rcp_data != NULL &&
nthw_flow_nic_deref_resource(dev->ndev, RES_KM_CATEGORY,
(int)other_km_rcp_data->rcp) == 0) {
- hw_mod_km_rcp_set(&dev->ndev->be, HW_KM_RCP_PRESET_ALL,
+ nthw_mod_km_rcp_set(&dev->ndev->be, HW_KM_RCP_PRESET_ALL,
(int)other_km_rcp_data->rcp, 0, 0);
- hw_mod_km_rcp_flush(&dev->ndev->be, (int)other_km_rcp_data->rcp,
+ nthw_mod_km_rcp_flush(&dev->ndev->be, (int)other_km_rcp_data->rcp,
1);
}
}
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)fh->db_idxs, fh->db_idx_counter);
free(fh->fd);
fh->fd = NULL;
@@ -4453,7 +4453,7 @@ int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
/* Setup FLM RCP */
const struct hw_db_inline_flm_rcp_data *flm_data =
- hw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
HW_DB_IDX_TYPE_FLM_RCP,
(struct hw_db_idx *)flow->flm_db_idxs,
flow->flm_db_idx_counter);
@@ -4465,7 +4465,7 @@ int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
}
struct hw_db_flm_idx flm_idx =
- hw_db_inline_flm_add(dev->ndev, dev->ndev->hw_db_handle, flm_data, group);
+ nthw_db_inline_flm_add(dev->ndev, dev->ndev->hw_db_handle, flm_data, group);
local_idxs[local_idx_counter++] = flm_idx.raw;
@@ -4530,7 +4530,7 @@ int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
/* Program flow */
flm_flow_programming(flow, NT_FLM_OP_RELEARN);
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)flow->flm_db_idxs,
flow->flm_db_idx_counter);
memset(flow->flm_db_idxs, 0x0, sizeof(struct hw_db_idx) * RES_COUNT);
@@ -4547,7 +4547,8 @@ int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
return 0;
error_out:
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle, (struct hw_db_idx *)local_idxs,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ (struct hw_db_idx *)local_idxs,
local_idx_counter);
rte_spinlock_unlock(&dev->ndev->mtx);
@@ -4630,7 +4631,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
(int)flow->caller_id);
fprintf(file, " FLM_DATA:\n");
dump_flm_data(flow->flm_data, file);
- hw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)flow->flm_db_idxs,
flow->flm_db_idx_counter, file);
fprintf(file, " Context: %p\n", flow->context);
@@ -4638,7 +4639,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
} else {
fprintf(file, "Port %d, caller %d, flow type FLOW\n", (int)dev->port_id,
(int)flow->caller_id);
- hw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)flow->db_idxs, flow->db_idx_counter,
file);
}
@@ -4646,7 +4647,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
} else {
int max_flm_count = 1000;
- hw_db_inline_dump_cfn(dev->ndev, dev->ndev->hw_db_handle, file);
+ nthw_db_inline_dump_cfn(dev->ndev, dev->ndev->hw_db_handle, file);
flow = dev->ndev->flow_base;
@@ -4654,7 +4655,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
if (flow->caller_id == caller_id) {
fprintf(file, "Port %d, caller %d, flow type FLOW\n",
(int)dev->port_id, (int)flow->caller_id);
- hw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)flow->db_idxs,
flow->db_idx_counter, file);
}
@@ -4670,7 +4671,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
(int)dev->port_id, (int)flow->caller_id);
fprintf(file, " FLM_DATA:\n");
dump_flm_data(flow->flm_data, file);
- hw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_dump(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)flow->flm_db_idxs,
flow->flm_db_idx_counter, file);
fprintf(file, " Context: %p\n", flow->context);
@@ -4711,11 +4712,11 @@ int flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
if (size < fields_cnt)
return -1;
- hw_mod_flm_stat_update(&ndev->be);
+ nthw_mod_flm_stat_update(&ndev->be);
for (uint64_t i = 0; i < fields_cnt; ++i) {
uint32_t value = 0;
- hw_mod_flm_stat_get(&ndev->be, fields[i], &value);
+ nthw_mod_flm_stat_get(&ndev->be, fields[i], &value);
data[i] = (fields[i] == HW_FLM_STAT_FLOWS || fields[i] == HW_FLM_LOAD_LPS ||
fields[i] == HW_FLM_LOAD_APS)
? value
@@ -4732,13 +4733,13 @@ int flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
uint8_t port_count)
{
/* IFR RCP 0 is reserved, port counters start from record 1 */
- hw_mod_tpe_ifr_counters_update(&ndev->be, 1, port_count);
+ nthw_mod_tpe_ifr_counters_update(&ndev->be, 1, port_count);
uint8_t i = 0;
for (i = 0; i < port_count; ++i) {
uint8_t ifr_mtu_recipe = convert_port_to_ifr_mtu_recipe(i);
uint32_t drop_cnt = 0;
- hw_mod_tpe_ifr_counters_get(&ndev->be, HW_TPE_IFR_COUNTERS_DROP, ifr_mtu_recipe,
+ nthw_mod_tpe_ifr_counters_get(&ndev->be, HW_TPE_IFR_COUNTERS_DROP, ifr_mtu_recipe,
&drop_cnt);
data[i] = data[i] + drop_cnt;
}
@@ -4779,29 +4780,29 @@ int flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu)
uint8_t ifr_mtu_recipe = convert_port_to_ifr_mtu_recipe(port);
struct flow_nic_dev *ndev = dev->ndev;
- err |= hw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_EN, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_EN, ifr_mtu_recipe,
ipv4_en_frag);
- err |= hw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_EN, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_EN, ifr_mtu_recipe,
ipv6_en_frag);
- err |= hw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_MTU, ifr_mtu_recipe, mtu);
- err |= hw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_DF_DROP, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_MTU, ifr_mtu_recipe, mtu);
+ err |= nthw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_DF_DROP, ifr_mtu_recipe,
ipv4_action);
- err |= hw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_DROP, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_rpp_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_DROP, ifr_mtu_recipe,
ipv6_action);
- err |= hw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_EN, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_EN, ifr_mtu_recipe,
ipv4_en_frag);
- err |= hw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_EN, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_EN, ifr_mtu_recipe,
ipv6_en_frag);
- err |= hw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_MTU, ifr_mtu_recipe, mtu);
- err |= hw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_DF_DROP, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_MTU, ifr_mtu_recipe, mtu);
+ err |= nthw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV4_DF_DROP, ifr_mtu_recipe,
ipv4_action);
- err |= hw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_DROP, ifr_mtu_recipe,
+ err |= nthw_mod_tpe_ifr_rcp_set(&ndev->be, HW_TPE_IFR_RCP_IPV6_DROP, ifr_mtu_recipe,
ipv6_action);
if (err == 0) {
- err |= hw_mod_tpe_rpp_ifr_rcp_flush(&ndev->be, ifr_mtu_recipe, 1);
- err |= hw_mod_tpe_ifr_rcp_flush(&ndev->be, ifr_mtu_recipe, 1);
+ err |= nthw_mod_tpe_rpp_ifr_rcp_flush(&ndev->be, ifr_mtu_recipe, 1);
+ err |= nthw_mod_tpe_ifr_rcp_flush(&ndev->be, ifr_mtu_recipe, 1);
}
return err;
@@ -5121,7 +5122,7 @@ int flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_template_table_cell *cell = &template_table->pattern_action_pairs[i];
if (cell->flm_db_idx_counter > 0) {
- hw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_deref_idxs(dev->ndev, dev->ndev->hw_db_handle,
(struct hw_db_idx *)cell->flm_db_idxs,
cell->flm_db_idx_counter);
}
@@ -5239,7 +5240,7 @@ struct flow_handle *flow_async_create_profile_inline(struct flow_eth_dev *dev,
rte_spinlock_lock(&dev->ndev->mtx);
struct hw_db_idx *flm_ft_idx =
- hw_db_inline_find_idx(dev->ndev, dev->ndev->hw_db_handle,
+ nthw_db_inline_find_idx(dev->ndev, dev->ndev->hw_db_handle,
HW_DB_IDX_TYPE_FLM_FT,
(struct hw_db_idx *)fh->flm_db_idxs,
fh->flm_db_idx_counter);
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 0f70462f3d..816d5a8430 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -1771,7 +1771,7 @@ static int eth_dev_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_r
int res = hsh_set(ndev, hsh_idx, tmp_rss_conf);
if (res == 0) {
- flow_filter_ops->hw_mod_hsh_rcp_flush(&ndev->be, hsh_idx, 1);
+ flow_filter_ops->nthw_mod_hsh_rcp_flush(&ndev->be, hsh_idx, 1);
rte_memcpy(&ndev->rss_conf, &tmp_rss_conf, sizeof(struct nt_eth_rss_conf));
} else {
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h
index 26efec1c65..2d5bebda2a 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -500,7 +500,7 @@ struct flow_filter_ops {
/*
* Other
*/
- int (*hw_mod_hsh_rcp_flush)(struct flow_api_backend_s *be, int start_idx, int count);
+ int (*nthw_mod_hsh_rcp_flush)(struct flow_api_backend_s *be, int start_idx, int count);
int (*flow_get_aged_flows)(struct flow_eth_dev *dev,
uint16_t caller_id,
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 05/16] net/ntnic: modify prefix flow_ with prefix nthw_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (3 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 04/16] net/ntnic: change prefix hw_ to prefix nthw_ Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 06/16] net/ntnic: change prefix flm_ to prefix nthw_flm_ Serhii Iliushyk
` (10 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change the prefix flow_ with prefix nthw_flow to specify that the flow API
belongs to the Napatech hardware (nthw).
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/nthw/flow_api/flow_api.c | 54 +++++----
.../nthw/flow_api/flow_backend/flow_backend.c | 4 +-
.../profile_inline/flow_api_profile_inline.c | 113 +++++++++---------
.../profile_inline/flow_api_profile_inline.h | 49 ++++----
drivers/net/ntnic/ntnic_ethdev.c | 2 +-
drivers/net/ntnic/ntnic_mod_reg.c | 2 +-
drivers/net/ntnic/ntnic_mod_reg.h | 46 +++----
7 files changed, 141 insertions(+), 129 deletions(-)
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index dd25b51e14..4c7bb4a60a 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -299,7 +299,7 @@ static struct flow_handle *flow_create(struct flow_eth_dev *dev __rte_unused,
return NULL;
}
- return profile_inline_ops->flow_create_profile_inline(dev, attr,
+ return profile_inline_ops->nthw_flow_create_profile_inline(dev, attr,
forced_vlan_vid, caller_id, item, action, error);
}
@@ -313,7 +313,7 @@ static int flow_destroy(struct flow_eth_dev *dev __rte_unused,
return -1;
}
- return profile_inline_ops->flow_destroy_profile_inline(dev, flow, error);
+ return profile_inline_ops->nthw_flow_destroy_profile_inline(dev, flow, error);
}
static int flow_flush(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_flow_error *error)
@@ -325,7 +325,7 @@ static int flow_flush(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_f
return -1;
}
- return profile_inline_ops->flow_flush_profile_inline(dev, caller_id, error);
+ return profile_inline_ops->nthw_flow_flush_profile_inline(dev, caller_id, error);
}
static int flow_actions_update(struct flow_eth_dev *dev,
@@ -340,7 +340,8 @@ static int flow_actions_update(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_actions_update_profile_inline(dev, flow, action, error);
+ return profile_inline_ops->nthw_flow_actions_update_profile_inline(dev,
+ flow, action, error);
}
/*
@@ -405,7 +406,7 @@ static int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
while (flow) {
if (flow->dev == eth_dev) {
struct flow_handle *flow_next = flow->next;
- profile_inline_ops->flow_destroy_locked_profile_inline(eth_dev, flow,
+ profile_inline_ops->nthw_flow_destroy_locked_profile_inline(eth_dev, flow,
NULL);
flow = flow_next;
@@ -471,11 +472,11 @@ static void flow_ndev_reset(struct flow_nic_dev *ndev)
"ERROR : Flows still defined but all eth-ports deleted. Flow %p",
ndev->flow_base);
- profile_inline_ops->flow_destroy_profile_inline(ndev->flow_base->dev,
+ profile_inline_ops->nthw_flow_destroy_profile_inline(ndev->flow_base->dev,
ndev->flow_base, NULL);
}
- profile_inline_ops->done_flow_management_of_ndev_profile_inline(ndev);
+ profile_inline_ops->nthw_done_flow_mgmnt_of_ndev_profile_inline(ndev);
km_free_ndev_resource_management(&ndev->km_res_handle);
kcc_free_ndev_resource_management(&ndev->kcc_res_handle);
@@ -656,7 +657,7 @@ static struct flow_eth_dev *flow_get_eth_dev(uint8_t adapter_no, uint8_t port_no
/* Initialize modules if needed - recipe 0 is used as no-match and must be setup */
if (profile_inline_ops != NULL &&
- profile_inline_ops->initialize_flow_management_of_ndev_profile_inline(ndev))
+ profile_inline_ops->nthw_init_flow_mgmnt_of_ndev_profile_inline(ndev))
goto err_exit0;
} else {
@@ -1021,7 +1022,8 @@ static int flow_dev_dump(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_dev_dump_profile_inline(dev, flow, caller_id, file, error);
+ return profile_inline_ops->nthw_flow_dev_dump_profile_inline(dev,
+ flow, caller_id, file, error);
}
static int flow_get_aged_flows(struct flow_eth_dev *dev,
@@ -1043,7 +1045,7 @@ static int flow_get_aged_flows(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_get_aged_flows_profile_inline(dev, caller_id, context,
+ return profile_inline_ops->nthw_flow_get_aged_flows_profile_inline(dev, caller_id, context,
nb_contexts, error);
}
@@ -1058,7 +1060,7 @@ static int flow_info_get(struct flow_eth_dev *dev, uint8_t caller_id,
return -1;
}
- return profile_inline_ops->flow_info_get_profile_inline(dev, caller_id, port_info,
+ return profile_inline_ops->nthw_flow_info_get_profile_inline(dev, caller_id, port_info,
queue_info, error);
}
@@ -1073,7 +1075,7 @@ static int flow_configure(struct flow_eth_dev *dev, uint8_t caller_id,
return -1;
}
- return profile_inline_ops->flow_configure_profile_inline(dev, caller_id, port_attr,
+ return profile_inline_ops->nthw_flow_configure_profile_inline(dev, caller_id, port_attr,
nb_queue, queue_attr, error);
}
@@ -1093,8 +1095,8 @@ flow_pattern_template_create(struct flow_eth_dev *dev,
return NULL;
}
- return profile_inline_ops->flow_pattern_template_create_profile_inline(dev, template_attr,
- caller_id, pattern, error);
+ return profile_inline_ops->nthw_flow_pattern_template_create_profile_inline(dev,
+ template_attr, caller_id, pattern, error);
}
static int flow_pattern_template_destroy(struct flow_eth_dev *dev,
@@ -1108,7 +1110,7 @@ static int flow_pattern_template_destroy(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_pattern_template_destroy_profile_inline(dev,
+ return profile_inline_ops->nthw_flow_pattern_template_destroy_profile_inline(dev,
pattern_template,
error);
}
@@ -1126,8 +1128,8 @@ flow_actions_template_create(struct flow_eth_dev *dev,
return NULL;
}
- return profile_inline_ops->flow_actions_template_create_profile_inline(dev, template_attr,
- caller_id, actions, masks, error);
+ return profile_inline_ops->nthw_flow_actions_template_create_profile_inline(dev,
+ template_attr, caller_id, actions, masks, error);
}
static int flow_actions_template_destroy(struct flow_eth_dev *dev,
@@ -1141,7 +1143,7 @@ static int flow_actions_template_destroy(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_actions_template_destroy_profile_inline(dev,
+ return profile_inline_ops->nthw_flow_actions_template_destroy_profile_inline(dev,
actions_template,
error);
}
@@ -1159,7 +1161,7 @@ static struct flow_template_table *flow_template_table_create(struct flow_eth_de
return NULL;
}
- return profile_inline_ops->flow_template_table_create_profile_inline(dev, table_attr,
+ return profile_inline_ops->nthw_flow_template_table_create_profile_inline(dev, table_attr,
forced_vlan_vid, caller_id, pattern_templates, nb_pattern_templates,
actions_templates, nb_actions_templates, error);
}
@@ -1175,8 +1177,8 @@ static int flow_template_table_destroy(struct flow_eth_dev *dev,
return -1;
}
- return profile_inline_ops->flow_template_table_destroy_profile_inline(dev, template_table,
- error);
+ return profile_inline_ops->nthw_flow_template_table_destroy_profile_inline(dev,
+ template_table, error);
}
static struct flow_handle *
@@ -1193,7 +1195,7 @@ flow_async_create(struct flow_eth_dev *dev, uint32_t queue_id,
return NULL;
}
- return profile_inline_ops->flow_async_create_profile_inline(dev, queue_id, op_attr,
+ return profile_inline_ops->nthw_flow_async_create_profile_inline(dev, queue_id, op_attr,
template_table, pattern, pattern_template_index, actions,
actions_template_index, user_data, error);
}
@@ -1209,8 +1211,8 @@ static int flow_async_destroy(struct flow_eth_dev *dev, uint32_t queue_id,
return -1;
}
- return profile_inline_ops->flow_async_destroy_profile_inline(dev, queue_id, op_attr, flow,
- user_data, error);
+ return profile_inline_ops->nthw_flow_async_destroy_profile_inline(dev, queue_id,
+ op_attr, flow, user_data, error);
}
int nthw_flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size)
{
@@ -1220,7 +1222,7 @@ int nthw_flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t
return -1;
if (ndev->flow_profile == FLOW_ETH_DEV_PROFILE_INLINE)
- return profile_inline_ops->flow_get_flm_stats_profile_inline(ndev, data, size);
+ return profile_inline_ops->nthw_flow_get_flm_stats_profile_inline(ndev, data, size);
return -1;
}
@@ -1233,7 +1235,7 @@ int nthw_flow_get_ifr_stats(struct flow_nic_dev *ndev, uint64_t *data, uint8_t p
return -1;
if (ndev->flow_profile == FLOW_ETH_DEV_PROFILE_INLINE) {
- return profile_inline_ops->flow_get_ifr_stats_profile_inline(ndev, data,
+ return profile_inline_ops->nthw_flow_get_ifr_stats_profile_inline(ndev, data,
port_count);
}
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
index cb6489b3ac..8144e25540 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
@@ -1972,7 +1972,7 @@ static int free_rx_queue(void *be_dev, int hw_queue)
return 0;
}
-const struct flow_api_backend_ops flow_be_iface = {
+const struct flow_api_backend_ops nthw_flow_be_iface = {
1,
set_debug_mode,
@@ -2248,7 +2248,7 @@ const struct flow_api_backend_ops *nthw_bin_flow_backend_init(nthw_fpga_t *p_fpg
be_devs[physical_adapter_no].adapter_no = physical_adapter_no;
*dev = (void *)&be_devs[physical_adapter_no];
- return &flow_be_iface;
+ return &nthw_flow_be_iface;
}
static void bin_flow_backend_done(void *dev)
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 71b9bcd3d7..32aae24499 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
@@ -3898,7 +3898,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
* Public functions
*/
-int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
+int nthw_init_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev)
{
if (!ndev->flow_mgnt_prepared) {
/* Check static arrays are big enough */
@@ -4086,11 +4086,11 @@ int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
return 0;
err_exit0:
- done_flow_management_of_ndev_profile_inline(ndev);
+ nthw_done_flow_mgmnt_of_ndev_profile_inline(ndev);
return -1;
}
-int done_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
+int nthw_done_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev)
{
#ifdef FLOW_DEBUG
ndev->be.iface->set_debug_mode(ndev->be.be_dev, FLOW_BACKEND_DEBUG_MODE_WRITE);
@@ -4166,7 +4166,7 @@ int done_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev)
return 0;
}
-struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev __rte_unused,
+struct flow_handle *nthw_flow_create_profile_inline(struct flow_eth_dev *dev __rte_unused,
const struct rte_flow_attr *attr __rte_unused,
uint16_t forced_vlan_vid __rte_unused,
uint16_t caller_id __rte_unused,
@@ -4266,7 +4266,7 @@ struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev __rte_un
return NULL;
}
-int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *fh,
struct rte_flow_error *error)
{
@@ -4332,27 +4332,27 @@ int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
return 0;
}
-int flow_destroy_profile_inline(struct flow_eth_dev *dev, struct flow_handle *flow,
+int nthw_flow_destroy_profile_inline(struct flow_eth_dev *dev, struct flow_handle *flow,
struct rte_flow_error *error)
{
int err = 0;
if (flow && flow->type == FLOW_HANDLE_TYPE_FLM && flow->flm_async)
- return flow_async_destroy_profile_inline(dev, 0, NULL, flow, NULL, error);
+ return nthw_flow_async_destroy_profile_inline(dev, 0, NULL, flow, NULL, error);
nthw_flow_nic_set_error(ERR_SUCCESS, error);
if (flow) {
/* Delete this flow */
rte_spinlock_lock(&dev->ndev->mtx);
- err = flow_destroy_locked_profile_inline(dev, flow, error);
+ err = nthw_flow_destroy_locked_profile_inline(dev, flow, error);
rte_spinlock_unlock(&dev->ndev->mtx);
}
return err;
}
-int flow_flush_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_flush_profile_inline(struct flow_eth_dev *dev,
uint16_t caller_id,
struct rte_flow_error *error)
{
@@ -4369,7 +4369,7 @@ int flow_flush_profile_inline(struct flow_eth_dev *dev,
while (flow && !err) {
if (flow->dev == dev && flow->caller_id == caller_id) {
struct flow_handle *flow_next = flow->next;
- err = flow_destroy_profile_inline(dev, flow, error);
+ err = nthw_flow_destroy_profile_inline(dev, flow, error);
flow = flow_next;
} else {
@@ -4383,7 +4383,7 @@ int flow_flush_profile_inline(struct flow_eth_dev *dev,
while (flow && !err) {
if (flow->dev == dev && flow->caller_id == caller_id) {
struct flow_handle *flow_next = flow->next;
- err = flow_destroy_profile_inline(dev, flow, error);
+ err = nthw_flow_destroy_profile_inline(dev, flow, error);
flow = flow_next;
} else {
@@ -4394,7 +4394,7 @@ int flow_flush_profile_inline(struct flow_eth_dev *dev,
return err;
}
-int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_actions_update_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *flow,
const struct rte_flow_action action[],
struct rte_flow_error *error)
@@ -4566,7 +4566,7 @@ static void dump_flm_data(const uint32_t *data, FILE *file)
}
}
-int flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
uint16_t caller_id,
void **context,
uint32_t nb_contexts,
@@ -4615,7 +4615,7 @@ int flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
return idx;
}
-int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *flow,
uint16_t caller_id,
FILE *file,
@@ -4687,7 +4687,7 @@ int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
return 0;
}
-int flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size)
+int nthw_flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size)
{
const enum hw_flm_e fields[] = {
HW_FLM_STAT_FLOWS, HW_FLM_STAT_LRN_DONE, HW_FLM_STAT_LRN_IGNORE,
@@ -4729,7 +4729,7 @@ int flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
return 0;
}
-int flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
+int nthw_flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
uint8_t port_count)
{
/* IFR RCP 0 is reserved, port counters start from record 1 */
@@ -4747,7 +4747,7 @@ int flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data,
return 0;
}
-int flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu)
+int nthw_flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu)
{
if (port >= 255)
return -1;
@@ -4808,7 +4808,7 @@ int flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu)
return err;
}
-int flow_info_get_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
+int nthw_flow_info_get_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
struct rte_flow_port_info *port_info,
struct rte_flow_queue_info *queue_info, struct rte_flow_error *error)
{
@@ -4830,7 +4830,7 @@ int flow_info_get_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
return res;
}
-int flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
+int nthw_flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
const struct rte_flow_port_attr *port_attr, uint16_t nb_queue,
const struct rte_flow_queue_attr *queue_attr[],
struct rte_flow_error *error)
@@ -4905,7 +4905,8 @@ int flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
return -1;
}
-struct flow_pattern_template *flow_pattern_template_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_pattern_template *
+nthw_flow_pattern_template_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_pattern_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_item pattern[], struct rte_flow_error *error)
{
@@ -4949,7 +4950,7 @@ struct flow_pattern_template *flow_pattern_template_create_profile_inline(struct
return template;
}
-int flow_pattern_template_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_pattern_template_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_pattern_template *pattern_template,
struct rte_flow_error *error)
{
@@ -4963,7 +4964,7 @@ int flow_pattern_template_destroy_profile_inline(struct flow_eth_dev *dev,
}
struct flow_actions_template *
-flow_actions_template_create_profile_inline(struct flow_eth_dev *dev,
+nthw_flow_actions_template_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_actions_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_action actions[],
const struct rte_flow_action masks[],
@@ -5023,7 +5024,7 @@ flow_actions_template_create_profile_inline(struct flow_eth_dev *dev,
return template;
}
-int flow_actions_template_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_actions_template_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_actions_template *actions_template,
struct rte_flow_error *error)
{
@@ -5036,7 +5037,7 @@ int flow_actions_template_destroy_profile_inline(struct flow_eth_dev *dev,
return 0;
}
-struct flow_template_table *flow_template_table_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_template_table *nthw_flow_template_table_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_template_table_attr *table_attr, uint16_t forced_vlan_vid,
uint16_t caller_id,
struct flow_pattern_template *pattern_templates[], uint8_t nb_pattern_templates,
@@ -5109,7 +5110,7 @@ struct flow_template_table *flow_template_table_create_profile_inline(struct flo
return NULL;
}
-int flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_template_table *template_table,
struct rte_flow_error *error)
{
@@ -5136,7 +5137,7 @@ int flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
return 0;
}
-struct flow_handle *flow_async_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_handle *nthw_flow_async_create_profile_inline(struct flow_eth_dev *dev,
uint32_t queue_id,
const struct rte_flow_op_attr *op_attr,
struct flow_template_table *template_table,
@@ -5346,7 +5347,7 @@ struct flow_handle *flow_async_create_profile_inline(struct flow_eth_dev *dev,
return NULL;
}
-int flow_async_destroy_profile_inline(struct flow_eth_dev *dev, uint32_t queue_id,
+int nthw_flow_async_destroy_profile_inline(struct flow_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_op_attr *op_attr, struct flow_handle *flow,
void *user_data, struct rte_flow_error *error)
{
@@ -5355,7 +5356,7 @@ int flow_async_destroy_profile_inline(struct flow_eth_dev *dev, uint32_t queue_i
(void)user_data;
if (flow->type == FLOW_HANDLE_TYPE_FLOW)
- return flow_destroy_profile_inline(dev, flow, error);
+ return nthw_flow_destroy_profile_inline(dev, flow, error);
if (flm_flow_programming(flow, NT_FLM_OP_UNLEARN)) {
NT_LOG(ERR, FILTER, "FAILED to destroy flow: %p", flow);
@@ -5374,36 +5375,40 @@ static const struct profile_inline_ops ops = {
/*
* Management
*/
- .done_flow_management_of_ndev_profile_inline = done_flow_management_of_ndev_profile_inline,
- .initialize_flow_management_of_ndev_profile_inline =
- initialize_flow_management_of_ndev_profile_inline,
- .flow_dev_dump_profile_inline = flow_dev_dump_profile_inline,
+ .nthw_done_flow_mgmnt_of_ndev_profile_inline = nthw_done_flow_mgmnt_of_ndev_profile_inline,
+ .nthw_init_flow_mgmnt_of_ndev_profile_inline =
+ nthw_init_flow_mgmnt_of_ndev_profile_inline,
+ .nthw_flow_dev_dump_profile_inline = nthw_flow_dev_dump_profile_inline,
/*
* Flow functionality
*/
- .flow_destroy_locked_profile_inline = flow_destroy_locked_profile_inline,
- .flow_create_profile_inline = flow_create_profile_inline,
- .flow_destroy_profile_inline = flow_destroy_profile_inline,
- .flow_flush_profile_inline = flow_flush_profile_inline,
- .flow_actions_update_profile_inline = flow_actions_update_profile_inline,
- .flow_get_aged_flows_profile_inline = flow_get_aged_flows_profile_inline,
+ .nthw_flow_destroy_locked_profile_inline = nthw_flow_destroy_locked_profile_inline,
+ .nthw_flow_create_profile_inline = nthw_flow_create_profile_inline,
+ .nthw_flow_destroy_profile_inline = nthw_flow_destroy_profile_inline,
+ .nthw_flow_flush_profile_inline = nthw_flow_flush_profile_inline,
+ .nthw_flow_actions_update_profile_inline = nthw_flow_actions_update_profile_inline,
+ .nthw_flow_get_aged_flows_profile_inline = nthw_flow_get_aged_flows_profile_inline,
/*
* Stats
*/
- .flow_get_flm_stats_profile_inline = flow_get_flm_stats_profile_inline,
- .flow_get_ifr_stats_profile_inline = flow_get_ifr_stats_profile_inline,
- .flow_info_get_profile_inline = flow_info_get_profile_inline,
- .flow_configure_profile_inline = flow_configure_profile_inline,
- .flow_pattern_template_create_profile_inline = flow_pattern_template_create_profile_inline,
- .flow_pattern_template_destroy_profile_inline =
- flow_pattern_template_destroy_profile_inline,
- .flow_actions_template_create_profile_inline = flow_actions_template_create_profile_inline,
- .flow_actions_template_destroy_profile_inline =
- flow_actions_template_destroy_profile_inline,
- .flow_template_table_create_profile_inline = flow_template_table_create_profile_inline,
- .flow_template_table_destroy_profile_inline = flow_template_table_destroy_profile_inline,
- .flow_async_create_profile_inline = flow_async_create_profile_inline,
- .flow_async_destroy_profile_inline = flow_async_destroy_profile_inline,
+ .nthw_flow_get_flm_stats_profile_inline = nthw_flow_get_flm_stats_profile_inline,
+ .nthw_flow_get_ifr_stats_profile_inline = nthw_flow_get_ifr_stats_profile_inline,
+ .nthw_flow_info_get_profile_inline = nthw_flow_info_get_profile_inline,
+ .nthw_flow_configure_profile_inline = nthw_flow_configure_profile_inline,
+ .nthw_flow_pattern_template_create_profile_inline =
+ nthw_flow_pattern_template_create_profile_inline,
+ .nthw_flow_pattern_template_destroy_profile_inline =
+ nthw_flow_pattern_template_destroy_profile_inline,
+ .nthw_flow_actions_template_create_profile_inline =
+ nthw_flow_actions_template_create_profile_inline,
+ .nthw_flow_actions_template_destroy_profile_inline =
+ nthw_flow_actions_template_destroy_profile_inline,
+ .nthw_flow_template_table_create_profile_inline =
+ nthw_flow_template_table_create_profile_inline,
+ .nthw_flow_template_table_destroy_profile_inline =
+ nthw_flow_template_table_destroy_profile_inline,
+ .nthw_flow_async_create_profile_inline = nthw_flow_async_create_profile_inline,
+ .nthw_flow_async_destroy_profile_inline = nthw_flow_async_destroy_profile_inline,
/*
* NT Flow FLM Meter API
*/
@@ -5424,10 +5429,10 @@ static const struct profile_inline_ops ops = {
/*
* Config API
*/
- .flow_set_mtu_inline = flow_set_mtu_inline,
+ .nthw_flow_set_mtu_inline = nthw_flow_set_mtu_inline,
};
-void profile_inline_init(void)
+void nthw_profile_inline_init(void)
{
register_profile_inline_ops(&ops);
}
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
index 98aba07515..2c2d0e2fbf 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_profile_inline.h
@@ -22,18 +22,18 @@
* Management
*/
-int done_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev);
+int nthw_done_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev);
-int initialize_flow_management_of_ndev_profile_inline(struct flow_nic_dev *ndev);
+int nthw_init_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev);
/*
* Flow functionality
*/
-int flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *fh,
struct rte_flow_error *error);
-struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_handle *nthw_flow_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_attr *attr,
uint16_t forced_vlan_vid,
uint16_t caller_id,
@@ -41,26 +41,26 @@ struct flow_handle *flow_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_action action[],
struct rte_flow_error *error);
-int flow_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *flow,
struct rte_flow_error *error);
-int flow_flush_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_flush_profile_inline(struct flow_eth_dev *dev,
uint16_t caller_id,
struct rte_flow_error *error);
-int flow_actions_update_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_actions_update_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *flow,
const struct rte_flow_action action[],
struct rte_flow_error *error);
-int flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_dev_dump_profile_inline(struct flow_eth_dev *dev,
struct flow_handle *flow,
uint16_t caller_id,
FILE *file,
struct rte_flow_error *error);
-int flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
uint16_t caller_id,
void **context,
uint32_t nb_contexts,
@@ -70,9 +70,11 @@ int flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
* Stats
*/
-int flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size);
+int nthw_flow_get_flm_stats_profile_inline(struct flow_nic_dev *ndev,
+ uint64_t *data,
+ uint64_t size);
-int flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev,
+int nthw_flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev,
uint64_t *data,
uint8_t port_count);
@@ -80,49 +82,52 @@ int flow_get_ifr_stats_profile_inline(struct flow_nic_dev *ndev,
* RTE flow asynchronous operations functions
*/
-struct flow_pattern_template *flow_pattern_template_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_pattern_template *
+nthw_flow_pattern_template_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_pattern_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_item pattern[], struct rte_flow_error *error);
-int flow_pattern_template_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_pattern_template_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_pattern_template *pattern_template,
struct rte_flow_error *error);
-struct flow_actions_template *flow_actions_template_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_actions_template *
+nthw_flow_actions_template_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_actions_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_action actions[], const struct rte_flow_action masks[],
struct rte_flow_error *error);
-int flow_actions_template_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_actions_template_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_actions_template *actions_template,
struct rte_flow_error *error);
-struct flow_template_table *flow_template_table_create_profile_inline(struct flow_eth_dev *dev,
+struct flow_template_table *nthw_flow_template_table_create_profile_inline(struct flow_eth_dev *dev,
const struct rte_flow_template_table_attr *table_attr, uint16_t forced_vlan_vid,
uint16_t caller_id,
struct flow_pattern_template *pattern_templates[], uint8_t nb_pattern_templates,
struct flow_actions_template *actions_templates[], uint8_t nb_actions_templates,
struct rte_flow_error *error);
-int flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
+int nthw_flow_template_table_destroy_profile_inline(struct flow_eth_dev *dev,
struct flow_template_table *template_table,
struct rte_flow_error *error);
-struct flow_handle *flow_async_create_profile_inline(struct flow_eth_dev *dev, uint32_t queue_id,
+struct flow_handle *nthw_flow_async_create_profile_inline(struct flow_eth_dev *dev,
+ uint32_t queue_id,
const struct rte_flow_op_attr *op_attr,
struct flow_template_table *template_table, const struct rte_flow_item pattern[],
uint8_t pattern_template_index, const struct rte_flow_action actions[],
uint8_t actions_template_index, void *user_data, struct rte_flow_error *error);
-int flow_async_destroy_profile_inline(struct flow_eth_dev *dev, uint32_t queue_id,
+int nthw_flow_async_destroy_profile_inline(struct flow_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_op_attr *op_attr, struct flow_handle *flow,
void *user_data, struct rte_flow_error *error);
-int flow_info_get_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
+int nthw_flow_info_get_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
struct rte_flow_port_info *port_info,
struct rte_flow_queue_info *queue_info, struct rte_flow_error *error);
-int flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
+int nthw_flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
const struct rte_flow_port_attr *port_attr, uint16_t nb_queue,
const struct rte_flow_queue_attr *queue_attr[],
struct rte_flow_error *error);
@@ -130,6 +135,6 @@ int flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_id,
/*
* Config API
*/
-int flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu);
+int nthw_flow_set_mtu_inline(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu);
#endif /* _FLOW_API_PROFILE_INLINE_H_ */
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 816d5a8430..9e6cc0e4cd 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -1192,7 +1192,7 @@ static int dev_set_mtu_inline(struct rte_eth_dev *eth_dev, uint16_t mtu)
int ret = -1;
if (internals->type == PORT_TYPE_PHYSICAL && mtu >= MIN_MTU_INLINE && mtu <= MAX_MTU)
- ret = profile_inline_ops->flow_set_mtu_inline(flw_dev, internals->port, mtu);
+ ret = profile_inline_ops->nthw_flow_set_mtu_inline(flw_dev, internals->port, mtu);
return ret ? -EINVAL : 0;
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.c b/drivers/net/ntnic/ntnic_mod_reg.c
index 8dc6e48182..36aee48818 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.c
+++ b/drivers/net/ntnic/ntnic_mod_reg.c
@@ -226,7 +226,7 @@ void register_profile_inline_ops(const struct profile_inline_ops *ops)
const struct profile_inline_ops *get_profile_inline_ops(void)
{
if (profile_inline_ops == NULL)
- profile_inline_init();
+ nthw_profile_inline_init();
return profile_inline_ops;
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h
index 2d5bebda2a..59eb5ab69f 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -297,18 +297,18 @@ struct profile_inline_ops {
* Management
*/
- int (*done_flow_management_of_ndev_profile_inline)(struct flow_nic_dev *ndev);
+ int (*nthw_done_flow_mgmnt_of_ndev_profile_inline)(struct flow_nic_dev *ndev);
- int (*initialize_flow_management_of_ndev_profile_inline)(struct flow_nic_dev *ndev);
+ int (*nthw_init_flow_mgmnt_of_ndev_profile_inline)(struct flow_nic_dev *ndev);
/*
* Flow functionality
*/
- int (*flow_destroy_locked_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_destroy_locked_profile_inline)(struct flow_eth_dev *dev,
struct flow_handle *fh,
struct rte_flow_error *error);
- struct flow_handle *(*flow_create_profile_inline)(struct flow_eth_dev *dev,
+ struct flow_handle *(*nthw_flow_create_profile_inline)(struct flow_eth_dev *dev,
const struct rte_flow_attr *attr,
uint16_t forced_vlan_vid,
uint16_t caller_id,
@@ -316,26 +316,26 @@ struct profile_inline_ops {
const struct rte_flow_action action[],
struct rte_flow_error *error);
- int (*flow_destroy_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_destroy_profile_inline)(struct flow_eth_dev *dev,
struct flow_handle *flow,
struct rte_flow_error *error);
- int (*flow_flush_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_flush_profile_inline)(struct flow_eth_dev *dev,
uint16_t caller_id,
struct rte_flow_error *error);
- int (*flow_actions_update_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_actions_update_profile_inline)(struct flow_eth_dev *dev,
struct flow_handle *flow,
const struct rte_flow_action action[],
struct rte_flow_error *error);
- int (*flow_dev_dump_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_dev_dump_profile_inline)(struct flow_eth_dev *dev,
struct flow_handle *flow,
uint16_t caller_id,
FILE *file,
struct rte_flow_error *error);
- int (*flow_get_aged_flows_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_get_aged_flows_profile_inline)(struct flow_eth_dev *dev,
uint16_t caller_id,
void **context,
uint32_t nb_contexts,
@@ -345,43 +345,43 @@ struct profile_inline_ops {
* RTE flow asynchronous operations functions
*/
- struct flow_pattern_template *(*flow_pattern_template_create_profile_inline)
+ struct flow_pattern_template *(*nthw_flow_pattern_template_create_profile_inline)
(struct flow_eth_dev *dev,
const struct rte_flow_pattern_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_item pattern[], struct rte_flow_error *error);
- int (*flow_pattern_template_destroy_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_pattern_template_destroy_profile_inline)(struct flow_eth_dev *dev,
struct flow_pattern_template *pattern_template,
struct rte_flow_error *error);
- struct flow_actions_template *(*flow_actions_template_create_profile_inline)
+ struct flow_actions_template *(*nthw_flow_actions_template_create_profile_inline)
(struct flow_eth_dev *dev,
const struct rte_flow_actions_template_attr *template_attr,
uint16_t caller_id, const struct rte_flow_action actions[],
const struct rte_flow_action masks[], struct rte_flow_error *error);
- int (*flow_actions_template_destroy_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_actions_template_destroy_profile_inline)(struct flow_eth_dev *dev,
struct flow_actions_template *actions_template,
struct rte_flow_error *error);
- struct flow_template_table *(*flow_template_table_create_profile_inline)
+ struct flow_template_table *(*nthw_flow_template_table_create_profile_inline)
(struct flow_eth_dev *dev, const struct rte_flow_template_table_attr *table_attr,
uint16_t forced_vlan_vid, uint16_t caller_id,
struct flow_pattern_template *pattern_templates[], uint8_t nb_pattern_templates,
struct flow_actions_template *actions_templates[], uint8_t nb_actions_templates,
struct rte_flow_error *error);
- int (*flow_template_table_destroy_profile_inline)(struct flow_eth_dev *dev,
+ int (*nthw_flow_template_table_destroy_profile_inline)(struct flow_eth_dev *dev,
struct flow_template_table *template_table,
struct rte_flow_error *error);
- struct flow_handle *(*flow_async_create_profile_inline)(struct flow_eth_dev *dev,
+ struct flow_handle *(*nthw_flow_async_create_profile_inline)(struct flow_eth_dev *dev,
uint32_t queue_id, const struct rte_flow_op_attr *op_attr,
struct flow_template_table *template_table, const struct rte_flow_item pattern[],
uint8_t rte_pattern_template_index, const struct rte_flow_action actions[],
uint8_t rte_actions_template_index, void *user_data, struct rte_flow_error *error);
- int (*flow_async_destroy_profile_inline)(struct flow_eth_dev *dev, uint32_t queue_id,
+ int (*nthw_flow_async_destroy_profile_inline)(struct flow_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_op_attr *op_attr,
struct flow_handle *flow, void *user_data,
struct rte_flow_error *error);
@@ -389,11 +389,11 @@ struct profile_inline_ops {
/*
* Stats
*/
- int (*flow_get_flm_stats_profile_inline)(struct flow_nic_dev *ndev,
+ int (*nthw_flow_get_flm_stats_profile_inline)(struct flow_nic_dev *ndev,
uint64_t *data,
uint64_t size);
- int (*flow_get_ifr_stats_profile_inline)(struct flow_nic_dev *ndev,
+ int (*nthw_flow_get_ifr_stats_profile_inline)(struct flow_nic_dev *ndev,
uint64_t *data,
uint8_t port_count);
@@ -431,11 +431,11 @@ struct profile_inline_ops {
uint32_t (*flm_update)(struct flow_eth_dev *dev);
- int (*flow_info_get_profile_inline)(struct flow_eth_dev *dev, uint8_t caller_id,
+ int (*nthw_flow_info_get_profile_inline)(struct flow_eth_dev *dev, uint8_t caller_id,
struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info,
struct rte_flow_error *error);
- int (*flow_configure_profile_inline)(struct flow_eth_dev *dev, uint8_t caller_id,
+ int (*nthw_flow_configure_profile_inline)(struct flow_eth_dev *dev, uint8_t caller_id,
const struct rte_flow_port_attr *port_attr, uint16_t nb_queue,
const struct rte_flow_queue_attr *queue_attr[],
struct rte_flow_error *error);
@@ -443,12 +443,12 @@ struct profile_inline_ops {
/*
* Config API
*/
- int (*flow_set_mtu_inline)(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu);
+ int (*nthw_flow_set_mtu_inline)(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu);
};
void register_profile_inline_ops(const struct profile_inline_ops *ops);
const struct profile_inline_ops *get_profile_inline_ops(void);
-void profile_inline_init(void);
+void nthw_profile_inline_init(void);
struct flow_filter_ops {
int (*nthw_flow_filter_init)(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_device,
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 06/16] net/ntnic: change prefix flm_ to prefix nthw_flm_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (4 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 05/16] net/ntnic: modify prefix flow_ with " Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 07/16] net/ntnic: change prefix nt_ to prefix nthw_ Serhii Iliushyk
` (9 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change the prefix flm_ to prefix nthw_flm_ to specify that these functions
and part of the ntwh (Napatech Hardware).
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
.../flow_api/profile_inline/flm_age_queue.c | 22 ++++----
.../flow_api/profile_inline/flm_age_queue.h | 20 +++----
.../flow_api/profile_inline/flm_lrn_queue.c | 12 ++--
.../flow_api/profile_inline/flm_lrn_queue.h | 12 ++--
.../profile_inline/flow_api_profile_inline.c | 55 ++++++++++---------
drivers/net/ntnic/ntnic_ethdev.c | 6 +-
6 files changed, 64 insertions(+), 63 deletions(-)
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c
index c7522516d1..87c1a5a29e 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.c
@@ -13,22 +13,22 @@
static struct rte_ring *age_queue[MAX_EVT_AGE_QUEUES];
static RTE_ATOMIC(uint16_t) age_event[MAX_EVT_AGE_PORTS];
-__rte_always_inline int flm_age_event_get(uint8_t port)
+__rte_always_inline int nthw_flm_age_event_get(uint8_t port)
{
return rte_atomic_load_explicit(&age_event[port], rte_memory_order_seq_cst);
}
-__rte_always_inline void flm_age_event_set(uint8_t port)
+__rte_always_inline void nthw_flm_age_event_set(uint8_t port)
{
rte_atomic_store_explicit(&age_event[port], 1, rte_memory_order_seq_cst);
}
-__rte_always_inline void flm_age_event_clear(uint8_t port)
+__rte_always_inline void nthw_flm_age_event_clear(uint8_t port)
{
rte_atomic_store_explicit(&age_event[port], 0, rte_memory_order_seq_cst);
}
-void flm_age_queue_free(uint8_t port, uint16_t caller_id)
+void nthw_flm_age_queue_free(uint8_t port, uint16_t caller_id)
{
struct rte_ring *q = NULL;
@@ -43,17 +43,17 @@ void flm_age_queue_free(uint8_t port, uint16_t caller_id)
rte_ring_free(q);
}
-void flm_age_queue_free_all(void)
+void nthw_flm_age_queue_free_all(void)
{
int i;
int j;
for (i = 0; i < MAX_EVT_AGE_PORTS; i++)
for (j = 0; j < MAX_EVT_AGE_QUEUES; j++)
- flm_age_queue_free(i, j);
+ nthw_flm_age_queue_free(i, j);
}
-struct rte_ring *flm_age_queue_create(uint8_t port, uint16_t caller_id, unsigned int count)
+struct rte_ring *nthw_flm_age_queue_create(uint8_t port, uint16_t caller_id, unsigned int count)
{
char name[20];
struct rte_ring *q = NULL;
@@ -112,7 +112,7 @@ struct rte_ring *flm_age_queue_create(uint8_t port, uint16_t caller_id, unsigned
return q;
}
-void flm_age_queue_put(uint16_t caller_id, struct flm_age_event_s *obj)
+void nthw_flm_age_queue_put(uint16_t caller_id, struct flm_age_event_s *obj)
{
int ret;
@@ -125,7 +125,7 @@ void flm_age_queue_put(uint16_t caller_id, struct flm_age_event_s *obj)
}
}
-int flm_age_queue_get(uint16_t caller_id, struct flm_age_event_s *obj)
+int nthw_flm_age_queue_get(uint16_t caller_id, struct flm_age_event_s *obj)
{
int ret;
@@ -142,7 +142,7 @@ int flm_age_queue_get(uint16_t caller_id, struct flm_age_event_s *obj)
return -ENOENT;
}
-unsigned int flm_age_queue_count(uint16_t caller_id)
+unsigned int nthw_flm_age_queue_count(uint16_t caller_id)
{
unsigned int ret = 0;
@@ -152,7 +152,7 @@ unsigned int flm_age_queue_count(uint16_t caller_id)
return ret;
}
-unsigned int flm_age_queue_get_size(uint16_t caller_id)
+unsigned int nthw_flm_age_queue_get_size(uint16_t caller_id)
{
unsigned int ret = 0;
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.h
index 55c410ac86..babf73fd7f 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_age_queue.h
@@ -28,15 +28,15 @@ struct flm_age_event_s {
#define FLM_AGE_ELEM_SIZE sizeof(struct flm_age_event_s)
-int flm_age_event_get(uint8_t port);
-void flm_age_event_set(uint8_t port);
-void flm_age_event_clear(uint8_t port);
-void flm_age_queue_free(uint8_t port, uint16_t caller_id);
-void flm_age_queue_free_all(void);
-struct rte_ring *flm_age_queue_create(uint8_t port, uint16_t caller_id, unsigned int count);
-void flm_age_queue_put(uint16_t caller_id, struct flm_age_event_s *obj);
-int flm_age_queue_get(uint16_t caller_id, struct flm_age_event_s *obj);
-unsigned int flm_age_queue_count(uint16_t caller_id);
-unsigned int flm_age_queue_get_size(uint16_t caller_id);
+int nthw_flm_age_event_get(uint8_t port);
+void nthw_flm_age_event_set(uint8_t port);
+void nthw_flm_age_event_clear(uint8_t port);
+void nthw_flm_age_queue_free(uint8_t port, uint16_t caller_id);
+void nthw_flm_age_queue_free_all(void);
+struct rte_ring *nthw_flm_age_queue_create(uint8_t port, uint16_t caller_id, unsigned int count);
+void nthw_flm_age_queue_put(uint16_t caller_id, struct flm_age_event_s *obj);
+int nthw_flm_age_queue_get(uint16_t caller_id, struct flm_age_event_s *obj);
+unsigned int nthw_flm_age_queue_count(uint16_t caller_id);
+unsigned int nthw_flm_age_queue_get_size(uint16_t caller_id);
#endif /* _FLM_AGE_QUEUE_H_ */
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.c
index f6cc09de9b..4f974a6e5b 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.c
@@ -16,7 +16,7 @@
#define ELEM_SIZE sizeof(struct flm_v25_lrn_data_s)
-void *flm_lrn_queue_create(void)
+void *nthw_flm_lrn_queue_create(void)
{
static_assert((ELEM_SIZE & ~(size_t)3) == ELEM_SIZE, "FLM LEARN struct size");
struct rte_ring *q = rte_ring_create_elem("RFQ",
@@ -28,24 +28,24 @@ void *flm_lrn_queue_create(void)
return q;
}
-void flm_lrn_queue_free(void *q)
+void nthw_flm_lrn_queue_free(void *q)
{
rte_ring_free(q);
}
-uint32_t *flm_lrn_queue_get_write_buffer(void *q)
+uint32_t *nthw_flm_lrn_queue_get_write_buffer(void *q)
{
struct rte_ring_zc_data zcd;
unsigned int n = rte_ring_enqueue_zc_burst_elem_start(q, ELEM_SIZE, 1, &zcd, NULL);
return (n == 0) ? NULL : zcd.ptr1;
}
-void flm_lrn_queue_release_write_buffer(void *q)
+void nthw_flm_lrn_queue_release_write_buffer(void *q)
{
rte_ring_enqueue_zc_elem_finish(q, 1);
}
-read_record flm_lrn_queue_get_read_buffer(void *q)
+read_record nthw_flm_lrn_queue_get_read_buffer(void *q)
{
struct rte_ring_zc_data zcd;
read_record rr;
@@ -62,7 +62,7 @@ read_record flm_lrn_queue_get_read_buffer(void *q)
return rr;
}
-void flm_lrn_queue_release_read_buffer(void *q, uint32_t num)
+void nthw_flm_lrn_queue_release_read_buffer(void *q, uint32_t num)
{
rte_ring_dequeue_zc_elem_finish(q, num);
}
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.h b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.h
index 40558f4201..ee1e2a63eb 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.h
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flm_lrn_queue.h
@@ -13,13 +13,13 @@ typedef struct read_record {
uint32_t num;
} read_record;
-void *flm_lrn_queue_create(void);
-void flm_lrn_queue_free(void *q);
+void *nthw_flm_lrn_queue_create(void);
+void nthw_flm_lrn_queue_free(void *q);
-uint32_t *flm_lrn_queue_get_write_buffer(void *q);
-void flm_lrn_queue_release_write_buffer(void *q);
+uint32_t *nthw_flm_lrn_queue_get_write_buffer(void *q);
+void nthw_flm_lrn_queue_release_write_buffer(void *q);
-read_record flm_lrn_queue_get_read_buffer(void *q);
-void flm_lrn_queue_release_read_buffer(void *q, uint32_t num);
+read_record nthw_flm_lrn_queue_get_read_buffer(void *q);
+void nthw_flm_lrn_queue_release_read_buffer(void *q, uint32_t num);
#endif /* _FLM_LRN_QUEUE_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 32aae24499..1a78933b7f 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
@@ -194,13 +194,13 @@ static int flow_mtr_create_meter(struct flow_eth_dev *dev,
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
nt_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
}
struct flm_flow_mtr_handle_s *handle = dev->ndev->flm_mtr_handle;
@@ -232,7 +232,7 @@ static int flow_mtr_create_meter(struct flow_eth_dev *dev,
if (stats_mask)
learn_record->vol_idx = 1;
- flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
struct flm_mtr_stat_s *mtr_stat = handle->port_stats[caller_id]->stats;
mtr_stat[mtr_id].buckets = buckets;
@@ -252,13 +252,13 @@ static int flow_mtr_probe_meter(struct flow_eth_dev *dev, uint8_t caller_id, uin
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
nt_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
}
struct flm_flow_mtr_handle_s *handle = dev->ndev->flm_mtr_handle;
@@ -277,7 +277,7 @@ static int flow_mtr_probe_meter(struct flow_eth_dev *dev, uint8_t caller_id, uin
learn_record->id = flm_id;
- flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
rte_spinlock_unlock(&dev->ndev->mtx);
@@ -292,13 +292,13 @@ static int flow_mtr_destroy_meter(struct flow_eth_dev *dev, uint8_t caller_id, u
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
nt_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
}
struct flm_flow_mtr_handle_s *handle = dev->ndev->flm_mtr_handle;
@@ -329,7 +329,7 @@ static int flow_mtr_destroy_meter(struct flow_eth_dev *dev, uint8_t caller_id, u
ntnic_id_table_free_id(dev->ndev->id_table_handle, flm_id);
- flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
rte_spinlock_unlock(&dev->ndev->mtx);
@@ -345,13 +345,13 @@ static int flm_mtr_adjust_stats(struct flow_eth_dev *dev, uint8_t caller_id, uin
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
nt_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
}
struct flm_flow_mtr_handle_s *handle = dev->ndev->flm_mtr_handle;
@@ -376,7 +376,7 @@ static int flm_mtr_adjust_stats(struct flow_eth_dev *dev, uint8_t caller_id, uin
if (atomic_load(&mtr_stat->stats_mask))
learn_record->vol_idx = 1;
- flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
rte_spinlock_unlock(&dev->ndev->mtx);
@@ -385,19 +385,19 @@ static int flm_mtr_adjust_stats(struct flow_eth_dev *dev, uint8_t caller_id, uin
static void flm_setup_queues(void)
{
- flm_lrn_queue_arr = flm_lrn_queue_create();
+ flm_lrn_queue_arr = nthw_flm_lrn_queue_create();
RTE_ASSERT(flm_lrn_queue_arr != NULL);
}
static void flm_free_queues(void)
{
- flm_lrn_queue_free(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_free(flm_lrn_queue_arr);
}
static uint32_t flm_lrn_update(struct flow_eth_dev *dev, uint32_t *inf_word_cnt,
uint32_t *sta_word_cnt)
{
- read_record r = flm_lrn_queue_get_read_buffer(flm_lrn_queue_arr);
+ read_record r = nthw_flm_lrn_queue_get_read_buffer(flm_lrn_queue_arr);
uint32_t handled_records = 0;
if (r.num) {
@@ -405,7 +405,7 @@ static uint32_t flm_lrn_update(struct flow_eth_dev *dev, uint32_t *inf_word_cnt,
r.num, &handled_records, inf_word_cnt, sta_word_cnt))
NT_LOG(ERR, FILTER, "Flow programming failed");
}
- flm_lrn_queue_release_read_buffer(flm_lrn_queue_arr, handled_records);
+ nthw_flm_lrn_queue_release_read_buffer(flm_lrn_queue_arr, handled_records);
return r.num;
}
@@ -481,10 +481,10 @@ static void flm_mtr_read_inf_records(struct flow_eth_dev *dev, uint32_t *data, u
is_remote = is_remote_caller(caller_id, &port);
- flm_age_queue_put(caller_id, &age_event);
+ nthw_flm_age_queue_put(caller_id, &age_event);
/* age events are supported only for physical ports */
if (!is_remote)
- flm_age_event_set(port);
+ nthw_flm_age_event_set(port);
}
break;
@@ -973,13 +973,13 @@ static int flm_flow_programming(struct flow_handle *fh, uint32_t flm_op)
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
nt_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
- flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
}
memset(learn_record, 0x0, sizeof(struct flm_v25_lrn_data_s));
@@ -1034,7 +1034,7 @@ static int flm_flow_programming(struct flow_handle *fh, uint32_t flm_op)
learn_record->eor = 1;
learn_record->scrub_prof = fh->flm_scrub_prof;
- flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
+ nthw_flm_lrn_queue_release_write_buffer(flm_lrn_queue_arr);
return 0;
}
@@ -4575,7 +4575,7 @@ int nthw_flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
(void)dev;
nthw_flow_nic_set_error(ERR_SUCCESS, error);
- unsigned int queue_size = flm_age_queue_get_size(caller_id);
+ unsigned int queue_size = nthw_flm_age_queue_get_size(caller_id);
if (queue_size == 0) {
error->type = RTE_FLOW_ERROR_TYPE_UNSPECIFIED;
@@ -4583,7 +4583,7 @@ int nthw_flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
return -1;
}
- unsigned int queue_count = flm_age_queue_count(caller_id);
+ unsigned int queue_count = nthw_flm_age_queue_count(caller_id);
if (context == NULL)
return queue_count;
@@ -4604,7 +4604,7 @@ int nthw_flow_get_aged_flows_profile_inline(struct flow_eth_dev *dev,
for (idx = 0; idx < nb_contexts; ++idx) {
struct flm_age_event_s obj;
- int ret = flm_age_queue_get(caller_id, &obj);
+ int ret = nthw_flm_age_queue_get(caller_id, &obj);
if (ret != 0)
break;
@@ -4843,12 +4843,13 @@ int nthw_flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_
if (port_attr->nb_aging_objects > 0) {
if (dev->nb_aging_objects > 0) {
- flm_age_queue_free(dev->port_id, caller_id);
+ nthw_flm_age_queue_free(dev->port_id, caller_id);
dev->nb_aging_objects = 0;
}
struct rte_ring *age_queue =
- flm_age_queue_create(dev->port_id, caller_id, port_attr->nb_aging_objects);
+ nthw_flm_age_queue_create(dev->port_id, caller_id,
+ port_attr->nb_aging_objects);
if (age_queue == NULL) {
error->message = "Failed to allocate aging objects";
@@ -4898,7 +4899,7 @@ int nthw_flow_configure_profile_inline(struct flow_eth_dev *dev, uint8_t caller_
error->type = RTE_FLOW_ERROR_TYPE_UNSPECIFIED;
if (port_attr->nb_aging_objects > 0) {
- flm_age_queue_free(dev->port_id, caller_id);
+ nthw_flm_age_queue_free(dev->port_id, caller_id);
dev->nb_aging_objects = 0;
}
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 9e6cc0e4cd..b515a69c87 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -1547,7 +1547,7 @@ drv_deinit(struct drv_s *p_drv)
/* Free all remote flm event queues */
nthw_flm_inf_sta_queue_free_all(FLM_INFO_REMOTE);
/* Free all aged flow event queues */
- flm_age_queue_free_all();
+ nthw_flm_age_queue_free_all();
}
/* stop adapter */
@@ -1981,7 +1981,7 @@ static int port_event_service(void *context)
/* Note: RTE_FLOW_PORT_FLAG_STRICT_QUEUE flag is not supported so
* event is always generated
*/
- int aged_event_count = flm_age_event_get(port_no);
+ int aged_event_count = nthw_flm_age_event_get(port_no);
if (aged_event_count > 0 &&
eth_dev[port_no] &&
@@ -1990,7 +1990,7 @@ static int port_event_service(void *context)
rte_eth_dev_callback_process(eth_dev[port_no],
RTE_ETH_EVENT_FLOW_AGED,
NULL);
- flm_age_event_clear(port_no);
+ nthw_flm_age_event_clear(port_no);
do_wait = false;
}
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 07/16] net/ntnic: change prefix nt_ to prefix nthw_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (5 preceding siblings ...)
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 08/16] net/ntnic: change prefix ntlog_ to prefix nthw_log Serhii Iliushyk
` (8 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
change prefix nt_ to prefix nthw_ to specify that this is related to
Napatech hardware.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
.../net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 2 +-
drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 2 +-
.../link_mgmt/link_100g/nt4ga_link_100g.c | 12 ++---
.../link_agx_100g/nt4ga_agx_link_100g.c | 16 +++----
drivers/net/ntnic/nim/i2c_nim.c | 4 +-
.../nt200a0x/reset/nthw_fpga_rst_nt200a0x.c | 2 +-
.../core/nt400dxx/reset/nthw_fpga_rst9574.c | 18 ++++----
.../nt400dxx/reset/nthw_fpga_rst_nt400dxx.c | 32 ++++++-------
drivers/net/ntnic/nthw/core/nthw_fpga.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_i2cm.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_igam.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_iic.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_mac_pcs.c | 6 +--
drivers/net/ntnic/nthw/core/nthw_phy_tile.c | 46 +++++++++----------
.../net/ntnic/nthw/core/nthw_si5332_si5156.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_si5340.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_spi_v3.c | 12 ++---
.../profile_inline/flow_api_profile_inline.c | 18 ++++----
.../net/ntnic/nthw/model/nthw_fpga_model.c | 2 +-
drivers/net/ntnic/nthw/nthw_rac.c | 8 ++--
drivers/net/ntnic/ntnic_ethdev.c | 42 +++++++++--------
drivers/net/ntnic/ntnic_vfio.c | 16 +++----
drivers/net/ntnic/ntnic_vfio.h | 10 ++--
drivers/net/ntnic/ntutil/nt_util.c | 22 ++++-----
drivers/net/ntnic/ntutil/nt_util.h | 18 ++++----
25 files changed, 154 insertions(+), 152 deletions(-)
diff --git a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
index ff83ba69f7..9d0d77dcc8 100644
--- a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
+++ b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
@@ -128,7 +128,7 @@ static int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
int numa_node = p_adapter_info->fpga_info.numa_node;
/* FPGA needs a 16K alignment on Statistics */
- p_dma = nt_dma_alloc(n_stat_size, 0x4000, numa_node);
+ p_dma = nthw_dma_alloc(n_stat_size, 0x4000, numa_node);
if (!p_dma) {
NT_LOG_DBGX(ERR, NTNIC, "p_dma alloc failed");
diff --git a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
index 107fe91394..7b2e2e53fc 100644
--- a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
+++ b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
@@ -485,7 +485,7 @@ static int dbs_wait_hw_queue_shutdown(struct nthw_virt_queue *vq, int rx)
if (err) {
if (err == -ENOTSUP) {
- nt_os_wait_usec(200000);
+ nthw_os_wait_usec(200000);
return 0;
}
diff --git a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
index 21e95d84bd..2c7a88aed9 100644
--- a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
@@ -50,9 +50,9 @@ static int _reset_rx(adapter_info_t *drv, nthw_mac_pcs_t *mac_pcs)
(void)drv;
nthw_mac_pcs_rx_path_rst(mac_pcs, true);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
nthw_mac_pcs_rx_path_rst(mac_pcs, false);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
return 0;
}
@@ -110,7 +110,7 @@ static void _set_loopback(struct adapter_info_s *p_adapter_info,
/* After changing the loopback the system must be properly reset */
_reset_rx(p_adapter_info, mac_pcs);
- nt_os_wait_usec(10000); /* 10ms - arbitrary choice */
+ nthw_os_wait_usec(10000); /* 10ms - arbitrary choice */
if (!nthw_mac_pcs_is_rx_path_rst(mac_pcs)) {
nthw_mac_pcs_reset_bip_counters(mac_pcs);
@@ -286,14 +286,14 @@ static int _create_nim(adapter_info_t *drv, int port, bool enable)
*/
NT_LOG(DBG, NTNIC, "%s: Performing NIM reset", drv->mp_port_id_str[port]);
nthw_gpio_phy_set_reset(gpio_phy, (uint8_t)port, true);
- nt_os_wait_usec(100000);/* pause 0.1s */
+ nthw_os_wait_usec(100000);/* pause 0.1s */
nthw_gpio_phy_set_reset(gpio_phy, (uint8_t)port, false);
/*
* Wait a little after a module has been inserted before trying to access I2C
* data, otherwise the module will not respond correctly.
*/
- nt_os_wait_usec(1000000); /* pause 1.0s */
+ nthw_os_wait_usec(1000000); /* pause 1.0s */
if (!_nim_is_present(gpio_phy, (uint8_t)port)) {
NT_LOG(DBG, NTNIC, "%s: NIM module is no longer absent!",
@@ -650,7 +650,7 @@ static int _common_ptp_nim_state_machine(void *data)
} /* end-for */
if (rte_service_runstate_get(adapter_mon_srv->id))
- nt_os_wait_usec(5 * 100000U); /* 5 x 0.1s = 0.5s */
+ nthw_os_wait_usec(5 * 100000U); /* 5 x 0.1s = 0.5s */
return 0;
}
diff --git a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
index c8b7912e26..b700a9e76e 100644
--- a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
@@ -93,17 +93,17 @@ static void phy_tx_path_rst(adapter_info_t *drv, int port, bool reset)
static void phy_reset_rx(adapter_info_t *drv, int port)
{
phy_rx_path_rst(drv, port, true);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
phy_rx_path_rst(drv, port, false);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
}
static void phy_reset_tx(adapter_info_t *drv, int port)
{
phy_tx_path_rst(drv, port, true);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
phy_tx_path_rst(drv, port, false);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
}
static int phy_set_host_loopback(adapter_info_t *drv, int port, loopback_host_t loopback)
@@ -499,7 +499,7 @@ set_loopback(struct adapter_info_s *p_adapter_info, int port, uint32_t mode, uin
/* After changing the loopback the system must be properly reset */
phy_reset_rx(p_adapter_info, port);
phy_reset_tx(p_adapter_info, port);
- nt_os_wait_usec(10000); /* 10ms - arbitrary choice */
+ nthw_os_wait_usec(10000); /* 10ms - arbitrary choice */
}
static void port_disable(adapter_info_t *drv, int port)
@@ -547,14 +547,14 @@ static int create_nim(adapter_info_t *drv, int port, bool enable)
NT_LOG(DBG, NTNIC, "%s: Performing NIM reset", drv->mp_port_id_str[port]);
nim_set_reset(nim_ctx, (uint8_t)port, true);
- nt_os_wait_usec(100000);/* pause 0.1s */
+ nthw_os_wait_usec(100000);/* pause 0.1s */
nim_set_reset(nim_ctx, (uint8_t)port, false);
/*
* Wait a little after a module has been inserted before trying to access I2C
* data, otherwise the module will not respond correctly.
*/
- nt_os_wait_usec(1000000); /* pause 1.0s */
+ nthw_os_wait_usec(1000000); /* pause 1.0s */
res = nthw_construct_and_preinit_nim(nim_ctx, NULL);
@@ -941,7 +941,7 @@ static int _common_ptp_nim_state_machine(void *data)
}
if (rte_service_runstate_get(adapter_mon_srv->id))
- nt_os_wait_usec(5 * 100000U); /* 5 x 0.1s = 0.5s */
+ nthw_os_wait_usec(5 * 100000U); /* 5 x 0.1s = 0.5s */
return 0;
}
diff --git a/drivers/net/ntnic/nim/i2c_nim.c b/drivers/net/ntnic/nim/i2c_nim.c
index 4fd882b8c9..a394b4c5d4 100644
--- a/drivers/net/ntnic/nim/i2c_nim.c
+++ b/drivers/net/ntnic/nim/i2c_nim.c
@@ -704,7 +704,7 @@ static void qsfp28_wait_for_ready_after_reset(nim_i2c_ctx_p ctx)
* Probably because access to the paged address space is required.
*/
if (!init_complete_flag_present) {
- nt_os_wait_usec(500000);
+ nthw_os_wait_usec(500000);
return;
}
@@ -724,7 +724,7 @@ static void qsfp28_wait_for_ready_after_reset(nim_i2c_ctx_p ctx)
break;
}
- nt_os_wait_usec(100000);/* 100 ms */
+ nthw_os_wait_usec(100000);/* 100 ms */
count++;
}
}
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
index cc6f7d13b5..34527b0cca 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
@@ -197,7 +197,7 @@ static int nthw_fpga_rst_nt200a0x_wait_sdc_calibrated(nthw_fpga_t *p_fpga,
* reset DDR and perform calibration retry
*/
nthw_field_set_flush(p->mp_fld_rst_ddr4); /* Reset DDR PLL */
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
nthw_field_clr_flush(p->mp_fld_rst_ddr4);
n_retry_cnt++;
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
index 8cad9fac5a..28769e3aa5 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
@@ -150,7 +150,7 @@ static int nthw_fpga_rst9574_wait_ddr4_calibration_complete(struct fpga_info_s *
complete = nthw_fpga_rst9574_get_ddr4_calib_complete_stat(p_rst);
if (!complete)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
timeout--;
@@ -187,7 +187,7 @@ static int nthw_fpga_rst9574_wait_phy_ftile_rdy(struct fpga_info_s *p_fpga_info,
complete = nthw_fpga_rst9574_get_phy_ftile_rdy_stat(p_rst);
if (!complete) {
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
} else {
NT_LOG(DBG, NTHW, "%s: PHY FTILE ready, margin to timeout %u",
@@ -221,7 +221,7 @@ static int nthw_fpga_rst9574_wait_phy_ftile_rst_done(struct fpga_info_s *p_fpga_
complete = nthw_fpga_rst9574_get_phy_ftile_rst_done_stat(p_rst);
if (!complete)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
timeout--;
@@ -251,7 +251,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
/*
* Wait a while before waiting for deasserting ddr4 reset
*/
- nt_os_wait_usec(2000);
+ nthw_os_wait_usec(2000);
/* (1) De-RTE_ASSERT DDR4 reset: */
NT_LOG(DBG, NTHW, "%s: %s: De-asserting DDR4 reset", p_adapter_id_str, __func__);
@@ -261,7 +261,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
* Wait a while before waiting for calibration complete, since calibration complete
* is true while ddr4 is in reset
*/
- nt_os_wait_usec(2000);
+ nthw_os_wait_usec(2000);
/* (2) Wait until DDR4 calibration complete */
res = nthw_fpga_rst9574_wait_ddr4_calibration_complete(p_fpga_info, p_rst);
@@ -273,7 +273,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
nthw_fpga_rst9574_set_ddr4_calib_complete_latch(p_rst, 1);
/* Wait for phy to settle.*/
- nt_os_wait_usec(20000);
+ nthw_os_wait_usec(20000);
/* (4) Ensure all latched status bits are still set: */
if (!nthw_fpga_rst9574_get_ddr4_calib_complete_latch(p_rst)) {
@@ -301,7 +301,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
__func__);
nthw_fpga_rst9574_phy_ftile_rst(p_rst, 0);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* (7) Wait until PHY_FTILE ready */
if (nthw_fpga_rst9574_wait_phy_ftile_rdy(p_fpga_info, p_rst) != -1) {
success = true;
@@ -331,7 +331,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
int32_t count = 1000;
do {
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
} while (!nthw_phy_tile_get_port_status_reset_ack(p_phy_tile, i) &&
(--count > 0));
@@ -343,7 +343,7 @@ static int nthw_fpga_rst9574_product_reset(struct fpga_info_s *p_fpga_info,
/* Active low */
nthw_phy_tile_set_port_config_rst(p_phy_tile, i, 1);
- nt_os_wait_usec(20000);
+ nthw_os_wait_usec(20000);
}
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
index d9c4281eeb..d158135c17 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
@@ -58,13 +58,13 @@ static int nthw_fpga_rst_nt400dxx_init(struct fpga_info_s *p_fpga_info)
/* (b1) Reset platform. It is released later */
nthw_prm_nt400dxx_platform_rst(p_fpga_info->mp_nthw_agx.p_prm, 1);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* (C) Reset peripherals and release the reset */
nthw_prm_nt400dxx_periph_rst(p_fpga_info->mp_nthw_agx.p_prm, 1);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
nthw_prm_nt400dxx_periph_rst(p_fpga_info->mp_nthw_agx.p_prm, 0);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
res = nthw_fpga_avr_probe(p_fpga, 0);
@@ -155,7 +155,7 @@ static int nthw_fpga_rst_nt400dxx_init(struct fpga_info_s *p_fpga_info)
/* Enable power supply to NIMs */
nthw_pcal6416a_write(p_fpga_info->mp_nthw_agx.p_io_nim, 8, 1);
- nt_os_wait_usec(100000);/* 100ms */
+ nthw_os_wait_usec(100000);/* 100ms */
/* Check that power supply turned on. Warn if it didn't. */
uint8_t port_power_ok;
@@ -225,7 +225,7 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
/* (F) Check that the system PLL is ready. */
for (int i = 1000; i >= 0; i--) {
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
data = nthw_igam_read(p_igam, 0xffff4);
if (data == 0x80000000 || data == 0xA0000000) {
@@ -251,7 +251,7 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
nthw_igam_set_ctrl_forward_rst(p_igam,
0); /* Ensure that the Avalon bus is not */
/* reset at every driver re-load. */
- nt_os_wait_usec(1000000);
+ nthw_os_wait_usec(1000000);
NT_LOG(DBG, NTHW, "%s: IGAM module not used.", p_adapter_id_str);
}
@@ -267,14 +267,14 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
if (p_fpga_info->mp_nthw_agx.tcxo_present && p_fpga_info->mp_nthw_agx.tcxo_capable) {
nthw_pcm_nt400dxx_set_ts_pll_recal(p_pcm, 1);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
nthw_pcm_nt400dxx_set_ts_pll_recal(p_pcm, 0);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
}
/* (I) Wait for TS PLL locked. */
for (int i = 1000; i >= 0; i--) {
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
if (nthw_pcm_nt400dxx_get_ts_pll_locked_stat(p_pcm))
break;
@@ -320,9 +320,9 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
if (res == 0)
NT_LOG(DBG, NTHW, "%s: Hif module found", p_fpga_info->mp_adapter_id_str);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
nthw_hif_force_soft_reset(p_nthw_hif);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
nthw_hif_delete(p_nthw_hif);
/* (L) De-RTE_ASSERT platform reset. */
@@ -354,7 +354,7 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
/* (F) Check that the system PLL is ready. */
for (int i = 1000; i >= 0; i--) {
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
if (nthw_phy_tile_get_sys_pll_get_rdy(p_phy_tile) &&
nthw_phy_tile_get_sys_pll_system_pll_lock(p_phy_tile)) {
@@ -363,7 +363,7 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
if (i == 500) {
nthw_phy_tile_set_sys_pll_force_rst(p_phy_tile, 1);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
nthw_phy_tile_set_sys_pll_force_rst(p_phy_tile, 0);
NT_LOG_DBGX(DBG,
NTHW,
@@ -380,13 +380,13 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
}
}
- nt_os_wait_usec(100000);/* 100 ms */
+ nthw_os_wait_usec(100000);/* 100 ms */
uint32_t fgt_enable = 0x0d; /* FGT 0, 2 & 3 */
nthw_phy_tile_set_sys_pll_en_ref_clk_fgt(p_phy_tile, fgt_enable);
for (int i = 1000; i >= 0; i--) {
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
if (nthw_phy_tile_get_sys_pll_ref_clk_fgt_enabled(p_phy_tile) ==
fgt_enable) {
@@ -395,7 +395,7 @@ static int nthw_fpga_rst_nt400dxx_reset(struct fpga_info_s *p_fpga_info)
if (i == 500) {
nthw_phy_tile_set_sys_pll_force_rst(p_phy_tile, 1);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
nthw_phy_tile_set_sys_pll_force_rst(p_phy_tile, 0);
NT_LOG_DBGX(DBG,
NTHW,
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index f9e8f90e8a..f9ae466383 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -537,7 +537,7 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info)
NT_LOG(DBG, NTHW, "%s: TSM time: %016" PRIX64 " %016" PRIX64 "\n",
p_adapter_id_str, n_time, n_ts);
- nt_os_wait_usec(1000);
+ nthw_os_wait_usec(1000);
}
}
#endif
diff --git a/drivers/net/ntnic/nthw/core/nthw_i2cm.c b/drivers/net/ntnic/nthw/core/nthw_i2cm.c
index 353fb3f82a..1b98fa4ca3 100644
--- a/drivers/net/ntnic/nthw/core/nthw_i2cm.c
+++ b/drivers/net/ntnic/nthw/core/nthw_i2cm.c
@@ -102,7 +102,7 @@ int nthw_i2cm_init(nthw_i2cm_t *p, nthw_fpga_t *p_fpga, int n_i2c_instance)
NT_I2C_CMD_STOP | NT_I2C_CMD_NACK);
NT_LOG(INF, NTHW, "%s: %s init done", p_adapter_id_str, __PRETTY_FUNCTION__);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* Initialize mutex */
rte_spinlock_init(&p->i2cmmutex);
@@ -118,7 +118,7 @@ static bool nthw_i2cm_ready(nthw_i2cm_t *p, bool wait_for_ack)
uint32_t status = nthw_field_get_updated(p->mp_fld_cmd_status_cmd_status);
uint32_t ready = (status & flags) == 0U;
/* MUST have a short break to avoid time-outs, even if ready == true */
- nt_os_wait_usec(SLEEP_USECS);
+ nthw_os_wait_usec(SLEEP_USECS);
if (ready)
return true;
diff --git a/drivers/net/ntnic/nthw/core/nthw_igam.c b/drivers/net/ntnic/nthw/core/nthw_igam.c
index 385282298a..4a672daeb3 100644
--- a/drivers/net/ntnic/nthw/core/nthw_igam.c
+++ b/drivers/net/ntnic/nthw/core/nthw_igam.c
@@ -68,7 +68,7 @@ uint32_t nthw_igam_read(nthw_igam_t *p, uint32_t address)
nthw_field_set_val_flush32(p->mp_fld_base_ptr, address);
while (nthw_field_get_updated(p->mp_fld_base_busy) == 1)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
return nthw_field_get_updated(p->mp_fld_data_data);
}
@@ -81,7 +81,7 @@ void nthw_igam_write(nthw_igam_t *p, uint32_t address, uint32_t data)
nthw_field_set_val_flush32(p->mp_fld_base_cmd, 1);
while (nthw_field_get_updated(p->mp_fld_base_busy) == 1)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
}
void nthw_igam_set_ctrl_forward_rst(nthw_igam_t *p, uint32_t value)
diff --git a/drivers/net/ntnic/nthw/core/nthw_iic.c b/drivers/net/ntnic/nthw/core/nthw_iic.c
index 7a2247e371..17b7c1a079 100644
--- a/drivers/net/ntnic/nthw/core/nthw_iic.c
+++ b/drivers/net/ntnic/nthw/core/nthw_iic.c
@@ -14,7 +14,7 @@
#define I2C_TRANSMIT_WR (0x00)
#define I2C_TRANSMIT_RD (0x01)
-#define I2C_WAIT_US(x) nt_os_wait_usec(x)
+#define I2C_WAIT_US(x) nthw_os_wait_usec(x)
/*
* Minimum timing values for I2C for a Marvel 88E11111 Phy.
diff --git a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
index 4a7b7b9549..b6c1a9a702 100644
--- a/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
+++ b/drivers/net/ntnic/nthw/core/nthw_mac_pcs.c
@@ -588,11 +588,11 @@ void nthw_mac_pcs_set_fec(nthw_mac_pcs_t *p, bool enable)
/* Both Rx and Tx must be reset for new FEC state to become active */
nthw_mac_pcs_rx_path_rst(p, true);
nthw_mac_pcs_tx_path_rst(p, true);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
nthw_mac_pcs_rx_path_rst(p, false);
nthw_mac_pcs_tx_path_rst(p, false);
- nt_os_wait_usec(10000); /* 10ms */
+ nthw_os_wait_usec(10000); /* 10ms */
}
bool nthw_mac_pcs_get_fec_bypass(nthw_mac_pcs_t *p)
@@ -740,7 +740,7 @@ void nthw_mac_pcs_set_receiver_equalization_mode(nthw_mac_pcs_t *p, uint8_t mode
nthw_field_set_val32(p->mp_field_gty_ctl_rx_equa_rst2, 1);
nthw_field_set_val_flush32(p->mp_field_gty_ctl_rx_equa_rst3, 1);
- nt_os_wait_usec(1000); /* 1ms */
+ nthw_os_wait_usec(1000); /* 1ms */
nthw_field_set_val32(p->mp_field_gty_ctl_rx_equa_rst0, 0);
nthw_field_set_val32(p->mp_field_gty_ctl_rx_equa_rst1, 0);
diff --git a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
index 5e8055f0e3..8a7236d94f 100644
--- a/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
+++ b/drivers/net/ntnic/nthw/core/nthw_phy_tile.c
@@ -683,7 +683,7 @@ void nthw_phy_tile_set_rx_reset(nthw_phy_tile_t *p, uint8_t intf_no, bool reset)
int32_t count = 1000;
do {
- nt_os_wait_usec(1000); /* 1ms */
+ nthw_os_wait_usec(1000); /* 1ms */
} while (nthw_field_get_updated(p->mp_fld_port_status_rx_reset_ackn
[intf_no]) && (--count > 0));
@@ -711,7 +711,7 @@ void nthw_phy_tile_set_tx_reset(nthw_phy_tile_t *p, uint8_t intf_no, bool reset)
int32_t count = 1000;
do {
- nt_os_wait_usec(1000); /* 1ms */
+ nthw_os_wait_usec(1000); /* 1ms */
} while (nthw_field_get_updated(p->mp_fld_port_status_tx_reset_ackn
[intf_no]) && (--count > 0));
@@ -734,7 +734,7 @@ uint32_t nthw_phy_tile_read_xcvr(nthw_phy_tile_t *p, uint8_t intf_no, uint8_t la
nthw_field_set_val_flush32(p->mp_fld_port_xcvr_base_ptr[intf_no][lane], address);
while (nthw_field_get_updated(p->mp_fld_port_xcvr_base_busy[intf_no][lane]) == 1)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
return nthw_field_get_updated(p->mp_fld_port_xcvr_data_data[intf_no][lane]);
}
@@ -749,7 +749,7 @@ void nthw_phy_tile_write_xcvr(nthw_phy_tile_t *p, uint8_t intf_no, uint8_t lane,
while (nthw_field_get_updated(p->mp_fld_port_xcvr_base_busy[intf_no][lane]) == 1)
/* NT_LOG(INF, NTHW, "busy"); */
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
}
static uint32_t nthw_phy_tile_read_dyn_reconfig(nthw_phy_tile_t *p, uint32_t address)
@@ -759,7 +759,7 @@ static uint32_t nthw_phy_tile_read_dyn_reconfig(nthw_phy_tile_t *p, uint32_t add
nthw_field_set_val_flush32(p->mp_fld_dyn_reconfig_base_ptr, address);
while (nthw_field_get_updated(p->mp_fld_dyn_reconfig_base_busy) == 1)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
uint32_t value = nthw_field_get_updated(p->mp_fld_dyn_reconfig_data_data);
/*
@@ -781,7 +781,7 @@ static void nthw_phy_tile_write_dyn_reconfig(nthw_phy_tile_t *p, uint32_t addres
while (nthw_field_get_updated(p->mp_fld_dyn_reconfig_base_busy) == 1)
/* NT_LOG(INF, NTHW, "busy"); */
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
}
static uint32_t nthw_phy_tile_cpi_request(nthw_phy_tile_t *p, uint8_t intf_no, uint8_t lane,
@@ -803,7 +803,7 @@ static uint32_t nthw_phy_tile_cpi_request(nthw_phy_tile_t *p, uint8_t intf_no, u
nthw_phy_tile_write_xcvr(p, intf_no, lane, link_addr + lane_offset, cpi_cmd);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
for (int i = 20; i >= 0; i--) {
data = nthw_phy_tile_read_xcvr(p, intf_no, lane, phy_addr + lane_offset);
@@ -815,7 +815,7 @@ static uint32_t nthw_phy_tile_cpi_request(nthw_phy_tile_t *p, uint8_t intf_no, u
if (((value & bit_cpi_assert) == cpi_assert) && ((value & cpi_in_reset) == 0))
break;
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
if (i == 0)
NT_LOG(ERR, NTHW, "Time out");
@@ -961,7 +961,7 @@ static uint32_t nthw_phy_tile_read_eth(nthw_phy_tile_t *p, uint8_t intf_no, uint
nthw_field_set_val_flush32(p->mp_fld_port_eth_base_ptr[intf_no], address);
while (nthw_field_get_updated(p->mp_fld_port_eth_base_busy[intf_no]) == 1)
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
return nthw_field_get_updated(p->mp_fld_port_eth_data_data[intf_no]);
}
@@ -976,7 +976,7 @@ static void nthw_phy_tile_write_eth(nthw_phy_tile_t *p, uint8_t intf_no,
while (nthw_field_get_updated(p->mp_fld_port_eth_base_busy[intf_no]) == 1)
/* NT_LOG(INF, NTHW, "busy"); */
- nt_os_wait_usec(100);
+ nthw_os_wait_usec(100);
}
bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enable)
@@ -1047,7 +1047,7 @@ bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enabl
nthw_phy_tile_write_eth(p, intf_no, eth_soft_csr2,
(0 << 9) + (0 << 6) + (0 << 3) + (final_fec_profile << 0));
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
nthw_phy_tile_set_reset(p, intf_no, false);
nthw_phy_tile_set_tx_reset(p, intf_no, false);
@@ -1074,7 +1074,7 @@ bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enabl
NT_LOG(DBG, NTHW, "intf_no %u: Step 1 Wait for DR NIOS", intf_no);
while ((nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_trigger_reg) & 0x02) != 0x02)
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* Step 2: Triggering Reconfiguration */
NT_LOG(DBG, NTHW, "intf_no %u: Step 2: Triggering Reconfiguration", intf_no);
@@ -1082,12 +1082,12 @@ bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enabl
nthw_phy_tile_set_reset(p, intf_no, true);
nthw_phy_tile_set_rx_reset(p, intf_no, true);
nthw_phy_tile_set_tx_reset(p, intf_no, true);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* Disable original profile */
nthw_phy_tile_write_dyn_reconfig(p, dyn_rcfg_dr_next_profile_0_reg,
(1U << 18) + (0U << 15) + original_dr_profile_id);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
NT_LOG(DBG, NTHW, "intf_no %u: dyn_rcfg_dr_next_profile_0_reg: %#010x", intf_no,
nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_next_profile_0_reg));
@@ -1098,7 +1098,7 @@ bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enabl
* Enable profile 2 and terminate dyn reconfig by
* setting next profile to 0 and deactivate it
*/
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
NT_LOG(DBG, NTHW, "intf_no %u: dyn_rcfg_dr_next_profile_1_reg: %#010x", intf_no,
nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_next_profile_1_reg));
@@ -1110,38 +1110,38 @@ bool nthw_phy_tile_configure_fec(nthw_phy_tile_t *p, uint8_t intf_no, bool enabl
nthw_phy_tile_write_dyn_reconfig(p, dyn_rcfg_dr_next_profile_2_reg,
(0U << 15) + neutral_dr_profile + (0U << 31) +
(neutral_dr_profile << 16));
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
NT_LOG(DBG, NTHW, "intf_no %u: dyn_rcfg_dr_next_profile_2_reg: %#010x", intf_no,
nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_next_profile_2_reg));
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* Step 3: Trigger DR interrupt */
NT_LOG(DBG, NTHW, "intf_no %u: Step 3: Trigger DR interrupt", intf_no);
nthw_phy_tile_write_dyn_reconfig(p, dyn_rcfg_dr_trigger_reg, 0x00000001);
- nt_os_wait_usec(1000000);
+ nthw_os_wait_usec(1000000);
/* Step 4: Wait for interrupt Acknowledge */
NT_LOG(DBG, NTHW, "intf_no %u: Step 4: Wait for interrupt Acknowledge", intf_no);
while ((nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_trigger_reg) & 0x01) != 0x00)
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
/* Step 5: Wait Until DR config is done */
NT_LOG(DBG, NTHW, "intf_no %u: Step 5: Wait Until DR config is done", intf_no);
while ((nthw_phy_tile_read_dyn_reconfig(p, dyn_rcfg_dr_trigger_reg) & 0x02) != 0x02)
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
- nt_os_wait_usec(1000000);
+ nthw_os_wait_usec(1000000);
/* Write Fec status to scratch register */
nthw_phy_tile_write_fec_enabled_by_scratch(p, intf_no, enable);
- nt_os_wait_usec(1000000);
+ nthw_os_wait_usec(1000000);
nthw_phy_tile_set_reset(p, intf_no, false);
nthw_phy_tile_set_tx_reset(p, intf_no, false);
diff --git a/drivers/net/ntnic/nthw/core/nthw_si5332_si5156.c b/drivers/net/ntnic/nthw/core/nthw_si5332_si5156.c
index 537d58afb7..22c2c74a4d 100644
--- a/drivers/net/ntnic/nthw/core/nthw_si5332_si5156.c
+++ b/drivers/net/ntnic/nthw/core/nthw_si5332_si5156.c
@@ -42,7 +42,7 @@ int nthw_pca9849_set_channel(nthw_pca9849_t *p, uint8_t channel)
return res;
p->m_current_channel = channel;
- nt_os_wait_usec(10000);
+ nthw_os_wait_usec(10000);
}
return 0;
diff --git a/drivers/net/ntnic/nthw/core/nthw_si5340.c b/drivers/net/ntnic/nthw/core/nthw_si5340.c
index 27f8653c9b..02674c06f2 100644
--- a/drivers/net/ntnic/nthw/core/nthw_si5340.c
+++ b/drivers/net/ntnic/nthw/core/nthw_si5340.c
@@ -121,7 +121,7 @@ static int nthw_si5340_cfg(nthw_si5340_t *p, const void *p_data, int data_cnt,
if (addr == 0x0006) {
/* Wait 300ms before continuing. See NT200E3-2-PTP_U23_Si5340_adr0_v2.h */
- nt_os_wait_usec(300000);
+ nthw_os_wait_usec(300000);
}
nthw_si5340_write(p, addr, value);
@@ -167,7 +167,7 @@ static int nthw_si5340_config(nthw_si5340_t *p, const void *p_data, int data_cnt
break;
}
- nt_os_wait_usec(1000000); /* 1 sec */
+ nthw_os_wait_usec(1000000); /* 1 sec */
}
if (!success) {
diff --git a/drivers/net/ntnic/nthw/core/nthw_spi_v3.c b/drivers/net/ntnic/nthw/core/nthw_spi_v3.c
index a995b1fb6e..afa037756e 100644
--- a/drivers/net/ntnic/nthw/core/nthw_spi_v3.c
+++ b/drivers/net/ntnic/nthw/core/nthw_spi_v3.c
@@ -39,10 +39,10 @@ static int wait_for_tx_data_sent(nthw_spim_t *p_spim_mod, uint64_t time_out)
bool empty;
uint64_t start_time;
uint64_t cur_time;
- start_time = nt_os_get_time_monotonic_counter();
+ start_time = nthw_os_get_time_monotonic_counter();
while (true) {
- nt_os_wait_usec(1000); /* Every 1ms */
+ nthw_os_wait_usec(1000); /* Every 1ms */
result = nthw_spim_get_tx_fifo_empty(p_spim_mod, &empty);
@@ -54,7 +54,7 @@ static int wait_for_tx_data_sent(nthw_spim_t *p_spim_mod, uint64_t time_out)
if (empty)
break;
- cur_time = nt_os_get_time_monotonic_counter();
+ cur_time = nthw_os_get_time_monotonic_counter();
if ((cur_time - start_time) > time_out) {
NT_LOG(WRN, NTHW, "%s: Timed out", __func__);
@@ -74,11 +74,11 @@ static int wait_for_rx_data_ready(nthw_spis_t *p_spis_mod, uint64_t time_out)
bool empty;
uint64_t start_time;
uint64_t cur_time;
- start_time = nt_os_get_time_monotonic_counter();
+ start_time = nthw_os_get_time_monotonic_counter();
/* Wait for data to become ready in the Rx FIFO */
while (true) {
- nt_os_wait_usec(10000); /* Every 10ms */
+ nthw_os_wait_usec(10000); /* Every 10ms */
result = nthw_spis_get_rx_fifo_empty(p_spis_mod, &empty);
@@ -90,7 +90,7 @@ static int wait_for_rx_data_ready(nthw_spis_t *p_spis_mod, uint64_t time_out)
if (!empty)
break;
- cur_time = nt_os_get_time_monotonic_counter();
+ cur_time = nthw_os_get_time_monotonic_counter();
if ((cur_time - start_time) > time_out) {
NT_LOG(WRN, NTHW, "%s: Timed out", __func__);
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 1a78933b7f..6fc496e16a 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
@@ -197,7 +197,7 @@ static int flow_mtr_create_meter(struct flow_eth_dev *dev,
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
@@ -255,7 +255,7 @@ static int flow_mtr_probe_meter(struct flow_eth_dev *dev, uint8_t caller_id, uin
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
@@ -295,7 +295,7 @@ static int flow_mtr_destroy_meter(struct flow_eth_dev *dev, uint8_t caller_id, u
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
@@ -348,7 +348,7 @@ static int flm_mtr_adjust_stats(struct flow_eth_dev *dev, uint8_t caller_id, uin
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
@@ -644,7 +644,7 @@ static int flm_sdram_calibrate(struct flow_nic_dev *ndev)
if (fail_value != 0)
break;
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
}
if (!success) {
@@ -685,7 +685,7 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
break;
}
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
}
if (!success) {
@@ -709,7 +709,7 @@ static int flm_sdram_reset(struct flow_nic_dev *ndev, int enable)
break;
}
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
}
if (!success) {
@@ -976,7 +976,7 @@ static int flm_flow_programming(struct flow_handle *fh, uint32_t flm_op)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
while (learn_record == NULL) {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
learn_record =
(struct flm_v25_lrn_data_s *)
nthw_flm_lrn_queue_get_write_buffer(flm_lrn_queue_arr);
@@ -5274,7 +5274,7 @@ struct flow_handle *nthw_flow_async_create_profile_inline(struct flow_eth_dev *d
} else {
do {
- nt_os_wait_usec(1);
+ nthw_os_wait_usec(1);
status = atomic_load(&pattern_action_pair->status);
} while (status == CELL_STATUS_INITIALIZING);
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index 9e269eb69f..b9d03b4982 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -1060,7 +1060,7 @@ static int nthw_field_wait_cond32(const nthw_field_t *p, enum nthw_field_match e
if (n_poll_iterations <= 0)
return -1;
- nt_os_wait_usec(n_poll_interval);
+ nthw_os_wait_usec(n_poll_interval);
}
return 0;
diff --git a/drivers/net/ntnic/nthw/nthw_rac.c b/drivers/net/ntnic/nthw/nthw_rac.c
index 33e0caa581..4845c2b0c9 100644
--- a/drivers/net/ntnic/nthw/nthw_rac.c
+++ b/drivers/net/ntnic/nthw/nthw_rac.c
@@ -326,7 +326,7 @@ int nthw_rac_rab_setup(nthw_rac_t *p)
const struct fpga_info_s *const p_fpga_info = p->mp_fpga->p_fpga_info;
uint32_t n_dma_buf_size = 2L * RAB_DMA_BUF_CNT * sizeof(uint32_t);
- const size_t align_size = nt_util_align_size(n_dma_buf_size);
+ const size_t align_size = nthw_util_align_size(n_dma_buf_size);
int numa_node = p_fpga_info->numa_node;
uint64_t dma_addr;
uint32_t buf;
@@ -334,10 +334,10 @@ int nthw_rac_rab_setup(nthw_rac_t *p)
if (!p->m_dma) {
struct nt_dma_s *vfio_dma;
/* FPGA needs Page alignment (4K) */
- vfio_dma = nt_dma_alloc(align_size, 0x1000, numa_node);
+ vfio_dma = nthw_dma_alloc(align_size, 0x1000, numa_node);
if (vfio_dma == NULL) {
- NT_LOG(ERR, NTNIC, "nt_dma_alloc failed");
+ NT_LOG(ERR, NTNIC, "nthw_dma_alloc failed");
return -1;
}
@@ -418,7 +418,7 @@ static int nthw_rac_rab_dma_wait(nthw_rac_t *p)
uint32_t i;
for (i = 0; i < RAB_DMA_WAIT; i++) {
- nt_os_wait_usec_poll(1);
+ nthw_os_wait_usec_poll(1);
if ((p->m_dma_out_buf[p->m_dma_out_ptr_rd] & completion) == completion)
break;
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index b515a69c87..3f96a144c7 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -281,11 +281,12 @@ eth_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete __rte_unused)
nt_link_speed_t port_link_speed =
port_ops->get_link_speed(p_adapter_info, n_intf_no);
eth_dev->data->dev_link.link_speed =
- nt_link_speed_to_eth_speed_num(port_link_speed);
+ nthw_link_speed_to_eth_speed_num(port_link_speed);
nt_link_duplex_t nt_link_duplex =
port_ops->get_link_duplex(p_adapter_info, n_intf_no);
- eth_dev->data->dev_link.link_duplex = nt_link_duplex_to_eth_duplex(nt_link_duplex);
+ eth_dev->data->dev_link.link_duplex =
+ nthw_link_duplex_to_eth_duplex(nt_link_duplex);
} else {
eth_dev->data->dev_link.link_status = RTE_ETH_LINK_DOWN;
@@ -355,7 +356,7 @@ eth_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info
const uint32_t nt_port_speed_capa =
port_ops->get_link_speed_capabilities(p_adapter_info, n_intf_no);
- dev_info->speed_capa = nt_link_speed_capa_to_eth_speed_capa(nt_port_speed_capa);
+ dev_info->speed_capa = nthw_link_speed_capa_to_eth_speed_capa(nt_port_speed_capa);
}
return 0;
@@ -785,7 +786,8 @@ static int allocate_hw_virtio_queues(struct rte_eth_dev *eth_dev, int vf_num, st
uint64_t tot_alloc_size = 0x100000 + (uint64_t)buf_size * (uint64_t)num_descr;
void *virt =
- rte_malloc_socket("VirtQDescr", tot_alloc_size, nt_util_align_size(tot_alloc_size),
+ rte_malloc_socket("VirtQDescr", tot_alloc_size,
+ nthw_util_align_size(tot_alloc_size),
eth_dev->data->numa_node);
if (!virt)
@@ -820,7 +822,7 @@ static int allocate_hw_virtio_queues(struct rte_eth_dev *eth_dev, int vf_num, st
if (!virt)
return -1;
- res = nt_vfio_dma_map(vf_num, virt, &iova_addr, size);
+ res = nthw_vfio_dma_map(vf_num, virt, &iova_addr, size);
NT_LOG(DBG, NTNIC, "VFIO MMAP res %i, vf_num %i", res, vf_num);
@@ -862,7 +864,7 @@ static int allocate_hw_virtio_queues(struct rte_eth_dev *eth_dev, int vf_num, st
return -1;
}
- res = nt_vfio_dma_map(vf_num, virt_addr, &iova_addr, size);
+ res = nthw_vfio_dma_map(vf_num, virt_addr, &iova_addr, size);
NT_LOG(DBG, NTNIC,
"VFIO MMAP res %i, virt %p, iova %016"
@@ -887,7 +889,7 @@ static int allocate_hw_virtio_queues(struct rte_eth_dev *eth_dev, int vf_num, st
return 0;
} /* End of: no optimal IOMMU mapping available */
- res = nt_vfio_dma_map(vf_num, virt, &iova_addr, ONE_G_SIZE);
+ res = nthw_vfio_dma_map(vf_num, virt, &iova_addr, ONE_G_SIZE);
if (res != 0) {
NT_LOG(ERR, NTNIC, "VFIO MMAP FAILED! res %i, vf_num %i", res, vf_num);
@@ -948,7 +950,7 @@ static int deallocate_hw_virtio_queues(struct hwq_s *hwq)
void *virt = hwq->virt_queues_ctrl.virt_addr;
- int res = nt_vfio_dma_unmap(vf_num, hwq->virt_queues_ctrl.virt_addr,
+ int res = nthw_vfio_dma_unmap(vf_num, hwq->virt_queues_ctrl.virt_addr,
(uint64_t)hwq->virt_queues_ctrl.phys_addr, hwq->virt_queues_ctrl.len);
if (res != 0) {
@@ -959,7 +961,7 @@ static int deallocate_hw_virtio_queues(struct hwq_s *hwq)
if (hwq->pkt_buffers_ctrl.virt_addr != NULL &&
hwq->pkt_buffers_ctrl.phys_addr != NULL &&
hwq->pkt_buffers_ctrl.len > 0) {
- int res = nt_vfio_dma_unmap(vf_num,
+ int res = nthw_vfio_dma_unmap(vf_num,
hwq->pkt_buffers_ctrl.virt_addr,
(uint64_t)hwq->pkt_buffers_ctrl.phys_addr,
hwq->pkt_buffers_ctrl.len);
@@ -1414,7 +1416,7 @@ eth_dev_start(struct rte_eth_dev *eth_dev)
break;
}
- nt_os_wait_usec(100 * 1000);
+ nthw_os_wait_usec(100 * 1000);
}
if (internals->lpbk_mode) {
@@ -1532,7 +1534,7 @@ drv_deinit(struct drv_s *p_drv)
* 1 second to give the services a chance to see the termonation.
*/
clear_pdrv(p_drv);
- nt_os_wait_usec(1000000);
+ nthw_os_wait_usec(1000000);
/* stop statistics service */
nthw_service_del(RTE_NTNIC_SERVICE_STAT);
@@ -1995,7 +1997,7 @@ static int port_event_service(void *context)
}
if (do_wait)
- nt_os_wait_usec(10);
+ nthw_os_wait_usec(10);
count++;
do_wait = true;
@@ -2043,7 +2045,7 @@ static int adapter_flm_update_service(void *context)
}
if (profile_inline_ops->flm_update(dev) == 0)
- nt_os_wait_usec(10);
+ nthw_os_wait_usec(10);
return 0;
}
@@ -2081,7 +2083,7 @@ static int adapter_stat_service(void *context)
return 0;
}
- nt_os_wait_usec(10 * 1000);
+ nthw_os_wait_usec(10 * 1000);
nthw_stat_trigger(p_nthw_stat);
@@ -2089,7 +2091,7 @@ static int adapter_stat_service(void *context)
while (rte_service_runstate_get(stat_srv->id) &&
(*p_nthw_stat->mp_timestamp == (uint64_t)-1)) {
- nt_os_wait_usec(1 * 100);
+ nthw_os_wait_usec(1 * 100);
if ((++loop & 0x3fff) == 0) {
if (p_nt4ga_stat->mp_nthw_rpf) {
@@ -2148,7 +2150,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
/* Return statement is not necessary here to allow traffic processing by SW */
}
- nt_vfio_init();
+ nthw_vfio_init();
const struct port_ops *port_ops = get_port_ops();
if (port_ops == NULL) {
@@ -2271,7 +2273,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
}
/* Setup VFIO context */
- int vfio = nt_vfio_setup(pci_dev);
+ int vfio = nthw_vfio_setup(pci_dev);
if (vfio < 0) {
NT_LOG_DBGX(ERR, NTNIC, "%s: vfio_setup error %d",
@@ -2621,7 +2623,7 @@ nthw_pci_dev_deinit(struct rte_eth_dev *eth_dev __rte_unused)
/* let running services end Rx and Tx activity */
if (sg_ops != NULL) {
- nt_os_wait_usec(1 * 1000 * 1000);
+ nthw_os_wait_usec(1 * 1000 * 1000);
while (internals) {
for (i = internals->nb_tx_queues - 1; i >= 0; i--) {
@@ -2646,7 +2648,7 @@ nthw_pci_dev_deinit(struct rte_eth_dev *eth_dev __rte_unused)
rte_eth_dev_release_port(eth_dev);
}
- nt_vfio_remove(EXCEPTION_PATH_HID);
+ nthw_vfio_remove(EXCEPTION_PATH_HID);
return 0;
}
@@ -2697,7 +2699,7 @@ nthw_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
* flooding by OVS from multiple virtual port services - no need to be precise
*/
uint64_t now_rtc = rte_get_tsc_cycles();
- nt_os_wait_usec(10 * 1000);
+ nthw_os_wait_usec(10 * 1000);
rte_tsc_freq = 100 * (rte_get_tsc_cycles() - now_rtc);
NT_LOG_DBGX(DBG, NTNIC, "leave: ret=%d", ret);
diff --git a/drivers/net/ntnic/ntnic_vfio.c b/drivers/net/ntnic/ntnic_vfio.c
index b1e807d6fa..187829d287 100644
--- a/drivers/net/ntnic/ntnic_vfio.c
+++ b/drivers/net/ntnic/ntnic_vfio.c
@@ -47,7 +47,7 @@ vfio_get(int vf_num)
/* External API */
int
-nt_vfio_setup(struct rte_pci_device *dev)
+nthw_vfio_setup(struct rte_pci_device *dev)
{
int ret;
char devname[RTE_DEV_NAME_MAX_LEN] = { 0 };
@@ -123,7 +123,7 @@ nt_vfio_setup(struct rte_pci_device *dev)
}
int
-nt_vfio_remove(int vf_num)
+nthw_vfio_remove(int vf_num)
{
struct vfio_dev *vfio;
@@ -141,7 +141,7 @@ nt_vfio_remove(int vf_num)
}
int
-nt_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size)
+nthw_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size)
{
uint64_t gp_virt_base;
uint64_t gp_offset;
@@ -189,7 +189,7 @@ nt_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size)
}
int
-nt_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size)
+nthw_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size)
{
uint64_t gp_virt_base;
struct vfio_dev *vfio;
@@ -225,10 +225,10 @@ nt_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size
}
void
-nt_vfio_init(void)
+nthw_vfio_init(void)
{
- struct nt_util_vfio_impl s = { .vfio_dma_map = nt_vfio_dma_map,
- .vfio_dma_unmap = nt_vfio_dma_unmap
+ struct nt_util_vfio_impl s = { .vfio_dma_map = nthw_vfio_dma_map,
+ .vfio_dma_unmap = nthw_vfio_dma_unmap
};
- nt_util_vfio_init(&s);
+ nthw_util_vfio_init(&s);
}
diff --git a/drivers/net/ntnic/ntnic_vfio.h b/drivers/net/ntnic/ntnic_vfio.h
index e070e9460c..72f8165a48 100644
--- a/drivers/net/ntnic/ntnic_vfio.h
+++ b/drivers/net/ntnic/ntnic_vfio.h
@@ -11,17 +11,17 @@
#include <ethdev_pci.h>
void
-nt_vfio_init(void);
+nthw_vfio_init(void);
int
-nt_vfio_setup(struct rte_pci_device *dev);
+nthw_vfio_setup(struct rte_pci_device *dev);
int
-nt_vfio_remove(int vf_num);
+nthw_vfio_remove(int vf_num);
int
-nt_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size);
+nthw_vfio_dma_map(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size);
int
-nt_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size);
+nthw_vfio_dma_unmap(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size);
/* Find device (PF/VF) number from device address */
#endif /* _NTNIC_VFIO_H_ */
diff --git a/drivers/net/ntnic/ntutil/nt_util.c b/drivers/net/ntnic/ntutil/nt_util.c
index 18133570bb..2401aee3dc 100644
--- a/drivers/net/ntnic/ntutil/nt_util.c
+++ b/drivers/net/ntnic/ntutil/nt_util.c
@@ -17,35 +17,35 @@
static struct nt_util_vfio_impl vfio_cb;
/* uses usleep which schedules out the calling service */
-void nt_os_wait_usec(int val)
+void nthw_os_wait_usec(int val)
{
rte_delay_us_sleep(val);
}
/* spins in a waiting loop calling pause asm instruction uses RDTSC - precise wait */
-void nt_os_wait_usec_poll(int val)
+void nthw_os_wait_usec_poll(int val)
{
rte_delay_us(val);
}
-uint64_t nt_os_get_time_monotonic_counter(void)
+uint64_t nthw_os_get_time_monotonic_counter(void)
{
return rte_get_timer_cycles();
}
/* Allocation size matching minimum alignment of specified size */
-uint64_t nt_util_align_size(uint64_t size)
+uint64_t nthw_util_align_size(uint64_t size)
{
uint64_t alignment_size = 1ULL << rte_log2_u64(size);
return alignment_size;
}
-void nt_util_vfio_init(struct nt_util_vfio_impl *impl)
+void nthw_util_vfio_init(struct nt_util_vfio_impl *impl)
{
vfio_cb = *impl;
}
-struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
+struct nt_dma_s *nthw_dma_alloc(uint64_t size, uint64_t align, int numa)
{
int res;
struct nt_dma_s *vfio_addr;
@@ -65,7 +65,7 @@ struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
return NULL;
}
- res = vfio_cb.vfio_dma_map(0, addr, &vfio_addr->iova, nt_util_align_size(size));
+ res = vfio_cb.vfio_dma_map(0, addr, &vfio_addr->iova, nthw_util_align_size(size));
if (res != 0) {
rte_free(addr);
@@ -75,7 +75,7 @@ struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
}
vfio_addr->addr = (uint64_t)addr;
- vfio_addr->size = nt_util_align_size(size);
+ vfio_addr->size = nthw_util_align_size(size);
NT_LOG(DBG, GENERAL,
"VFIO DMA alloc addr=%" PRIX64 ", iova=%" PRIX64
@@ -86,7 +86,7 @@ struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa)
}
/* NOTE: please note the difference between RTE_ETH_SPEED_NUM_xxx and RTE_ETH_LINK_SPEED_xxx */
-int nt_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed)
+int nthw_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed)
{
int eth_speed_num = RTE_ETH_SPEED_NUM_NONE;
@@ -131,7 +131,7 @@ int nt_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed)
return eth_speed_num;
}
-uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa)
+uint32_t nthw_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa)
{
uint32_t eth_speed_capa = 0;
@@ -162,7 +162,7 @@ uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa)
return eth_speed_capa;
}
-int nt_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex)
+int nthw_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex)
{
int eth_link_duplex = 0;
diff --git a/drivers/net/ntnic/ntutil/nt_util.h b/drivers/net/ntnic/ntutil/nt_util.h
index 39a4956187..c889d07a10 100644
--- a/drivers/net/ntnic/ntutil/nt_util.h
+++ b/drivers/net/ntnic/ntutil/nt_util.h
@@ -32,16 +32,16 @@
#define PCIIDENT_PRINT_STR "%04x:%02x:%02x.%x"
#define BDF_TO_PCIIDENT(dom, bus, dev, fnc) (((dom) << 16) | ((bus) << 8) | ((dev) << 3) | (fnc))
-uint64_t nt_os_get_time_monotonic_counter(void);
-void nt_os_wait_usec(int val);
-void nt_os_wait_usec_poll(int val);
+uint64_t nthw_os_get_time_monotonic_counter(void);
+void nthw_os_wait_usec(int val);
+void nthw_os_wait_usec_poll(int val);
static inline int min(int a, int b)
{
return (a < b) ? a : b;
}
-uint64_t nt_util_align_size(uint64_t size);
+uint64_t nthw_util_align_size(uint64_t size);
struct nt_dma_s {
uint64_t iova;
@@ -54,17 +54,17 @@ struct port_link_speed {
int link_speed;
};
-struct nt_dma_s *nt_dma_alloc(uint64_t size, uint64_t align, int numa);
+struct nt_dma_s *nthw_dma_alloc(uint64_t size, uint64_t align, int numa);
struct nt_util_vfio_impl {
int (*vfio_dma_map)(int vf_num, void *virt_addr, uint64_t *iova_addr, uint64_t size);
int (*vfio_dma_unmap)(int vf_num, void *virt_addr, uint64_t iova_addr, uint64_t size);
};
-void nt_util_vfio_init(struct nt_util_vfio_impl *impl);
+void nthw_util_vfio_init(struct nt_util_vfio_impl *impl);
-int nt_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed);
-uint32_t nt_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa);
-int nt_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex);
+int nthw_link_speed_to_eth_speed_num(enum nt_link_speed_e nt_link_speed);
+uint32_t nthw_link_speed_capa_to_eth_speed_capa(int nt_link_speed_capa);
+int nthw_link_duplex_to_eth_duplex(enum nt_link_duplex_e nt_link_duplex);
int nthw_string_to_u32(const char *key_str __rte_unused, const char *value_str, void *extra_args);
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 08/16] net/ntnic: change prefix ntlog_ to prefix nthw_log
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (6 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 07/16] net/ntnic: change prefix nt_ to prefix nthw_ Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 09/16] net/ntnic: change prefix km_ to prefix nthw_km_ Serhii Iliushyk
` (7 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change prefix ntlog_ to prefix nthw_log for logging functions.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
.../net/ntnic/nthw/model/nthw_fpga_model.c | 20 +++++++++----------
drivers/net/ntnic/nthw/nthw_rac.c | 20 +++++++++----------
drivers/net/ntnic/ntlog/ntlog.c | 6 +++---
drivers/net/ntnic/ntlog/ntlog.h | 6 +++---
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
index b9d03b4982..1dc604fe65 100644
--- a/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
+++ b/drivers/net/ntnic/nthw/model/nthw_fpga_model.c
@@ -727,17 +727,17 @@ void nthw_register_update(const nthw_register_t *p)
uint32_t i = len;
uint32_t *ptr = p_data;
(void)ptr;
- char *tmp_string = ntlog_helper_str_alloc("Register::read");
- ntlog_helper_str_add(tmp_string,
+ char *tmp_string = nthw_log_helper_str_alloc("Register::read");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: %s, Bus: %s, Addr: 0x%08X, Cnt: %d, Data:",
p_dev_name, p_bus_name, addr, len);
while (i--)
- ntlog_helper_str_add(tmp_string, " 0x%08X", *ptr++);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", *ptr++);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
}
@@ -780,18 +780,18 @@ void nthw_register_flush(const nthw_register_t *p, uint32_t cnt)
if (p->mn_debug_mode & NTHW_REG_DEBUG_ON_WRITE) {
uint32_t i = len * cnt;
uint32_t *ptr = p_data;
- char *tmp_string = ntlog_helper_str_alloc("Register::write");
+ char *tmp_string = nthw_log_helper_str_alloc("Register::write");
- ntlog_helper_str_add(tmp_string,
+ nthw_log_helper_str_add(tmp_string,
"(Dev: %s, Bus: %s, Addr: 0x%08X, Cnt: %d, Data:",
p_dev_name, p_bus_name, addr, i);
while (i--)
- ntlog_helper_str_add(tmp_string, " 0x%08X", *ptr++);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", *ptr++);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
rc = nthw_register_write_data(p, cnt);
diff --git a/drivers/net/ntnic/nthw/nthw_rac.c b/drivers/net/ntnic/nthw/nthw_rac.c
index 4845c2b0c9..a2a96794da 100644
--- a/drivers/net/ntnic/nthw/nthw_rac.c
+++ b/drivers/net/ntnic/nthw/nthw_rac.c
@@ -654,8 +654,8 @@ int nthw_rac_rab_write32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint
char *tmp_string;
if (trc) {
- tmp_string = ntlog_helper_str_alloc("Register::write");
- ntlog_helper_str_add(tmp_string,
+ tmp_string = nthw_log_helper_str_alloc("Register::write");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: NA, Bus: RAB%u, Addr: 0x%08X, Cnt: %d, Data:",
bus_id, address, word_cnt);
}
@@ -669,13 +669,13 @@ int nthw_rac_rab_write32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint
}
if (trc)
- ntlog_helper_str_add(tmp_string, " 0x%08X", data);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", data);
}
if (trc) {
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
@@ -840,17 +840,17 @@ int nthw_rac_rab_read32(nthw_rac_t *p, bool trc, nthw_rab_bus_id_t bus_id, uint3
}
if (trc) {
- char *tmp_string = ntlog_helper_str_alloc("Register::read");
- ntlog_helper_str_add(tmp_string,
+ char *tmp_string = nthw_log_helper_str_alloc("Register::read");
+ nthw_log_helper_str_add(tmp_string,
"(Dev: NA, Bus: RAB%u, Addr: 0x%08X, Cnt: %d, Data:",
bus_id, address, word_cnt);
for (i = 0; i < word_cnt; i++)
- ntlog_helper_str_add(tmp_string, " 0x%08X", p_data[i]);
+ nthw_log_helper_str_add(tmp_string, " 0x%08X", p_data[i]);
- ntlog_helper_str_add(tmp_string, ")");
+ nthw_log_helper_str_add(tmp_string, ")");
NT_LOG(DBG, NTHW, "%s", tmp_string);
- ntlog_helper_str_free(tmp_string);
+ nthw_log_helper_str_free(tmp_string);
}
}
diff --git a/drivers/net/ntnic/ntlog/ntlog.c b/drivers/net/ntnic/ntlog/ntlog.c
index 7b7f583364..1ee0f40286 100644
--- a/drivers/net/ntnic/ntlog/ntlog.c
+++ b/drivers/net/ntnic/ntlog/ntlog.c
@@ -16,7 +16,7 @@
#define NTLOG_HELPER_STR_SIZE_MAX (1024)
-char *ntlog_helper_str_alloc(const char *sinit)
+char *nthw_log_helper_str_alloc(const char *sinit)
{
char *s = malloc(NTLOG_HELPER_STR_SIZE_MAX);
@@ -33,7 +33,7 @@ char *ntlog_helper_str_alloc(const char *sinit)
}
__rte_format_printf(2, 0)
-void ntlog_helper_str_add(char *s, const char *format, ...)
+void nthw_log_helper_str_add(char *s, const char *format, ...)
{
if (!s)
return;
@@ -45,7 +45,7 @@ void ntlog_helper_str_add(char *s, const char *format, ...)
va_end(args);
}
-void ntlog_helper_str_free(char *s)
+void nthw_log_helper_str_free(char *s)
{
free(s);
}
diff --git a/drivers/net/ntnic/ntlog/ntlog.h b/drivers/net/ntnic/ntlog/ntlog.h
index fd839e5cff..810b07efd0 100644
--- a/drivers/net/ntnic/ntlog/ntlog.h
+++ b/drivers/net/ntnic/ntlog/ntlog.h
@@ -65,8 +65,8 @@ extern int nt_log_ntnic;
* to use when one single function call to NT_LOG is not optimal - that is
* you do not know the number of parameters at programming time or it is variable
*/
-char *ntlog_helper_str_alloc(const char *sinit);
-void ntlog_helper_str_add(char *s, const char *format, ...);
-void ntlog_helper_str_free(char *s);
+char *nthw_log_helper_str_alloc(const char *sinit);
+void nthw_log_helper_str_add(char *s, const char *format, ...);
+void nthw_log_helper_str_free(char *s);
#endif /* NTOSS_SYSTEM_NTLOG_H */
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 09/16] net/ntnic: change prefix km_ to prefix nthw_km_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (7 preceding siblings ...)
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 10/16] net/ntnic: change prefix set_ to prefix nthw_set_ Serhii Iliushyk
` (6 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change prefix km_ (key matcher) to prefix nthw_km_ for flow_api module.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/include/flow_api_engine.h | 18 ++--
drivers/net/ntnic/nthw/flow_api/flow_api.c | 4 +-
drivers/net/ntnic/nthw/flow_api/flow_kcc.c | 2 +-
drivers/net/ntnic/nthw/flow_api/flow_km.c | 16 +--
.../profile_inline/flow_api_profile_inline.c | 99 ++++++++++---------
5 files changed, 75 insertions(+), 64 deletions(-)
diff --git a/drivers/net/ntnic/include/flow_api_engine.h b/drivers/net/ntnic/include/flow_api_engine.h
index 6401c79e3c..6a27ba8e12 100644
--- a/drivers/net/ntnic/include/flow_api_engine.h
+++ b/drivers/net/ntnic/include/flow_api_engine.h
@@ -396,26 +396,26 @@ struct flow_template_table {
uint16_t caller_id;
};
-void km_attach_ndev_resource_management(struct km_flow_def_s *km, void **handle);
-void km_free_ndev_resource_management(void **handle);
+void nthw_km_attach_ndev_resource_management(struct km_flow_def_s *km, void **handle);
+void nthw_km_free_ndev_resource_management(void **handle);
-int km_add_match_elem(struct km_flow_def_s *km, uint32_t e_word[4], uint32_t e_mask[4],
+int nthw_km_add_match_elem(struct km_flow_def_s *km, uint32_t e_word[4], uint32_t e_mask[4],
uint32_t word_len, enum frame_offs_e start, int8_t offset);
-int km_key_create(struct km_flow_def_s *km, uint32_t port_id);
+int nthw_km_key_create(struct km_flow_def_s *km, uint32_t port_id);
/*
* Compares 2 KM key definitions after first collect validate and optimization.
* km is compared against an existing km1.
* if identical, km1 flow_type is returned
*/
-int km_key_compare(struct km_flow_def_s *km, struct km_flow_def_s *km1);
+int nthw_km_key_compare(struct km_flow_def_s *km, struct km_flow_def_s *km1);
-int km_rcp_set(struct km_flow_def_s *km, int index);
+int nthw_km_rcp_set(struct km_flow_def_s *km, int index);
-int km_write_data_match_entry(struct km_flow_def_s *km, uint32_t color);
-int km_clear_data_match_entry(struct km_flow_def_s *km);
+int nthw_km_write_data_match_entry(struct km_flow_def_s *km, uint32_t color);
+int nthw_km_clear_data_match_entry(struct km_flow_def_s *km);
-void kcc_free_ndev_resource_management(void **handle);
+void nthw_kcc_free_ndev_resource_mgmnt(void **handle);
/*
* Group management
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index 4c7bb4a60a..4d1c9c8d7c 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -478,8 +478,8 @@ static void flow_ndev_reset(struct flow_nic_dev *ndev)
profile_inline_ops->nthw_done_flow_mgmnt_of_ndev_profile_inline(ndev);
- km_free_ndev_resource_management(&ndev->km_res_handle);
- kcc_free_ndev_resource_management(&ndev->kcc_res_handle);
+ nthw_km_free_ndev_resource_management(&ndev->km_res_handle);
+ nthw_kcc_free_ndev_resource_mgmnt(&ndev->kcc_res_handle);
ndev->flow_unique_id_counter = 0;
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_kcc.c b/drivers/net/ntnic/nthw/flow_api/flow_kcc.c
index e99e63d9f1..47311729ea 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_kcc.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_kcc.c
@@ -8,7 +8,7 @@
#include "hw_mod_backend.h"
#include "flow_api_engine.h"
-void kcc_free_ndev_resource_management(void **handle)
+void nthw_kcc_free_ndev_resource_mgmnt(void **handle)
{
if (*handle) {
free(*handle);
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_km.c b/drivers/net/ntnic/nthw/flow_api/flow_km.c
index 1052773668..4ccd77895b 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_km.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_km.c
@@ -73,7 +73,7 @@ struct tcam_distrib_s {
static int tcam_find_mapping(struct km_flow_def_s *km);
-void km_attach_ndev_resource_management(struct km_flow_def_s *km, void **handle)
+void nthw_km_attach_ndev_resource_management(struct km_flow_def_s *km, void **handle)
{
/*
* KM entries occupied in CAM - to manage the cuckoo shuffling
@@ -100,7 +100,7 @@ void km_attach_ndev_resource_management(struct km_flow_def_s *km, void **handle)
nthw_init_hasher(km->hsh, km->be->km.nb_cam_banks, km->be->km.nb_cam_records);
}
-void km_free_ndev_resource_management(void **handle)
+void nthw_km_free_ndev_resource_management(void **handle)
{
if (*handle) {
free(*handle);
@@ -110,7 +110,7 @@ void km_free_ndev_resource_management(void **handle)
*handle = NULL;
}
-int km_add_match_elem(struct km_flow_def_s *km, uint32_t e_word[4], uint32_t e_mask[4],
+int nthw_km_add_match_elem(struct km_flow_def_s *km, uint32_t e_word[4], uint32_t e_mask[4],
uint32_t word_len, enum frame_offs_e start_id, int8_t offset)
{
/* valid word_len 1,2,4 */
@@ -173,7 +173,7 @@ static int get_word(struct km_flow_def_s *km, uint32_t size, int marked[])
return -1;
}
-int km_key_create(struct km_flow_def_s *km, uint32_t port_id)
+int nthw_km_key_create(struct km_flow_def_s *km, uint32_t port_id)
{
/*
* Create combined extractor mappings
@@ -377,7 +377,7 @@ int km_key_create(struct km_flow_def_s *km, uint32_t port_id)
return 0;
}
-int km_key_compare(struct km_flow_def_s *km, struct km_flow_def_s *km1)
+int nthw_km_key_compare(struct km_flow_def_s *km, struct km_flow_def_s *km1)
{
if (km->target != km1->target || km->num_ftype_elem != km1->num_ftype_elem ||
km->key_word_size != km1->key_word_size || km->info_set != km1->info_set)
@@ -473,7 +473,7 @@ int km_key_compare(struct km_flow_def_s *km, struct km_flow_def_s *km1)
return km1->flow_type;
}
-int km_rcp_set(struct km_flow_def_s *km, int index)
+int nthw_km_rcp_set(struct km_flow_def_s *km, int index)
{
int qw = 0;
int sw = 0;
@@ -1101,7 +1101,7 @@ static int tcam_reset_entry(struct km_flow_def_s *km)
return err;
}
-int km_write_data_match_entry(struct km_flow_def_s *km, uint32_t color)
+int nthw_km_write_data_match_entry(struct km_flow_def_s *km, uint32_t color)
{
int res = -1;
@@ -1125,7 +1125,7 @@ int km_write_data_match_entry(struct km_flow_def_s *km, uint32_t color)
return res;
}
-int km_clear_data_match_entry(struct km_flow_def_s *km)
+int nthw_km_clear_data_match_entry(struct km_flow_def_s *km)
{
int res = 0;
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 6fc496e16a..e0cdd12626 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
@@ -1725,7 +1725,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_mask[0] = 0x0fff;
sw_data[0] = implicit_vlan_vid & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1, DYN_FIRST_VLAN, 0);
+ nthw_km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1, DYN_FIRST_VLAN, 0);
set_key_def_sw(key_def, sw_counter, DYN_FIRST_VLAN, 0);
sw_counter += 1;
@@ -1874,7 +1874,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_mask[3] = ntohs(eth_mask->ether_type) << 16;
- km_add_match_elem(&fd->km,
+ nthw_km_add_match_elem(&fd->km,
&qw_data[(size_t)(qw_counter * 4)],
&qw_mask[(size_t)(qw_counter * 4)], 4, DYN_L2, 0);
set_key_def_qw(key_def, qw_counter, DYN_L2, 0);
@@ -1897,7 +1897,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_mask[0] = ntohs(eth_mask->ether_type) << 16;
sw_data[0] = ntohs(eth_spec->ether_type) << 16 & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0],
+ nthw_km_add_match_elem(&fd->km, &sw_data[0],
&sw_mask[0], 1, DYN_L2, 12);
set_key_def_sw(key_def, sw_counter, DYN_L2, 12);
sw_counter += 1;
@@ -1944,7 +1944,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
ntohs(vlan_spec->eth_proto);
sw_data[0] &= sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
+ nthw_km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
DYN_FIRST_VLAN, 2 + 4 * fd->vlans);
set_key_def_sw(key_def, sw_counter, DYN_FIRST_VLAN,
2 + 4 * fd->vlans);
@@ -1971,7 +1971,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
+ nthw_km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
DYN_FIRST_VLAN, 2 + 4 * fd->vlans);
set_key_def_qw(key_def, qw_counter, DYN_FIRST_VLAN,
2 + 4 * fd->vlans);
@@ -2066,7 +2066,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] = ntohl(ipv4_spec->hdr.src_addr) & qw_mask[2];
qw_data[3] = ntohl(ipv4_spec->hdr.dst_addr) & qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
+ nthw_km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 4);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 4);
@@ -2094,7 +2094,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_mask[0] = ntohl(ipv4_mask->hdr.src_addr);
sw_data[0] = ntohl(ipv4_spec->hdr.src_addr) & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
+ nthw_km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 12);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 12);
@@ -2115,7 +2115,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_mask[0] = ntohl(ipv4_mask->hdr.dst_addr);
sw_data[0] = ntohl(ipv4_spec->hdr.dst_addr) & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
+ nthw_km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 16);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 16);
@@ -2137,7 +2137,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_data[0] = ipv4_spec->hdr.next_proto_id
<< 16 & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
+ nthw_km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0], 1,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 8);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 8);
@@ -2208,7 +2208,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
+ nthw_km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 8);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 8);
@@ -2244,7 +2244,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
+ nthw_km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0], 4,
any_count > 0 ? DYN_TUN_L3 : DYN_L3, 24);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 24);
@@ -2259,8 +2259,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_mask[0] = ipv6_mask->hdr.proto << 8;
sw_data[0] = ipv6_spec->hdr.proto << 8 & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0],
- 1, any_count > 0 ? DYN_TUN_L3 : DYN_L3, 4);
+ nthw_km_add_match_elem(&fd->km,
+ &sw_data[0], &sw_mask[0], 1,
+ any_count > 0 ? DYN_TUN_L3 : DYN_L3, 4);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 4);
sw_counter += 1;
@@ -2286,8 +2287,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L3 : DYN_L3, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L3 : DYN_L3, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L3 : DYN_L3, 0);
qw_counter += 1;
@@ -2349,8 +2351,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
<< 16) | ntohs(udp_spec->hdr.dst_port)) &
sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0],
- 1, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &sw_data[0], &sw_mask[0], 1,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
sw_counter += 1;
@@ -2378,8 +2381,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
qw_counter += 1;
@@ -2443,8 +2447,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
<< 16) | ntohs(sctp_spec->hdr.dst_port)) &
sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0],
- 1, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &sw_data[0], &sw_mask[0], 1,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
sw_counter += 1;
@@ -2472,8 +2477,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
qw_counter += 1;
@@ -2541,7 +2547,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
icmp_spec->hdr.icmp_code << 16;
sw_data[0] &= sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0],
+ nthw_km_add_match_elem(&fd->km, &sw_data[0],
&sw_mask[0], 1, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_sw(key_def, sw_counter,
@@ -2571,8 +2577,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
qw_counter += 1;
@@ -2640,8 +2647,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
icmp_spec->code << 16;
sw_data[0] &= sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0],
- 1, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &sw_data[0], &sw_mask[0], 1,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
@@ -2670,8 +2678,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
qw_counter += 1;
@@ -2743,8 +2752,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
((ntohs(tcp_spec->hdr.src_port) << 16) |
ntohs(tcp_spec->hdr.dst_port)) & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0], &sw_mask[0],
- 1, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &sw_data[0], &sw_mask[0], 1,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_sw(key_def, sw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
sw_counter += 1;
@@ -2772,8 +2782,9 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0], &qw_mask[0],
- 4, any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
+ nthw_km_add_match_elem(&fd->km,
+ &qw_data[0], &qw_mask[0], 4,
+ any_count > 0 ? DYN_TUN_L4 : DYN_L4, 0);
set_key_def_qw(key_def, qw_counter, any_count > 0
? DYN_TUN_L4 : DYN_L4, 0);
qw_counter += 1;
@@ -2832,7 +2843,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_data[0] =
ntohl(gtp_spec->teid) & sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0],
+ nthw_km_add_match_elem(&fd->km, &sw_data[0],
&sw_mask[0], 1,
DYN_L4_PAYLOAD, 4);
set_key_def_sw(key_def, sw_counter,
@@ -2862,7 +2873,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0],
+ nthw_km_add_match_elem(&fd->km, &qw_data[0],
&qw_mask[0], 4,
DYN_L4_PAYLOAD, 4);
set_key_def_qw(key_def, qw_counter,
@@ -2916,7 +2927,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
sw_data[0] = ntohl(gtp_psc_spec->qfi) &
sw_mask[0];
- km_add_match_elem(&fd->km, &sw_data[0],
+ nthw_km_add_match_elem(&fd->km, &sw_data[0],
&sw_mask[0], 1,
DYN_L4_PAYLOAD, 14);
set_key_def_sw(key_def, sw_counter,
@@ -2946,7 +2957,7 @@ static int interpret_flow_elements(const struct flow_eth_dev *dev,
qw_data[2] &= qw_mask[2];
qw_data[3] &= qw_mask[3];
- km_add_match_elem(&fd->km, &qw_data[0],
+ nthw_km_add_match_elem(&fd->km, &qw_data[0],
&qw_mask[0], 4,
DYN_L4_PAYLOAD, 14);
set_key_def_qw(key_def, qw_counter,
@@ -3713,7 +3724,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
if (fd->km.num_ftype_elem) {
struct flow_handle *flow = dev->ndev->flow_base, *found_flow = NULL;
- if (km_key_create(&fd->km, fh->port_id)) {
+ if (nthw_km_key_create(&fd->km, fh->port_id)) {
NT_LOG(ERR, FILTER, "KM creation failed");
nthw_flow_nic_set_error(ERR_MATCH_FAILED_BY_HW_LIMITS, error);
goto error_out;
@@ -3725,7 +3736,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
while (flow) {
if (flow->type == FLOW_HANDLE_TYPE_FLOW &&
flow->fd->km.flow_type) {
- int res = km_key_compare(&fd->km, &flow->fd->km);
+ int res = nthw_km_key_compare(&fd->km, &flow->fd->km);
if (res < 0) {
/* Flow rcp and match data is identical */
@@ -3743,7 +3754,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
flow = flow->next;
}
- km_attach_ndev_resource_management(&fd->km, &dev->ndev->km_res_handle);
+ nthw_km_attach_ndev_resource_management(&fd->km, &dev->ndev->km_res_handle);
if (found_flow != NULL) {
/* Reuse existing KM RCP */
@@ -3778,7 +3789,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
goto error_out;
}
- km_rcp_set(&fd->km, rcp);
+ nthw_km_rcp_set(&fd->km, rcp);
km_rcp_data.rcp = (uint32_t)rcp;
}
}
@@ -3832,7 +3843,7 @@ static struct flow_handle *create_flow_filter(struct flow_eth_dev *dev, struct n
nthw_mod_km_rcp_flush(&dev->ndev->be, (int)km_rcp_data.rcp, 1);
- km_write_data_match_entry(&fd->km, 0);
+ nthw_km_write_data_match_entry(&fd->km, 0);
}
/* Setup Match Set */
@@ -4298,7 +4309,7 @@ int nthw_flow_destroy_locked_profile_inline(struct flow_eth_dev *dev,
NT_LOG(DBG, FILTER, "removing flow :%p", fh);
if (fh->fd->km.num_ftype_elem) {
- km_clear_data_match_entry(&fh->fd->km);
+ nthw_km_clear_data_match_entry(&fh->fd->km);
const struct hw_db_inline_km_rcp_data *other_km_rcp_data =
nthw_db_inline_find_data(dev->ndev, dev->ndev->hw_db_handle,
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 10/16] net/ntnic: change prefix set_ to prefix nthw_set_
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (8 preceding siblings ...)
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 11/16] net/ntnic: rename common hash and flow functions Serhii Iliushyk
` (5 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Change setter functions prefix from set_ to nthw_set_ for DBS module
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 50 +++++++++----------
drivers/net/ntnic/include/ntnic_dbs.h | 22 ++++----
drivers/net/ntnic/nthw/dbs/nthw_dbs.c | 22 ++++----
3 files changed, 47 insertions(+), 47 deletions(-)
diff --git a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
index 7b2e2e53fc..3257233545 100644
--- a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
+++ b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
@@ -198,7 +198,7 @@ static void dbs_init_tx_queue(nthw_dbs_t *p_nthw_dbs, uint32_t queue, uint32_t s
nthw_get_tx_init(p_nthw_dbs, &init, &dummy, &busy);
} while (busy != 0);
- set_tx_init(p_nthw_dbs, start_idx, start_ptr, INIT_QUEUE, queue);
+ nthw_set_tx_init(p_nthw_dbs, start_idx, start_ptr, INIT_QUEUE, queue);
do {
nthw_get_tx_init(p_nthw_dbs, &init, &dummy, &busy);
@@ -221,14 +221,14 @@ static int nthw_virt_queue_init(struct fpga_info_s *p_fpga_info)
if (p_nthw_dbs == NULL)
return -1;
- res = dbs_init(NULL, p_fpga, 0);/* Check that DBS exists in FPGA */
+ res = nthw_dbs_init(NULL, p_fpga, 0);/* Check that DBS exists in FPGA */
if (res) {
free(p_nthw_dbs);
return res;
}
- res = dbs_init(p_nthw_dbs, p_fpga, 0); /* Create DBS module */
+ res = nthw_dbs_init(p_nthw_dbs, p_fpga, 0); /* Create DBS module */
if (res) {
free(p_nthw_dbs);
@@ -242,7 +242,7 @@ static int nthw_virt_queue_init(struct fpga_info_s *p_fpga_info)
txvq[i].usage = NTHW_VIRTQ_UNUSED;
}
- dbs_reset(p_nthw_dbs);
+ nthw_dbs_reset(p_nthw_dbs);
for (i = 0; i < NT_DBS_RX_QUEUES_MAX; ++i)
dbs_init_rx_queue(p_nthw_dbs, i, 0, 0);
@@ -382,8 +382,8 @@ static struct nthw_virt_queue *nthw_setup_rx_virt_queue(nthw_dbs_t *p_nthw_dbs,
* 3. Configure the DBS.RX_DR_DATA memory; good idea to initialize all
* DBS_RX_QUEUES entries.
*/
- if (set_rx_dr_data(p_nthw_dbs, index, (uint64_t)desc_struct_phys_addr, host_id, qs, header,
- 0) != 0) {
+ if (nthw_set_rx_dr_data(p_nthw_dbs, index, (uint64_t)desc_struct_phys_addr,
+ host_id, qs, header, 0) != 0) {
return NULL;
}
@@ -398,9 +398,9 @@ static struct nthw_virt_queue *nthw_setup_rx_virt_queue(nthw_dbs_t *p_nthw_dbs,
int_enable = 0;
vec = 0;
istk = 0;
- NT_LOG_DBGX(DBG, NTNIC, "set_rx_uw_data int=0 irq_vector=%i", irq_vector);
+ NT_LOG_DBGX(DBG, NTNIC, "nthw_set_rx_uw_data int=0 irq_vector=%i", irq_vector);
- if (set_rx_uw_data(p_nthw_dbs, index,
+ if (nthw_set_rx_uw_data(p_nthw_dbs, index,
(uint64_t)used_struct_phys_addr,
host_id, qs, 0, int_enable, vec, istk) != 0) {
return NULL;
@@ -414,7 +414,7 @@ static struct nthw_virt_queue *nthw_setup_rx_virt_queue(nthw_dbs_t *p_nthw_dbs,
* at a later time (after we have enabled vfio interrupts in the kernel).
*/
if (irq_vector < 0) {
- if (set_rx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr,
+ if (nthw_set_rx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr,
RX_AM_DISABLE, host_id, 0,
0) != 0) {
return NULL;
@@ -432,7 +432,7 @@ static struct nthw_virt_queue *nthw_setup_rx_virt_queue(nthw_dbs_t *p_nthw_dbs,
* good idea to initialize all DBS_RX_QUEUES entries.
*/
uint32_t enable = rx_deferred_start ? RX_AM_DISABLE : RX_AM_ENABLE;
- if (set_rx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr, enable,
+ if (nthw_set_rx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr, enable,
host_id, 0, irq_vector >= 0 ? 1 : 0) != 0) {
return NULL;
}
@@ -520,7 +520,7 @@ static int dbs_internal_release_rx_virt_queue(struct nthw_virt_queue *rxvq)
/* Clear UW */
rxvq->used_struct_phys_addr = NULL;
- if (set_rx_uw_data(p_nthw_dbs, rxvq->index, (uint64_t)rxvq->used_struct_phys_addr,
+ if (nthw_set_rx_uw_data(p_nthw_dbs, rxvq->index, (uint64_t)rxvq->used_struct_phys_addr,
rxvq->host_id, 0, PACKED(rxvq->vq_type), 0, 0, 0) != 0) {
return -1;
}
@@ -528,7 +528,7 @@ static int dbs_internal_release_rx_virt_queue(struct nthw_virt_queue *rxvq)
/* Disable AM */
rxvq->am_enable = RX_AM_DISABLE;
- if (set_rx_am_data(p_nthw_dbs,
+ if (nthw_set_rx_am_data(p_nthw_dbs,
rxvq->index,
(uint64_t)rxvq->avail_struct_phys_addr,
rxvq->am_enable,
@@ -546,7 +546,7 @@ static int dbs_internal_release_rx_virt_queue(struct nthw_virt_queue *rxvq)
rxvq->avail_struct_phys_addr = NULL;
rxvq->host_id = 0;
- if (set_rx_am_data(p_nthw_dbs,
+ if (nthw_set_rx_am_data(p_nthw_dbs,
rxvq->index,
(uint64_t)rxvq->avail_struct_phys_addr,
rxvq->am_enable,
@@ -558,7 +558,7 @@ static int dbs_internal_release_rx_virt_queue(struct nthw_virt_queue *rxvq)
/* Clear DR */
rxvq->desc_struct_phys_addr = NULL;
- if (set_rx_dr_data(p_nthw_dbs,
+ if (nthw_set_rx_dr_data(p_nthw_dbs,
rxvq->index,
(uint64_t)rxvq->desc_struct_phys_addr,
rxvq->host_id,
@@ -602,7 +602,7 @@ static int dbs_internal_release_tx_virt_queue(struct nthw_virt_queue *txvq)
/* Clear UW */
txvq->used_struct_phys_addr = NULL;
- if (set_tx_uw_data(p_nthw_dbs, txvq->index, (uint64_t)txvq->used_struct_phys_addr,
+ if (nthw_set_tx_uw_data(p_nthw_dbs, txvq->index, (uint64_t)txvq->used_struct_phys_addr,
txvq->host_id, 0, PACKED(txvq->vq_type), 0, 0, 0,
txvq->in_order) != 0) {
return -1;
@@ -611,7 +611,7 @@ static int dbs_internal_release_tx_virt_queue(struct nthw_virt_queue *txvq)
/* Disable AM */
txvq->am_enable = TX_AM_DISABLE;
- if (set_tx_am_data(p_nthw_dbs,
+ if (nthw_set_tx_am_data(p_nthw_dbs,
txvq->index,
(uint64_t)txvq->avail_struct_phys_addr,
txvq->am_enable,
@@ -629,7 +629,7 @@ static int dbs_internal_release_tx_virt_queue(struct nthw_virt_queue *txvq)
txvq->avail_struct_phys_addr = NULL;
txvq->host_id = 0;
- if (set_tx_am_data(p_nthw_dbs,
+ if (nthw_set_tx_am_data(p_nthw_dbs,
txvq->index,
(uint64_t)txvq->avail_struct_phys_addr,
txvq->am_enable,
@@ -644,7 +644,7 @@ static int dbs_internal_release_tx_virt_queue(struct nthw_virt_queue *txvq)
txvq->port = 0;
txvq->header = 0;
- if (set_tx_dr_data(p_nthw_dbs,
+ if (nthw_set_tx_dr_data(p_nthw_dbs,
txvq->index,
(uint64_t)txvq->desc_struct_phys_addr,
txvq->host_id,
@@ -713,8 +713,8 @@ static struct nthw_virt_queue *nthw_setup_tx_virt_queue(nthw_dbs_t *p_nthw_dbs,
* 3. Configure the DBS.TX_DR_DATA memory; good idea to initialize all
* DBS_TX_QUEUES entries.
*/
- if (set_tx_dr_data(p_nthw_dbs, index, (uint64_t)desc_struct_phys_addr, host_id, qs, port,
- header, 0) != 0) {
+ if (nthw_set_tx_dr_data(p_nthw_dbs, index, (uint64_t)desc_struct_phys_addr,
+ host_id, qs, port, header, 0) != 0) {
return NULL;
}
@@ -730,7 +730,7 @@ static struct nthw_virt_queue *nthw_setup_tx_virt_queue(nthw_dbs_t *p_nthw_dbs,
vec = 0;
istk = 0;
- if (set_tx_uw_data(p_nthw_dbs, index,
+ if (nthw_set_tx_uw_data(p_nthw_dbs, index,
(uint64_t)used_struct_phys_addr,
host_id, qs, 0, int_enable, vec, istk, in_order) != 0) {
return NULL;
@@ -740,7 +740,7 @@ static struct nthw_virt_queue *nthw_setup_tx_virt_queue(nthw_dbs_t *p_nthw_dbs,
* 2. Configure the DBS.TX_AM_DATA memory and enable the queues you plan to use;
* good idea to initialize all DBS_TX_QUEUES entries.
*/
- if (set_tx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr, TX_AM_DISABLE,
+ if (nthw_set_tx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr, TX_AM_DISABLE,
host_id, 0, irq_vector >= 0 ? 1 : 0) != 0) {
return NULL;
}
@@ -764,7 +764,7 @@ static struct nthw_virt_queue *nthw_setup_tx_virt_queue(nthw_dbs_t *p_nthw_dbs,
*/
if (irq_vector < 0) {
uint32_t enable = tx_deferred_start ? TX_AM_DISABLE : TX_AM_ENABLE;
- if (set_tx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr,
+ if (nthw_set_tx_am_data(p_nthw_dbs, index, (uint64_t)avail_struct_phys_addr,
enable, host_id, 0, 0) != 0) {
return NULL;
}
@@ -1127,12 +1127,12 @@ nthw_setup_mngd_tx_virt_queue(nthw_dbs_t *p_nthw_dbs,
static int nthw_switch_rx_virt_queue(nthw_dbs_t *p_nthw_dbs, uint32_t index, uint32_t enable)
{
- return set_rx_am_data_enable(p_nthw_dbs, index, enable);
+ return nthw_set_rx_am_data_enable(p_nthw_dbs, index, enable);
}
static int nthw_switch_tx_virt_queue(nthw_dbs_t *p_nthw_dbs, uint32_t index, uint32_t enable)
{
- return set_tx_am_data_enable(p_nthw_dbs, index, enable);
+ return nthw_set_tx_am_data_enable(p_nthw_dbs, index, enable);
}
static uint16_t nthw_get_rx_packets(struct nthw_virt_queue *rxvq,
diff --git a/drivers/net/ntnic/include/ntnic_dbs.h b/drivers/net/ntnic/include/ntnic_dbs.h
index c35a7cb99b..3de7206ccb 100644
--- a/drivers/net/ntnic/include/ntnic_dbs.h
+++ b/drivers/net/ntnic/include/ntnic_dbs.h
@@ -233,8 +233,8 @@ struct nthw_dbs_s {
typedef struct nthw_dbs_s nthw_dbs_t;
nthw_dbs_t *nthw_dbs_new(void);
-int dbs_init(nthw_dbs_t *p, nthw_fpga_t *p_fpga, int n_instance);
-void dbs_reset(nthw_dbs_t *p);
+int nthw_dbs_init(nthw_dbs_t *p, nthw_fpga_t *p_fpga, int n_instance);
+void nthw_dbs_reset(nthw_dbs_t *p);
int nthw_set_rx_control(nthw_dbs_t *p,
uint32_t last_queue,
@@ -253,30 +253,30 @@ int nthw_set_tx_control(nthw_dbs_t *p,
int nthw_set_rx_init(nthw_dbs_t *p, uint32_t start_idx, uint32_t start_ptr, uint32_t init,
uint32_t queue);
int nthw_get_rx_init(nthw_dbs_t *p, uint32_t *init, uint32_t *queue, uint32_t *busy);
-int set_tx_init(nthw_dbs_t *p, uint32_t start_idx, uint32_t start_ptr, uint32_t init,
+int nthw_set_tx_init(nthw_dbs_t *p, uint32_t start_idx, uint32_t start_ptr, uint32_t init,
uint32_t queue);
int nthw_get_tx_init(nthw_dbs_t *p, uint32_t *init, uint32_t *queue, uint32_t *busy);
int nthw_set_rx_idle(nthw_dbs_t *p, uint32_t idle, uint32_t queue);
int nthw_get_rx_idle(nthw_dbs_t *p, uint32_t *idle, uint32_t *queue, uint32_t *busy);
int nthw_set_tx_idle(nthw_dbs_t *p, uint32_t idle, uint32_t queue);
int nthw_get_tx_idle(nthw_dbs_t *p, uint32_t *idle, uint32_t *queue, uint32_t *busy);
-int set_rx_am_data(nthw_dbs_t *p,
+int nthw_set_rx_am_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t enable,
uint32_t host_id,
uint32_t packed,
uint32_t int_enable);
-int set_rx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable);
-int set_tx_am_data(nthw_dbs_t *p,
+int nthw_set_rx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable);
+int nthw_set_tx_am_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t enable,
uint32_t host_id,
uint32_t packed,
uint32_t int_enable);
-int set_tx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable);
-int set_rx_uw_data(nthw_dbs_t *p,
+int nthw_set_tx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable);
+int nthw_set_rx_uw_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
@@ -285,7 +285,7 @@ int set_rx_uw_data(nthw_dbs_t *p,
uint32_t int_enable,
uint32_t vec,
uint32_t istk);
-int set_tx_uw_data(nthw_dbs_t *p,
+int nthw_set_tx_uw_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
@@ -295,14 +295,14 @@ int set_tx_uw_data(nthw_dbs_t *p,
uint32_t vec,
uint32_t istk,
uint32_t in_order);
-int set_rx_dr_data(nthw_dbs_t *p,
+int nthw_set_rx_dr_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
uint32_t queue_size,
uint32_t header,
uint32_t packed);
-int set_tx_dr_data(nthw_dbs_t *p,
+int nthw_set_tx_dr_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
diff --git a/drivers/net/ntnic/nthw/dbs/nthw_dbs.c b/drivers/net/ntnic/nthw/dbs/nthw_dbs.c
index da64dbab48..25989d170b 100644
--- a/drivers/net/ntnic/nthw/dbs/nthw_dbs.c
+++ b/drivers/net/ntnic/nthw/dbs/nthw_dbs.c
@@ -76,7 +76,7 @@ nthw_dbs_t *nthw_dbs_new(void)
return p;
}
-int dbs_init(nthw_dbs_t *p, nthw_fpga_t *p_fpga, int n_instance)
+int nthw_dbs_init(nthw_dbs_t *p, nthw_fpga_t *p_fpga, int n_instance)
{
nthw_module_t *mod = nthw_fpga_query_module(p_fpga, MOD_DBS, n_instance);
@@ -369,7 +369,7 @@ static int dbs_reset_tx_control(nthw_dbs_t *p)
return 0;
}
-void dbs_reset(nthw_dbs_t *p)
+void nthw_dbs_reset(nthw_dbs_t *p)
{
int i;
dbs_reset_rx_control(p);
@@ -462,7 +462,7 @@ int nthw_get_rx_init(nthw_dbs_t *p, uint32_t *init, uint32_t *queue, uint32_t *b
return 0;
}
-int set_tx_init(nthw_dbs_t *p, uint32_t start_idx, uint32_t start_ptr, uint32_t init,
+int nthw_set_tx_init(nthw_dbs_t *p, uint32_t start_idx, uint32_t start_ptr, uint32_t init,
uint32_t queue)
{
if (p->mp_reg_tx_init_val) {
@@ -601,7 +601,7 @@ static void flush_rx_am_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_rx_avail_monitor_data, 1);
}
-int set_rx_am_data(nthw_dbs_t *p,
+int nthw_set_rx_am_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t enable,
@@ -618,7 +618,7 @@ int set_rx_am_data(nthw_dbs_t *p,
return 0;
}
-int set_rx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable)
+int nthw_set_rx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable)
{
if (!p->mp_reg_rx_avail_monitor_data)
return -ENOTSUP;
@@ -673,7 +673,7 @@ static void flush_tx_am_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_tx_avail_monitor_data, 1);
}
-int set_tx_am_data(nthw_dbs_t *p,
+int nthw_set_tx_am_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t enable,
@@ -690,7 +690,7 @@ int set_tx_am_data(nthw_dbs_t *p,
return 0;
}
-int set_tx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable)
+int nthw_set_tx_am_data_enable(nthw_dbs_t *p, uint32_t index, uint32_t enable)
{
if (!p->mp_reg_tx_avail_monitor_data)
return -ENOTSUP;
@@ -796,7 +796,7 @@ static void flush_rx_uw_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_rx_used_writer_data, 1);
}
-int set_rx_uw_data(nthw_dbs_t *p,
+int nthw_set_rx_uw_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
@@ -923,7 +923,7 @@ static void flush_tx_uw_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_tx_used_writer_data, 1);
}
-int set_tx_uw_data(nthw_dbs_t *p,
+int nthw_set_tx_uw_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
@@ -1019,7 +1019,7 @@ static void flush_rx_dr_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_rx_descriptor_reader_data, 1);
}
-int set_rx_dr_data(nthw_dbs_t *p,
+int nthw_set_rx_dr_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
@@ -1121,7 +1121,7 @@ static void flush_tx_dr_data(nthw_dbs_t *p, uint32_t index)
nthw_register_flush(p->mp_reg_tx_descriptor_reader_data, 1);
}
-int set_tx_dr_data(nthw_dbs_t *p,
+int nthw_set_tx_dr_data(nthw_dbs_t *p,
uint32_t index,
uint64_t guest_physical_address,
uint32_t host_id,
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 11/16] net/ntnic: rename common hash and flow functions
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (9 preceding siblings ...)
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 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 12/16] net/ntnic: rename register ops function Serhii Iliushyk
` (4 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Rename common hash and flow functions to have consistent naming convention.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/include/flow_api.h | 8 ++++----
drivers/net/ntnic/nthw/flow_api/flow_api.c | 12 ++++++------
drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c | 8 ++++----
drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.h | 2 +-
.../flow_api/profile_inline/flow_api_hw_db_inline.c | 4 ++--
.../profile_inline/flow_api_profile_inline.c | 2 +-
drivers/net/ntnic/ntnic_ethdev.c | 2 +-
7 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/drivers/net/ntnic/include/flow_api.h b/drivers/net/ntnic/include/flow_api.h
index 582de3b281..869158258e 100644
--- a/drivers/net/ntnic/include/flow_api.h
+++ b/drivers/net/ntnic/include/flow_api.h
@@ -56,7 +56,7 @@ struct nt_eth_rss_conf {
enum rte_eth_hash_function algorithm;
};
-int sprint_nt_rss_mask(char *str, uint16_t str_len, const char *prefix, uint64_t hash_mask);
+int nthw_sprint_rss_mask(char *str, uint16_t str_len, const char *prefix, uint64_t hash_mask);
struct flow_eth_dev {
/* NIC that owns this port device */
@@ -171,7 +171,7 @@ void nthw_flow_nic_set_error(enum flow_nic_err_msg_e msg, struct rte_flow_error
* Resources
*/
-extern const char *dbg_res_descr[];
+extern const char *nthw_dbg_res_descr[];
#define flow_nic_set_bit(arr, x) \
do { \
@@ -199,7 +199,7 @@ extern const char *dbg_res_descr[];
typeof(res_type) _temp_res_type = (res_type); \
size_t _temp_index = (index); \
NT_LOG(DBG, FILTER, "mark resource used: %s idx %zu", \
- dbg_res_descr[_temp_res_type], _temp_index); \
+ nthw_dbg_res_descr[_temp_res_type], _temp_index); \
RTE_ASSERT(flow_nic_is_bit_set(_temp_ndev->res[_temp_res_type].alloc_bm, \
_temp_index) == 0); \
flow_nic_set_bit(_temp_ndev->res[_temp_res_type].alloc_bm, _temp_index); \
@@ -210,7 +210,7 @@ extern const char *dbg_res_descr[];
typeof(res_type) _temp_res_type = (res_type); \
size_t _temp_index = (index); \
NT_LOG(DBG, FILTER, "mark resource unused: %s idx %zu", \
- dbg_res_descr[_temp_res_type], _temp_index); \
+ nthw_dbg_res_descr[_temp_res_type], _temp_index); \
flow_nic_unset_bit((_ndev)->res[_temp_res_type].alloc_bm, _temp_index); \
} while (0)
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index 4d1c9c8d7c..dee2ee137a 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -18,7 +18,7 @@
name, #name \
}
-const char *dbg_res_descr[] = {
+const char *nthw_dbg_res_descr[] = {
[RES_QUEUE] = "RES_QUEUE",
[RES_CAT_CFN] = "RES_CAT_CFN",
[RES_CAT_COT] = "RES_CAT_COT",
@@ -41,7 +41,7 @@ const char *dbg_res_descr[] = {
[RES_INVALID] = "RES_INVALID",
};
-static_assert(RTE_DIM(dbg_res_descr) == RES_END,
+static_assert(RTE_DIM(nthw_dbg_res_descr) == RES_END,
"The list of debug descriptions is not fully completed");
static struct flow_nic_dev *dev_base;
@@ -212,7 +212,7 @@ void nthw_flow_nic_free_resource(struct flow_nic_dev *ndev, enum res_type_e res_
int nthw_flow_nic_ref_resource(struct flow_nic_dev *ndev, enum res_type_e res_type, int index)
{
NT_LOG(DBG, FILTER, "Reference resource %s idx %i (before ref cnt %" PRIu32 ")",
- dbg_res_descr[res_type], index, ndev->res[res_type].ref[index]);
+ nthw_dbg_res_descr[res_type], index, ndev->res[res_type].ref[index]);
RTE_ASSERT(flow_nic_is_resource_used(ndev, res_type, index));
if (ndev->res[res_type].ref[index] == (uint32_t)-1)
@@ -225,7 +225,7 @@ int nthw_flow_nic_ref_resource(struct flow_nic_dev *ndev, enum res_type_e res_ty
int nthw_flow_nic_deref_resource(struct flow_nic_dev *ndev, enum res_type_e res_type, int index)
{
NT_LOG(DBG, FILTER, "De-reference resource %s idx %i (before ref cnt %" PRIu32 ")",
- dbg_res_descr[res_type], index, ndev->res[res_type].ref[index]);
+ nthw_dbg_res_descr[res_type], index, ndev->res[res_type].ref[index]);
RTE_ASSERT(flow_nic_is_resource_used(ndev, res_type, index));
RTE_ASSERT(ndev->res[res_type].ref[index]);
/* deref */
@@ -494,7 +494,7 @@ static void flow_ndev_reset(struct flow_nic_dev *ndev)
for (unsigned int i = 0; i < RES_COUNT; i++) {
int err = 0;
- NT_LOG(DBG, FILTER, "RES state for: %s", dbg_res_descr[i]);
+ NT_LOG(DBG, FILTER, "RES state for: %s", nthw_dbg_res_descr[i]);
for (unsigned int ii = 0; ii < ndev->res[i].resource_count; ii++) {
int ref = ndev->res[i].ref[ii];
@@ -983,7 +983,7 @@ static struct rss_type_info rss_to_string[] = {
RSS_TO_STRING(RTE_ETH_RSS_L3_SRC_ONLY),
};
-int sprint_nt_rss_mask(char *str, uint16_t str_len, const char *prefix, uint64_t hash_mask)
+int nthw_sprint_rss_mask(char *str, uint16_t str_len, const char *prefix, uint64_t hash_mask)
{
if (str == NULL || str_len == 0)
return -1;
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
index 76ff79cbe1..9a7069194b 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.c
@@ -130,7 +130,7 @@ static __rte_always_inline void unset_bits_and_log(uint64_t *hash_mask, uint64_t
char rss_buffer[4096];
uint16_t rss_buffer_len = sizeof(rss_buffer);
- if (sprint_nt_rss_mask(rss_buffer, rss_buffer_len, " ", *hash_mask & hash_bits) == 0)
+ if (nthw_sprint_rss_mask(rss_buffer, rss_buffer_len, " ", *hash_mask & hash_bits) == 0)
NT_LOG(DBG, FILTER, "Configured RSS types:%s", rss_buffer);
unset_bits(hash_mask, hash_bits);
}
@@ -141,14 +141,14 @@ static __rte_always_inline void unset_bits_if_all_enabled(uint64_t *hash_mask, u
unset_bits(hash_mask, hash_bits);
}
-int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_conf)
+int nthw_hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_conf)
{
uint64_t fields = rss_conf.rss_hf;
char rss_buffer[4096];
uint16_t rss_buffer_len = sizeof(rss_buffer);
- if (sprint_nt_rss_mask(rss_buffer, rss_buffer_len, " ", fields) == 0)
+ if (nthw_sprint_rss_mask(rss_buffer, rss_buffer_len, " ", fields) == 0)
NT_LOG(DBG, FILTER, "Requested RSS types:%s", rss_buffer);
/*
@@ -645,7 +645,7 @@ int hsh_set(struct flow_nic_dev *ndev, int hsh_idx, struct nt_eth_rss_conf rss_c
if (fields || res != 0) {
nthw_mod_hsh_rcp_set(&ndev->be, HW_HSH_RCP_PRESET_ALL, hsh_idx, 0, 0);
- if (sprint_nt_rss_mask(rss_buffer, rss_buffer_len, " ", rss_conf.rss_hf) == 0) {
+ if (nthw_sprint_rss_mask(rss_buffer, rss_buffer_len, " ", rss_conf.rss_hf) == 0) {
NT_LOG(ERR, FILTER, "RSS configuration%s is not supported for hash func %s.",
rss_buffer, (enum rte_eth_hash_function)toeplitz ?
"Toeplitz" : "NTH10");
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.h b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.h
index 38901b3e8a..124225c455 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.h
+++ b/drivers/net/ntnic/nthw/flow_api/flow_hsh_cfg.h
@@ -11,7 +11,7 @@
#include "hw_mod_backend.h"
#include "flow_api.h"
-int hsh_set(struct flow_nic_dev *ndev, int hsh_idx,
+int nthw_hsh_set(struct flow_nic_dev *ndev, int hsh_idx,
struct nt_eth_rss_conf rss_conf);
#endif /* _FLOW_HSH_CFG_H_ */
diff --git a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
index b1a2d9dfa3..5de4f6bae7 100644
--- a/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
+++ b/drivers/net/ntnic/nthw/flow_api/profile_inline/flow_api_hw_db_inline.c
@@ -598,7 +598,7 @@ void nthw_db_inline_dump(struct flow_nic_dev *ndev, void *db_handle, const struc
fprintf(file, " %016lx\n", data->hash_mask);
/* convert hash mask to human readable RTE_ETH_RSS_* form if possible */
- if (sprint_nt_rss_mask(str_buffer, rss_buffer_len, "\n ",
+ if (nthw_sprint_rss_mask(str_buffer, rss_buffer_len, "\n ",
data->hash_mask) == 0) {
fprintf(file, " Hash mask flags:%s\n", str_buffer);
}
@@ -2830,7 +2830,7 @@ struct hw_db_hsh_idx nthw_db_inline_hsh_add(struct flow_nic_dev *ndev, void *db_
tmp_rss_conf.rss_hf = data->hash_mask;
memcpy(tmp_rss_conf.rss_key, data->key, MAX_RSS_KEY_LEN);
tmp_rss_conf.algorithm = data->func;
- int res = hsh_set(ndev, idx.ids, tmp_rss_conf);
+ int res = nthw_hsh_set(ndev, idx.ids, tmp_rss_conf);
if (res != 0) {
idx.error = 1;
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 e0cdd12626..a1f9e3addf 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
@@ -3977,7 +3977,7 @@ int nthw_init_flow_mgmnt_of_ndev_profile_inline(struct flow_nic_dev *ndev)
.rss_hf = RTE_ETH_RSS_IPV6 | RTE_ETH_RSS_PORT,
.algorithm = 0,
};
- hsh_set(ndev, 0, hsh_5_tuple);
+ nthw_hsh_set(ndev, 0, hsh_5_tuple);
nthw_mod_hsh_rcp_flush(&ndev->be, 0, 1);
flow_nic_mark_resource_used(ndev, RES_HSH_RCP, 0);
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 3f96a144c7..4812713bd6 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -1770,7 +1770,7 @@ static int eth_dev_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_r
tmp_rss_conf.algorithm = rss_conf->algorithm;
tmp_rss_conf.rss_hf = rss_conf->rss_hf;
- int res = hsh_set(ndev, hsh_idx, tmp_rss_conf);
+ int res = nthw_hsh_set(ndev, hsh_idx, tmp_rss_conf);
if (res == 0) {
flow_filter_ops->nthw_mod_hsh_rcp_flush(&ndev->be, hsh_idx, 1);
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 12/16] net/ntnic: rename register ops function
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (10 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 11/16] net/ntnic: rename common hash and flow functions Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 13/16] net/ntnic: rename get ops functions Serhii Iliushyk
` (3 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Add prefix nthw_ to register ops function to follow naming convention.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/adapter/nt4ga_adapter.c | 2 +-
.../net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 2 +-
drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 2 +-
.../link_mgmt/link_100g/nt4ga_link_100g.c | 2 +-
.../link_agx_100g/nt4ga_agx_link_100g.c | 2 +-
drivers/net/ntnic/link_mgmt/nt4ga_link.c | 2 +-
.../net/ntnic/nthw/core/include/nthw_fpga.h | 4 +-
.../clock_profiles/nthw_fpga_clk9563.c | 2 +-
.../nthw/core/nt200a0x/nthw_fpga_nt200a0x.c | 2 +-
.../core/nt200a0x/reset/nthw_fpga_rst9563.c | 2 +-
.../nt200a0x/reset/nthw_fpga_rst_nt200a0x.c | 2 +-
.../nthw/core/nt400dxx/nthw_fpga_nt400dxx.c | 2 +-
.../core/nt400dxx/reset/nthw_fpga_rst9574.c | 2 +-
.../nt400dxx/reset/nthw_fpga_rst_nt400dxx.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_fpga.c | 4 +-
drivers/net/ntnic/nthw/flow_api/flow_api.c | 2 +-
.../nthw/flow_api/flow_backend/flow_backend.c | 2 +-
.../profile_inline/flow_api_profile_inline.c | 2 +-
.../net/ntnic/nthw/ntnic_meter/ntnic_meter.c | 2 +-
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 6 +--
drivers/net/ntnic/ntnic_mod_reg.c | 38 +++++++++----------
drivers/net/ntnic/ntnic_mod_reg.h | 38 +++++++++----------
drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c | 2 +-
23 files changed, 63 insertions(+), 63 deletions(-)
diff --git a/drivers/net/ntnic/adapter/nt4ga_adapter.c b/drivers/net/ntnic/adapter/nt4ga_adapter.c
index 98725879b9..5295387fa8 100644
--- a/drivers/net/ntnic/adapter/nt4ga_adapter.c
+++ b/drivers/net/ntnic/adapter/nt4ga_adapter.c
@@ -283,5 +283,5 @@ static const struct adapter_ops ops = {
void nthw_adapter_init(void)
{
- register_adapter_ops(&ops);
+ nthw_reg_adapter_ops(&ops);
}
diff --git a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
index 9d0d77dcc8..aca88c6635 100644
--- a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
+++ b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
@@ -596,5 +596,5 @@ static struct nt4ga_stat_ops ops = {
void nt4ga_stat_ops_init(void)
{
NT_LOG_DBGX(DBG, NTNIC, "Stat module was initialized");
- register_nt4ga_stat_ops(&ops);
+ nthw_reg_nt4ga_stat_ops(&ops);
}
diff --git a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
index 3257233545..0fa597d777 100644
--- a/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
+++ b/drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c
@@ -1451,5 +1451,5 @@ static struct sg_ops_s sg_ops = {
void nthw_sg_init(void)
{
NT_LOG(INF, NTNIC, "SG ops initialized");
- register_sg_ops(&sg_ops);
+ nthw_reg_sg_ops(&sg_ops);
}
diff --git a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
index 2c7a88aed9..914d1c206c 100644
--- a/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_100g/nt4ga_link_100g.c
@@ -747,5 +747,5 @@ static struct link_ops_s link_100g_ops = {
void nthw_link_100g_init(void)
{
- register_100g_link_ops(&link_100g_ops);
+ nthw_reg_100g_link_ops(&link_100g_ops);
}
diff --git a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
index b700a9e76e..1387bb4148 100644
--- a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
@@ -37,7 +37,7 @@ static struct link_ops_s link_agx_100g_ops = {
void link_agx_100g_init(void)
{
- register_agx_100g_link_ops(&link_agx_100g_ops);
+ nthw_reg_agx_100g_link_ops(&link_agx_100g_ops);
}
/*
diff --git a/drivers/net/ntnic/link_mgmt/nt4ga_link.c b/drivers/net/ntnic/link_mgmt/nt4ga_link.c
index 5ddbb9f1fd..5e6be42398 100644
--- a/drivers/net/ntnic/link_mgmt/nt4ga_link.c
+++ b/drivers/net/ntnic/link_mgmt/nt4ga_link.c
@@ -210,5 +210,5 @@ static const struct port_ops ops = {
void nthw_port_init(void)
{
- register_port_ops(&ops);
+ nthw_reg_port_ops(&ops);
}
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
index fb47807a2f..b86865b24f 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
@@ -32,7 +32,7 @@ struct nt200a0x_ops {
int (*nthw_fpga_nt200a0x_init)(struct fpga_info_s *p_fpga_info);
};
-void register_nt200a0x_ops(struct nt200a0x_ops *ops);
+void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops);
struct nt200a0x_ops *get_nt200a0x_ops(void);
void nt200a0x_ops_init(void);
@@ -40,7 +40,7 @@ struct nt400dxx_ops {
int (*nthw_fpga_nt400dxx_init)(struct fpga_info_s *p_fpga_info);
};
-void register_nt400dxx_ops(struct nt400dxx_ops *ops);
+void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops);
struct nt400dxx_ops *get_nt400dxx_ops(void);
void nt400dxx_ops_init(void);
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
index e50094c6fa..eeca816899 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
@@ -35,7 +35,7 @@ static struct clk9563_ops ops = { .get_n_data_9563_si5340_nt200a02_u23_v5 =
void clk9563_ops_init(void)
{
- register_clk9563_ops(&ops);
+ nthw_reg_clk9563_ops(&ops);
}
#undef si5340_revd_registers
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
index bf7a2760a4..739b1aab85 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
@@ -72,5 +72,5 @@ static struct nt200a0x_ops nt200a0x_ops = { .nthw_fpga_nt200a0x_init = nthw_fpga
void nt200a0x_ops_init(void)
{
NT_LOG(DBG, NTHW, "NT200A0X OPS INIT");
- register_nt200a0x_ops(&nt200a0x_ops);
+ nthw_reg_nt200a0x_ops(&nt200a0x_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
index 918ac71a43..a345f163bb 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
@@ -236,5 +236,5 @@ static struct rst9563_ops rst9563_ops = { .nthw_fpga_rst9563_init = nthw_fpga_rs
void rst9563_ops_init(void)
{
NT_LOG(DBG, NTHW, "RST9563 OPS INIT");
- register_rst9563_ops(&rst9563_ops);
+ nthw_reg_rst9563_ops(&rst9563_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
index 34527b0cca..4a2fca5f19 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
@@ -578,5 +578,5 @@ static struct rst_nt200a0x_ops rst_nt200a0x_ops = { .nthw_fpga_rst_nt200a0x_init
void rst_nt200a0x_ops_init(void)
{
NT_LOG(DBG, NTHW, "RST NT200A0X OPS INIT");
- register_rst_nt200a0x_ops(&rst_nt200a0x_ops);
+ nthw_reg_rst_nt200a0x_ops(&rst_nt200a0x_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
index e7c9fec10d..234da0da33 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
@@ -215,5 +215,5 @@ static struct nt400dxx_ops nt400dxx_ops = { .nthw_fpga_nt400dxx_init = nthw_fpga
void nt400dxx_ops_init(void)
{
- register_nt400dxx_ops(&nt400dxx_ops);
+ nthw_reg_nt400dxx_ops(&nt400dxx_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
index 28769e3aa5..36d2c46fc6 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
@@ -373,5 +373,5 @@ static struct rst9574_ops rst9574_ops = {
void rst9574_ops_init(void)
{
- register_rst9574_ops(&rst9574_ops);
+ nthw_reg_rst9574_ops(&rst9574_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
index d158135c17..67c562627d 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
@@ -423,5 +423,5 @@ static struct rst_nt400dxx_ops rst_nt400dxx_ops = {
void rst_nt400dxx_ops_init(void)
{
- register_rst_nt400dxx_ops(&rst_nt400dxx_ops);
+ nthw_reg_rst_nt400dxx_ops(&rst_nt400dxx_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index f9ae466383..f18069e492 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -557,7 +557,7 @@ int nthw_fpga_shutdown(struct fpga_info_s *p_fpga_info)
static struct nt200a0x_ops *nt200a0x_ops;
-void register_nt200a0x_ops(struct nt200a0x_ops *ops)
+void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops)
{
nt200a0x_ops = ops;
}
@@ -571,7 +571,7 @@ struct nt200a0x_ops *get_nt200a0x_ops(void)
static struct nt400dxx_ops *nt400dxx_ops;
-void register_nt400dxx_ops(struct nt400dxx_ops *ops)
+void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops)
{
nt400dxx_ops = ops;
}
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index dee2ee137a..b737589e14 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -1283,5 +1283,5 @@ static const struct flow_filter_ops ops = {
void nthw_init_flow_filter(void)
{
- register_flow_filter_ops(&ops);
+ nthw_reg_flow_filter_ops(&ops);
}
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
index 8144e25540..567b735f1e 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_backend/flow_backend.c
@@ -2277,5 +2277,5 @@ static const struct flow_backend_ops ops = {
void nthw_flow_backend_init(void)
{
- register_flow_backend_ops(&ops);
+ nthw_reg_flow_backend_ops(&ops);
}
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 a1f9e3addf..3f80e0f945 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
@@ -5446,5 +5446,5 @@ static const struct profile_inline_ops ops = {
void nthw_profile_inline_init(void)
{
- register_profile_inline_ops(&ops);
+ nthw_reg_profile_inline_ops(&ops);
}
diff --git a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
index 303c2cd51a..a2c37774fe 100644
--- a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
+++ b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
@@ -485,5 +485,5 @@ static struct meter_ops_s meter_ops = {
void nthw_meter_init(void)
{
NT_LOG(DBG, NTNIC, "Meter ops initialized");
- register_meter_ops(&meter_ops);
+ nthw_reg_meter_ops(&meter_ops);
}
diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index f498551e8d..2d0d0ea54f 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -1291,7 +1291,7 @@ static const struct ntnic_filter_ops ntnic_filter_ops = {
void ntnic_filter_init(void)
{
- register_ntnic_filter_ops(&ntnic_filter_ops);
+ nthw_reg_filter_ops(&ntnic_filter_ops);
}
static const struct rte_flow_ops dev_flow_ops = {
@@ -1313,7 +1313,7 @@ static const struct rte_flow_ops dev_flow_ops = {
void nthw_dev_flow_init(void)
{
- register_dev_flow_ops(&dev_flow_ops);
+ nthw_reg_dev_flow_ops(&dev_flow_ops);
}
static struct rte_flow_fp_ops async_dev_flow_ops = {
@@ -1323,5 +1323,5 @@ static struct rte_flow_fp_ops async_dev_flow_ops = {
void nthw_dev_fp_flow_init(void)
{
- register_dev_fp_flow_ops(&async_dev_flow_ops);
+ nthw_reg_dev_fp_flow_ops(&async_dev_flow_ops);
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.c b/drivers/net/ntnic/ntnic_mod_reg.c
index 36aee48818..be872aa090 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.c
+++ b/drivers/net/ntnic/ntnic_mod_reg.c
@@ -7,7 +7,7 @@
static struct sg_ops_s *sg_ops;
-void register_sg_ops(struct sg_ops_s *ops)
+void nthw_reg_sg_ops(struct sg_ops_s *ops)
{
sg_ops = ops;
}
@@ -24,7 +24,7 @@ const struct sg_ops_s *get_sg_ops(void)
*/
static struct meter_ops_s *meter_ops;
-void register_meter_ops(struct meter_ops_s *ops)
+void nthw_reg_meter_ops(struct meter_ops_s *ops)
{
meter_ops = ops;
}
@@ -42,7 +42,7 @@ const struct meter_ops_s *get_meter_ops(void)
*/
static const struct ntnic_filter_ops *ntnic_filter_ops;
-void register_ntnic_filter_ops(const struct ntnic_filter_ops *ops)
+void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops)
{
ntnic_filter_ops = ops;
}
@@ -57,7 +57,7 @@ const struct ntnic_filter_ops *get_ntnic_filter_ops(void)
static struct link_ops_s *link_100g_ops;
-void register_100g_link_ops(struct link_ops_s *ops)
+void nthw_reg_100g_link_ops(struct link_ops_s *ops)
{
link_100g_ops = ops;
}
@@ -74,7 +74,7 @@ const struct link_ops_s *get_100g_link_ops(void)
*/
static struct link_ops_s *link_agx_100g_ops;
-void register_agx_100g_link_ops(struct link_ops_s *ops)
+void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops)
{
link_agx_100g_ops = ops;
}
@@ -88,7 +88,7 @@ const struct link_ops_s *get_agx_100g_link_ops(void)
static const struct port_ops *port_ops;
-void register_port_ops(const struct port_ops *ops)
+void nthw_reg_port_ops(const struct port_ops *ops)
{
port_ops = ops;
}
@@ -102,7 +102,7 @@ const struct port_ops *get_port_ops(void)
static const struct nt4ga_stat_ops *nt4ga_stat_ops;
-void register_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
+void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
{
nt4ga_stat_ops = ops;
}
@@ -117,7 +117,7 @@ const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void)
static const struct adapter_ops *adapter_ops;
-void register_adapter_ops(const struct adapter_ops *ops)
+void nthw_reg_adapter_ops(const struct adapter_ops *ops)
{
adapter_ops = ops;
}
@@ -131,7 +131,7 @@ const struct adapter_ops *get_adapter_ops(void)
static struct clk9563_ops *clk9563_ops;
-void register_clk9563_ops(struct clk9563_ops *ops)
+void nthw_reg_clk9563_ops(struct clk9563_ops *ops)
{
clk9563_ops = ops;
}
@@ -145,7 +145,7 @@ struct clk9563_ops *get_clk9563_ops(void)
static struct rst_nt200a0x_ops *rst_nt200a0x_ops;
-void register_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
+void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
{
rst_nt200a0x_ops = ops;
}
@@ -159,7 +159,7 @@ struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void)
static struct rst9563_ops *rst9563_ops;
-void register_rst9563_ops(struct rst9563_ops *ops)
+void nthw_reg_rst9563_ops(struct rst9563_ops *ops)
{
rst9563_ops = ops;
}
@@ -173,14 +173,14 @@ struct rst9563_ops *get_rst9563_ops(void)
static const struct flow_backend_ops *flow_backend_ops;
-void register_flow_backend_ops(const struct flow_backend_ops *ops)
+void nthw_reg_flow_backend_ops(const struct flow_backend_ops *ops)
{
flow_backend_ops = ops;
}
static struct rst9574_ops *rst9574_ops;
-void register_rst9574_ops(struct rst9574_ops *ops)
+void nthw_reg_rst9574_ops(struct rst9574_ops *ops)
{
rst9574_ops = ops;
}
@@ -195,7 +195,7 @@ struct rst9574_ops *get_rst9574_ops(void)
static struct rst_nt400dxx_ops *rst_nt400dxx_ops;
-void register_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops)
+void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops)
{
rst_nt400dxx_ops = ops;
}
@@ -218,7 +218,7 @@ const struct flow_backend_ops *get_flow_backend_ops(void)
static const struct profile_inline_ops *profile_inline_ops;
-void register_profile_inline_ops(const struct profile_inline_ops *ops)
+void nthw_reg_profile_inline_ops(const struct profile_inline_ops *ops)
{
profile_inline_ops = ops;
}
@@ -233,7 +233,7 @@ const struct profile_inline_ops *get_profile_inline_ops(void)
static const struct flow_filter_ops *flow_filter_ops;
-void register_flow_filter_ops(const struct flow_filter_ops *ops)
+void nthw_reg_flow_filter_ops(const struct flow_filter_ops *ops)
{
flow_filter_ops = ops;
}
@@ -248,7 +248,7 @@ const struct flow_filter_ops *get_flow_filter_ops(void)
static const struct rte_flow_fp_ops *dev_fp_flow_ops;
-void register_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops)
+void nthw_reg_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops)
{
dev_fp_flow_ops = ops;
}
@@ -263,7 +263,7 @@ const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void)
static const struct rte_flow_ops *dev_flow_ops;
-void register_dev_flow_ops(const struct rte_flow_ops *ops)
+void nthw_reg_dev_flow_ops(const struct rte_flow_ops *ops)
{
dev_flow_ops = ops;
}
@@ -278,7 +278,7 @@ const struct rte_flow_ops *get_dev_flow_ops(void)
static struct ntnic_xstats_ops *ntnic_xstats_ops;
-void register_ntnic_xstats_ops(struct ntnic_xstats_ops *ops)
+void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops)
{
ntnic_xstats_ops = ops;
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h
index 59eb5ab69f..26c8723afa 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -119,7 +119,7 @@ struct sg_ops_s {
int (*nthw_virt_queue_init)(struct fpga_info_s *p_fpga_info);
};
-void register_sg_ops(struct sg_ops_s *ops);
+void nthw_reg_sg_ops(struct sg_ops_s *ops);
const struct sg_ops_s *get_sg_ops(void);
void nthw_sg_init(void);
@@ -128,7 +128,7 @@ struct meter_ops_s {
int (*eth_mtr_ops_get)(struct rte_eth_dev *eth_dev, void *ops);
};
-void register_meter_ops(struct meter_ops_s *ops);
+void nthw_reg_meter_ops(struct meter_ops_s *ops);
const struct meter_ops_s *get_meter_ops(void);
void nthw_meter_init(void);
@@ -139,7 +139,7 @@ struct ntnic_filter_ops {
int (*poll_statistics)(struct pmd_internals *internals);
};
-void register_ntnic_filter_ops(const struct ntnic_filter_ops *ops);
+void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops);
const struct ntnic_filter_ops *get_ntnic_filter_ops(void);
void ntnic_filter_init(void);
@@ -147,11 +147,11 @@ struct link_ops_s {
int (*link_init)(struct adapter_info_s *p_adapter_info, nthw_fpga_t *p_fpga);
};
-void register_100g_link_ops(struct link_ops_s *ops);
+void nthw_reg_100g_link_ops(struct link_ops_s *ops);
const struct link_ops_s *get_100g_link_ops(void);
void nthw_link_100g_init(void);
-void register_agx_100g_link_ops(struct link_ops_s *ops);
+void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops);
const struct link_ops_s *get_agx_100g_link_ops(void);
void link_agx_100g_init(void);
@@ -207,7 +207,7 @@ struct port_ops {
int (*tx_power)(struct adapter_info_s *p, int port, bool disable);
};
-void register_port_ops(const struct port_ops *ops);
+void nthw_reg_port_ops(const struct port_ops *ops);
const struct port_ops *get_port_ops(void);
void nthw_port_init(void);
@@ -218,7 +218,7 @@ struct nt4ga_stat_ops {
nt4ga_stat_t *p_nt4ga_stat);
};
-void register_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops);
+void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops);
const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void);
void nt4ga_stat_ops_init(void);
@@ -229,7 +229,7 @@ struct adapter_ops {
int (*show_info)(struct adapter_info_s *p_adapter_info, FILE *pfh);
};
-void register_adapter_ops(const struct adapter_ops *ops);
+void nthw_reg_adapter_ops(const struct adapter_ops *ops);
const struct adapter_ops *get_adapter_ops(void);
void nthw_adapter_init(void);
@@ -238,7 +238,7 @@ struct clk9563_ops {
const clk_profile_data_fmt2_t *(*get_p_data_9563_si5340_nt200a02_u23_v5)(void);
};
-void register_clk9563_ops(struct clk9563_ops *ops);
+void nthw_reg_clk9563_ops(struct clk9563_ops *ops);
struct clk9563_ops *get_clk9563_ops(void);
void clk9563_ops_init(void);
@@ -249,7 +249,7 @@ struct rst_nt200a0x_ops {
const struct nthw_fpga_rst_nt200a0x *p);
};
-void register_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops);
+void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops);
struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void);
void rst_nt200a0x_ops_init(void);
@@ -258,7 +258,7 @@ struct rst9563_ops {
struct nthw_fpga_rst_nt200a0x *const p);
};
-void register_rst9563_ops(struct rst9563_ops *ops);
+void nthw_reg_rst9563_ops(struct rst9563_ops *ops);
struct rst9563_ops *get_rst9563_ops(void);
void rst9563_ops_init(void);
@@ -269,7 +269,7 @@ struct rst9574_ops {
struct nthw_fpga_rst_nt400dxx *const p);
};
-void register_rst9574_ops(struct rst9574_ops *ops);
+void nthw_reg_rst9574_ops(struct rst9574_ops *ops);
struct rst9574_ops *get_rst9574_ops(void);
void rst9574_ops_init(void);
@@ -278,7 +278,7 @@ struct rst_nt400dxx_ops {
int (*nthw_fpga_rst_nt400dxx_reset)(struct fpga_info_s *p_fpga_info);
};
-void register_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops);
+void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops);
struct rst_nt400dxx_ops *get_rst_nt400dxx_ops(void);
void rst_nt400dxx_ops_init(void);
@@ -288,7 +288,7 @@ struct flow_backend_ops {
void (*bin_flow_backend_done)(void *be_dev);
};
-void register_flow_backend_ops(const struct flow_backend_ops *ops);
+void nthw_reg_flow_backend_ops(const struct flow_backend_ops *ops);
const struct flow_backend_ops *get_flow_backend_ops(void);
void nthw_flow_backend_init(void);
@@ -446,7 +446,7 @@ struct profile_inline_ops {
int (*nthw_flow_set_mtu_inline)(struct flow_eth_dev *dev, uint32_t port, uint16_t mtu);
};
-void register_profile_inline_ops(const struct profile_inline_ops *ops);
+void nthw_reg_profile_inline_ops(const struct profile_inline_ops *ops);
const struct profile_inline_ops *get_profile_inline_ops(void);
void nthw_profile_inline_init(void);
@@ -559,15 +559,15 @@ struct flow_filter_ops {
struct rte_flow_error *error);
};
-void register_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops);
+void nthw_reg_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops);
const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void);
void nthw_dev_fp_flow_init(void);
-void register_dev_flow_ops(const struct rte_flow_ops *ops);
+void nthw_reg_dev_flow_ops(const struct rte_flow_ops *ops);
const struct rte_flow_ops *get_dev_flow_ops(void);
void nthw_dev_flow_init(void);
-void register_flow_filter_ops(const struct flow_filter_ops *ops);
+void nthw_reg_flow_filter_ops(const struct flow_filter_ops *ops);
const struct flow_filter_ops *get_flow_filter_ops(void);
void nthw_init_flow_filter(void);
@@ -591,7 +591,7 @@ struct ntnic_xstats_ops {
uint8_t port);
};
-void register_ntnic_xstats_ops(struct ntnic_xstats_ops *ops);
+void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops);
struct ntnic_xstats_ops *get_ntnic_xstats_ops(void);
void ntnic_xstats_ops_init(void);
diff --git a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
index a26cf5a07a..1ebf1b8eb5 100644
--- a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
+++ b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
@@ -822,5 +822,5 @@ static struct ntnic_xstats_ops ops = {
void ntnic_xstats_ops_init(void)
{
NT_LOG_DBGX(DBG, NTNIC, "xstats module was initialized");
- register_ntnic_xstats_ops(&ops);
+ nthw_reg_xstats_ops(&ops);
}
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 13/16] net/ntnic: rename get ops functions
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (11 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 12/16] net/ntnic: rename register ops function Serhii Iliushyk
@ 2025-09-19 9:14 ` Serhii Iliushyk
2025-09-19 9:14 ` [PATCH v1 14/16] net/ntnic: rename ops_init functions Serhii Iliushyk
` (2 subsequent siblings)
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Add prefix nthw_ to get ops functions to follow naming convention.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/adapter/nt4ga_adapter.c | 10 ++--
.../net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 4 +-
.../net/ntnic/nthw/core/include/nthw_fpga.h | 4 +-
.../nthw/core/nt200a0x/nthw_fpga_nt200a0x.c | 4 +-
.../core/nt200a0x/reset/nthw_fpga_rst9563.c | 4 +-
.../nthw/core/nt400dxx/nthw_fpga_nt400dxx.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_fpga.c | 8 +--
drivers/net/ntnic/nthw/flow_api/flow_api.c | 42 +++++++--------
drivers/net/ntnic/nthw/flow_api/flow_filter.c | 4 +-
.../net/ntnic/nthw/ntnic_meter/ntnic_meter.c | 18 +++----
drivers/net/ntnic/ntnic_ethdev.c | 54 +++++++++----------
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 32 +++++------
drivers/net/ntnic/ntnic_mod_reg.c | 38 ++++++-------
drivers/net/ntnic/ntnic_mod_reg.h | 38 ++++++-------
14 files changed, 132 insertions(+), 132 deletions(-)
diff --git a/drivers/net/ntnic/adapter/nt4ga_adapter.c b/drivers/net/ntnic/adapter/nt4ga_adapter.c
index 5295387fa8..6d8547483f 100644
--- a/drivers/net/ntnic/adapter/nt4ga_adapter.c
+++ b/drivers/net/ntnic/adapter/nt4ga_adapter.c
@@ -52,7 +52,7 @@ static int nt4ga_adapter_show_info(struct adapter_info_s *p_adapter_info, FILE *
static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL)
NT_LOG(ERR, NTNIC, "%s: flow_filter module uninitialized", __func__);
@@ -162,7 +162,7 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
switch (fpga_info->n_fpga_prod_id) {
/* NT200A01: 2x100G (Xilinx) */
case 9563: /* NT200A02 (Cap) */
- link_ops = get_100g_link_ops();
+ link_ops = nthw_get_100g_link_ops();
if (link_ops == NULL) {
NT_LOG(ERR, NTNIC, "NT200A02 100G link module uninitialized");
@@ -173,7 +173,7 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
res = link_ops->link_init(p_adapter_info, p_fpga);
break;
case 9574: /* NT400D13 (Intel Agilex FPGA) */
- link_ops = get_agx_100g_link_ops();
+ link_ops = nthw_get_agx_100g_link_ops();
if (link_ops == NULL) {
NT_LOG(ERR, NTNIC, "NT400D11 100G link module uninitialized");
res = -1;
@@ -197,7 +197,7 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
}
}
- const struct nt4ga_stat_ops *nt4ga_stat_ops = get_nt4ga_stat_ops();
+ const struct nt4ga_stat_ops *nt4ga_stat_ops = nthw_get_nt4ga_stat_ops();
if (nt4ga_stat_ops != NULL) {
/* Nt4ga Stat init/setup */
@@ -223,7 +223,7 @@ static int nt4ga_adapter_init(struct adapter_info_s *p_adapter_info)
static int nt4ga_adapter_deinit(struct adapter_info_s *p_adapter_info)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL)
NT_LOG(ERR, NTNIC, "%s: flow_filter module uninitialized", __func__);
diff --git a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
index aca88c6635..0f7e1f2b00 100644
--- a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
+++ b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
@@ -191,7 +191,7 @@ static int nt4ga_stat_setup(struct adapter_info_s *p_adapter_info)
return -1;
}
- if (get_flow_filter_ops() != NULL) {
+ if (nthw_get_flow_filter_ops() != NULL) {
struct flow_nic_dev *ndev = p_adapter_info->nt4ga_filter.mp_flow_device;
p_nt4ga_stat->flm_stat_ver = ndev->be.flm.ver;
p_nt4ga_stat->mp_stat_structs_flm = calloc(1, sizeof(struct flm_counters_v1));
@@ -244,7 +244,7 @@ static int nt4ga_stat_collect_cap_v1_stats(struct adapter_info_s *p_adapter_info
uint32_t *p_stat_dma_virtual)
{
(void)p_adapter_info;
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL || p_nt4ga_stat == NULL)
return -1;
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
index b86865b24f..9838ad3c07 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
@@ -33,7 +33,7 @@ struct nt200a0x_ops {
};
void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops);
-struct nt200a0x_ops *get_nt200a0x_ops(void);
+struct nt200a0x_ops *nthw_get_nt200a0x_ops(void);
void nt200a0x_ops_init(void);
struct nt400dxx_ops {
@@ -41,7 +41,7 @@ struct nt400dxx_ops {
};
void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops);
-struct nt400dxx_ops *get_nt400dxx_ops(void);
+struct nt400dxx_ops *nthw_get_nt400dxx_ops(void);
void nt400dxx_ops_init(void);
#endif /* __NTHW_FPGA_H__ */
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
index 739b1aab85..371177c14f 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
@@ -15,7 +15,7 @@ static int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info)
const char *const p_adapter_id_str = p_fpga_info->mp_adapter_id_str;
struct nthw_fpga_rst_nt200a0x rst;
int res = -1;
- const struct rst_nt200a0x_ops *rst_nt200a0x_ops = get_rst_nt200a0x_ops();
+ const struct rst_nt200a0x_ops *rst_nt200a0x_ops = nthw_get_rst_nt200a0x_ops();
if (rst_nt200a0x_ops == NULL) {
NT_LOG(ERR, NTHW, "RST NT200A0X NOT INCLUDED");
@@ -32,7 +32,7 @@ static int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info)
}
bool included = true;
- struct rst9563_ops *rst9563_ops = get_rst9563_ops();
+ struct rst9563_ops *rst9563_ops = nthw_get_rst9563_ops();
/* reset specific */
switch (p_fpga_info->n_fpga_prod_id) {
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
index a345f163bb..f3a28e801e 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
@@ -160,7 +160,7 @@ static int nthw_fpga_rst9563_clock_synth_init(nthw_fpga_t *p_fpga,
const char *const p_adapter_id_str = p_fpga->p_fpga_info->mp_adapter_id_str;
const int n_fpga_product_id = p_fpga->mn_product_id;
int res;
- const struct clk9563_ops *clk9563_ops = get_clk9563_ops();
+ const struct clk9563_ops *clk9563_ops = nthw_get_clk9563_ops();
if (clk9563_ops == NULL) {
NT_LOG(INF, NTNIC, "CLK9563 module not included");
@@ -220,7 +220,7 @@ static int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
return res;
}
- const struct rst_nt200a0x_ops *rst_ops = get_rst_nt200a0x_ops();
+ const struct rst_nt200a0x_ops *rst_ops = nthw_get_rst_nt200a0x_ops();
res = rst_ops != NULL ? rst_ops->nthw_fpga_rst_nt200a0x_reset(p_fpga, p_rst) : -1;
if (res) {
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
index 234da0da33..1f87e36d08 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
@@ -124,7 +124,7 @@ static int nthw_fpga_nt400dxx_init(struct fpga_info_s *p_fpga_info)
switch (p_fpga_info->n_fpga_prod_id) {
case 9574:
- rst9574_ops = get_rst9574_ops();
+ rst9574_ops = nthw_get_rst9574_ops();
if (rst9574_ops == NULL) {
NT_LOG(ERR, NTHW, "%s: RST 9574 NOT INCLUDED", p_adapter_id_str);
@@ -148,7 +148,7 @@ static int nthw_fpga_nt400dxx_init(struct fpga_info_s *p_fpga_info)
return -1;
}
- struct rst_nt400dxx_ops *rst_nt400dxx_ops = get_rst_nt400dxx_ops();
+ struct rst_nt400dxx_ops *rst_nt400dxx_ops = nthw_get_rst_nt400dxx_ops();
if (rst_nt400dxx_ops == NULL) {
NT_LOG(ERR, NTHW, "RST NT400DXX NOT INCLUDED");
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index f18069e492..0e1f686b4f 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -431,8 +431,8 @@ int nthw_fpga_init(struct fpga_info_s *p_fpga_info)
nthw_rac_rab_flush(p_nthw_rac);
p_fpga_info->mp_nthw_rac = p_nthw_rac;
- struct nt200a0x_ops *nt200a0x_ops = get_nt200a0x_ops();
- struct nt400dxx_ops *nt400dxx_ops = get_nt400dxx_ops();
+ struct nt200a0x_ops *nt200a0x_ops = nthw_get_nt200a0x_ops();
+ struct nt400dxx_ops *nt400dxx_ops = nthw_get_nt400dxx_ops();
switch (p_fpga_info->n_nthw_adapter_id) {
case NT_HW_ADAPTER_ID_NT200A02:
@@ -562,7 +562,7 @@ void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops)
nt200a0x_ops = ops;
}
-struct nt200a0x_ops *get_nt200a0x_ops(void)
+struct nt200a0x_ops *nthw_get_nt200a0x_ops(void)
{
if (nt200a0x_ops == NULL)
nt200a0x_ops_init();
@@ -576,7 +576,7 @@ void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops)
nt400dxx_ops = ops;
}
-struct nt400dxx_ops *get_nt400dxx_ops(void)
+struct nt400dxx_ops *nthw_get_nt400dxx_ops(void)
{
if (nt400dxx_ops == NULL)
nt400dxx_ops_init();
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_api.c b/drivers/net/ntnic/nthw/flow_api/flow_api.c
index b737589e14..3e45db67d7 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_api.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_api.c
@@ -292,7 +292,7 @@ static struct flow_handle *flow_create(struct flow_eth_dev *dev __rte_unused,
const struct rte_flow_action action[] __rte_unused,
struct rte_flow_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -306,7 +306,7 @@ static struct flow_handle *flow_create(struct flow_eth_dev *dev __rte_unused,
static int flow_destroy(struct flow_eth_dev *dev __rte_unused,
struct flow_handle *flow __rte_unused, struct rte_flow_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -318,7 +318,7 @@ static int flow_destroy(struct flow_eth_dev *dev __rte_unused,
static int flow_flush(struct flow_eth_dev *dev, uint16_t caller_id, struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -333,7 +333,7 @@ static int flow_actions_update(struct flow_eth_dev *dev,
const struct rte_flow_action action[],
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -378,7 +378,7 @@ static int nic_remove_eth_port_dev(struct flow_nic_dev *ndev, struct flow_eth_de
static int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -453,7 +453,7 @@ static int nthw_flow_delete_eth_dev(struct flow_eth_dev *eth_dev)
static void flow_ndev_reset(struct flow_nic_dev *ndev)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -586,7 +586,7 @@ static struct flow_eth_dev *flow_get_eth_dev(uint8_t adapter_no, uint8_t port_no
int *rss_target_id, enum flow_eth_dev_profile flow_profile,
uint32_t exception_path)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL)
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -1015,7 +1015,7 @@ static int flow_dev_dump(struct flow_eth_dev *dev,
FILE *file,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: profile_inline module uninitialized", __func__);
@@ -1032,7 +1032,7 @@ static int flow_get_aged_flows(struct flow_eth_dev *dev,
uint32_t nb_contexts,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline_ops uninitialized");
@@ -1053,7 +1053,7 @@ static int flow_info_get(struct flow_eth_dev *dev, uint8_t caller_id,
struct rte_flow_port_info *port_info, struct rte_flow_queue_info *queue_info,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1068,7 +1068,7 @@ static int flow_configure(struct flow_eth_dev *dev, uint8_t caller_id,
const struct rte_flow_port_attr *port_attr, uint16_t nb_queue,
const struct rte_flow_queue_attr *queue_attr[], struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1088,7 +1088,7 @@ flow_pattern_template_create(struct flow_eth_dev *dev,
const struct rte_flow_pattern_template_attr *template_attr, uint16_t caller_id,
const struct rte_flow_item pattern[], struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1103,7 +1103,7 @@ static int flow_pattern_template_destroy(struct flow_eth_dev *dev,
struct flow_pattern_template *pattern_template,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1121,7 +1121,7 @@ flow_actions_template_create(struct flow_eth_dev *dev,
const struct rte_flow_action actions[], const struct rte_flow_action masks[],
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1136,7 +1136,7 @@ static int flow_actions_template_destroy(struct flow_eth_dev *dev,
struct flow_actions_template *actions_template,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1154,7 +1154,7 @@ static struct flow_template_table *flow_template_table_create(struct flow_eth_de
uint8_t nb_pattern_templates, struct flow_actions_template *actions_templates[],
uint8_t nb_actions_templates, struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1170,7 +1170,7 @@ static int flow_template_table_destroy(struct flow_eth_dev *dev,
struct flow_template_table *template_table,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1188,7 +1188,7 @@ flow_async_create(struct flow_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_action actions[], uint8_t actions_template_index, void *user_data,
struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1204,7 +1204,7 @@ static int flow_async_destroy(struct flow_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_op_attr *op_attr, struct flow_handle *flow,
void *user_data, struct rte_flow_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "profile_inline module uninitialized");
@@ -1216,7 +1216,7 @@ static int flow_async_destroy(struct flow_eth_dev *dev, uint32_t queue_id,
}
int nthw_flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t size)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL)
return -1;
@@ -1229,7 +1229,7 @@ int nthw_flow_get_flm_stats(struct flow_nic_dev *ndev, uint64_t *data, uint64_t
int nthw_flow_get_ifr_stats(struct flow_nic_dev *ndev, uint64_t *data, uint8_t port_count)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL)
return -1;
diff --git a/drivers/net/ntnic/nthw/flow_api/flow_filter.c b/drivers/net/ntnic/nthw/flow_api/flow_filter.c
index a4a95746e8..9de3ed3b7a 100644
--- a/drivers/net/ntnic/nthw/flow_api/flow_filter.c
+++ b/drivers/net/ntnic/nthw/flow_api/flow_filter.c
@@ -12,7 +12,7 @@ int nthw_flow_filter_init(nthw_fpga_t *p_fpga, struct flow_nic_dev **p_flow_devi
void *be_dev = NULL;
struct flow_nic_dev *flow_nic;
- const struct flow_backend_ops *flow_backend_ops = get_flow_backend_ops();
+ const struct flow_backend_ops *flow_backend_ops = nthw_get_flow_backend_ops();
if (flow_backend_ops == NULL) {
NT_LOG(ERR, FILTER, "%s: flow_backend module uninitialized", __func__);
@@ -41,7 +41,7 @@ int nthw_flow_filter_done(struct flow_nic_dev *dev)
int res = nthw_flow_api_done(dev);
if (be_dev) {
- const struct flow_backend_ops *flow_backend_ops = get_flow_backend_ops();
+ const struct flow_backend_ops *flow_backend_ops = nthw_get_flow_backend_ops();
if (flow_backend_ops == NULL) {
NT_LOG(WRN, FILTER, "%s: flow_backend module uninitialized", __func__);
diff --git a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
index a2c37774fe..95a875fc1a 100644
--- a/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
+++ b/drivers/net/ntnic/nthw/ntnic_meter/ntnic_meter.c
@@ -35,7 +35,7 @@ static int eth_mtr_capabilities_get_inline(struct rte_eth_dev *eth_dev,
struct rte_mtr_capabilities *cap,
struct rte_mtr_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -106,7 +106,7 @@ static int eth_mtr_meter_profile_add_inline(struct rte_eth_dev *eth_dev,
struct rte_mtr_meter_profile *profile,
struct rte_mtr_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -157,7 +157,7 @@ static int eth_mtr_meter_profile_delete_inline(struct rte_eth_dev *eth_dev,
uint32_t meter_profile_id,
struct rte_mtr_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -180,7 +180,7 @@ static int eth_mtr_meter_policy_add_inline(struct rte_eth_dev *eth_dev,
struct rte_mtr_meter_policy_params *policy,
struct rte_mtr_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -226,7 +226,7 @@ static int eth_mtr_meter_policy_delete_inline(struct rte_eth_dev *eth_dev __rte_
uint32_t policy_id,
struct rte_mtr_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -246,7 +246,7 @@ static int eth_mtr_create_inline(struct rte_eth_dev *eth_dev,
int shared,
struct rte_mtr_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -312,7 +312,7 @@ static int eth_mtr_destroy_inline(struct rte_eth_dev *eth_dev,
uint32_t mtr_id,
struct rte_mtr_error *error __rte_unused)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -342,7 +342,7 @@ static int eth_mtr_stats_adjust_inline(struct rte_eth_dev *eth_dev,
uint64_t adjust_value,
struct rte_mtr_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
@@ -405,7 +405,7 @@ static int eth_mtr_stats_read_inline(struct rte_eth_dev *eth_dev,
int clear,
struct rte_mtr_error *error)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG(ERR, NTHW, "profile_inline module uninitialized");
diff --git a/drivers/net/ntnic/ntnic_ethdev.c b/drivers/net/ntnic/ntnic_ethdev.c
index 4812713bd6..3edf7796f7 100644
--- a/drivers/net/ntnic/ntnic_ethdev.c
+++ b/drivers/net/ntnic/ntnic_ethdev.c
@@ -162,7 +162,7 @@ get_pdrv_from_pci(struct rte_pci_addr addr)
static int dpdk_stats_collect(struct pmd_internals *internals, struct rte_eth_stats *stats)
{
- const struct ntnic_filter_ops *ntnic_filter_ops = get_ntnic_filter_ops();
+ const struct ntnic_filter_ops *ntnic_filter_ops = nthw_get_filter_ops();
if (ntnic_filter_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "ntnic_filter_ops uninitialized");
@@ -261,7 +261,7 @@ static int dpdk_stats_reset(struct pmd_internals *internals, struct ntdrv_4ga_s
static int
eth_link_update(struct rte_eth_dev *eth_dev, int wait_to_complete __rte_unused)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
@@ -317,7 +317,7 @@ static int eth_stats_reset(struct rte_eth_dev *eth_dev)
static int
eth_dev_infos_get(struct rte_eth_dev *eth_dev, struct rte_eth_dev_info *dev_info)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
@@ -1081,7 +1081,7 @@ static int eth_tx_scg_queue_setup(struct rte_eth_dev *eth_dev,
unsigned int socket_id __rte_unused,
const struct rte_eth_txconf *tx_conf)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "Link management module uninitialized");
@@ -1181,7 +1181,7 @@ static int eth_tx_scg_queue_setup(struct rte_eth_dev *eth_dev,
static int dev_set_mtu_inline(struct rte_eth_dev *eth_dev, uint16_t mtu)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "profile_inline module uninitialized");
@@ -1367,14 +1367,14 @@ eth_dev_configure(struct rte_eth_dev *eth_dev)
static int
eth_dev_start(struct rte_eth_dev *eth_dev)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
return -1;
}
- eth_dev->flow_fp_ops = get_dev_fp_flow_ops();
+ eth_dev->flow_fp_ops = nthw_get_dev_fp_flow_ops();
struct pmd_internals *internals = eth_dev->data->dev_private;
const int n_intf_no = internals->n_intf_no;
@@ -1459,7 +1459,7 @@ eth_dev_stop(struct rte_eth_dev *eth_dev)
static int
eth_dev_set_link_up(struct rte_eth_dev *eth_dev)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
@@ -1484,7 +1484,7 @@ eth_dev_set_link_up(struct rte_eth_dev *eth_dev)
static int
eth_dev_set_link_down(struct rte_eth_dev *eth_dev)
{
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
@@ -1509,14 +1509,14 @@ eth_dev_set_link_down(struct rte_eth_dev *eth_dev)
static void
drv_deinit(struct drv_s *p_drv)
{
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "profile_inline module uninitialized");
return;
}
- const struct adapter_ops *adapter_ops = get_adapter_ops();
+ const struct adapter_ops *adapter_ops = nthw_get_adapter_ops();
if (adapter_ops == NULL) {
NT_LOG(ERR, NTNIC, "Adapter module uninitialized");
@@ -1623,7 +1623,7 @@ eth_fw_version_get(struct rte_eth_dev *eth_dev, char *fw_version, size_t fw_size
static int dev_flow_ops_get(struct rte_eth_dev *dev __rte_unused, const struct rte_flow_ops **ops)
{
- *ops = get_dev_flow_ops();
+ *ops = nthw_get_dev_flow_ops();
return 0;
}
@@ -1636,7 +1636,7 @@ static int eth_xstats_get(struct rte_eth_dev *eth_dev, struct rte_eth_xstat *sta
int n_intf_no = internals->n_intf_no;
int nb_xstats;
- const struct ntnic_xstats_ops *ntnic_xstats_ops = get_ntnic_xstats_ops();
+ const struct ntnic_xstats_ops *ntnic_xstats_ops = nthw_get_xstats_ops();
if (ntnic_xstats_ops == NULL) {
NT_LOG(INF, NTNIC, "ntnic_xstats module not included");
@@ -1661,7 +1661,7 @@ static int eth_xstats_get_by_id(struct rte_eth_dev *eth_dev,
int n_intf_no = internals->n_intf_no;
int nb_xstats;
- const struct ntnic_xstats_ops *ntnic_xstats_ops = get_ntnic_xstats_ops();
+ const struct ntnic_xstats_ops *ntnic_xstats_ops = nthw_get_xstats_ops();
if (ntnic_xstats_ops == NULL) {
NT_LOG(INF, NTNIC, "ntnic_xstats module not included");
@@ -1683,7 +1683,7 @@ static int eth_xstats_reset(struct rte_eth_dev *eth_dev)
nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat;
int n_intf_no = internals->n_intf_no;
- struct ntnic_xstats_ops *ntnic_xstats_ops = get_ntnic_xstats_ops();
+ struct ntnic_xstats_ops *ntnic_xstats_ops = nthw_get_xstats_ops();
if (ntnic_xstats_ops == NULL) {
NT_LOG(INF, NTNIC, "ntnic_xstats module not included");
@@ -1704,7 +1704,7 @@ static int eth_xstats_get_names(struct rte_eth_dev *eth_dev,
ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv;
nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat;
- const struct ntnic_xstats_ops *ntnic_xstats_ops = get_ntnic_xstats_ops();
+ const struct ntnic_xstats_ops *ntnic_xstats_ops = nthw_get_xstats_ops();
if (ntnic_xstats_ops == NULL) {
NT_LOG(INF, NTNIC, "ntnic_xstats module not included");
@@ -1723,7 +1723,7 @@ static int eth_xstats_get_names_by_id(struct rte_eth_dev *eth_dev,
struct drv_s *p_drv = internals->p_drv;
ntdrv_4ga_t *p_nt_drv = &p_drv->ntdrv;
nt4ga_stat_t *p_nt4ga_stat = &p_nt_drv->adapter_info.nt4ga_stat;
- const struct ntnic_xstats_ops *ntnic_xstats_ops = get_ntnic_xstats_ops();
+ const struct ntnic_xstats_ops *ntnic_xstats_ops = nthw_get_xstats_ops();
if (ntnic_xstats_ops == NULL) {
NT_LOG(INF, NTNIC, "ntnic_xstats module not included");
@@ -1743,7 +1743,7 @@ promiscuous_enable(struct rte_eth_dev __rte_unused(*dev))
static int eth_dev_rss_hash_update(struct rte_eth_dev *eth_dev, struct rte_eth_rss_conf *rss_conf)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "flow_filter module uninitialized");
@@ -2035,7 +2035,7 @@ static int adapter_flm_update_service(void *context)
dev = p_flow_nic_dev->eth_base;
- profile_inline_ops = get_profile_inline_ops();
+ profile_inline_ops = nthw_get_profile_inline_ops();
RTE_ASSERT(profile_inline_ops != NULL);
NT_LOG(INF, NTNIC, "flm update service started on lcore %i", rte_lcore_id());
@@ -2067,7 +2067,7 @@ static int adapter_stat_service(void *context)
struct drv_s *p_drv = context;
RTE_ASSERT(p_drv != NULL);
- nt4ga_stat_ops = get_nt4ga_stat_ops();
+ nt4ga_stat_ops = nthw_get_nt4ga_stat_ops();
RTE_ASSERT(nt4ga_stat_ops != NULL);
p_nt_drv = &p_drv->ntdrv;
@@ -2136,14 +2136,14 @@ static int adapter_stat_service(void *context)
static int
nthw_pci_dev_init(struct rte_pci_device *pci_dev)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "flow_filter module uninitialized");
/* Return statement is not necessary here to allow traffic processing by SW */
}
- const struct profile_inline_ops *profile_inline_ops = get_profile_inline_ops();
+ const struct profile_inline_ops *profile_inline_ops = nthw_get_profile_inline_ops();
if (profile_inline_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "profile_inline module uninitialized");
@@ -2151,14 +2151,14 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
}
nthw_vfio_init();
- const struct port_ops *port_ops = get_port_ops();
+ const struct port_ops *port_ops = nthw_get_port_ops();
if (port_ops == NULL) {
NT_LOG(ERR, NTNIC, "Link management module uninitialized");
return -1;
}
- const struct adapter_ops *adapter_ops = get_adapter_ops();
+ const struct adapter_ops *adapter_ops = nthw_get_adapter_ops();
if (adapter_ops == NULL) {
NT_LOG(ERR, NTNIC, "Adapter module uninitialized");
@@ -2328,7 +2328,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
return -1;
}
- const struct meter_ops_s *meter_ops = get_meter_ops();
+ const struct meter_ops_s *meter_ops = nthw_get_meter_ops();
if (meter_ops != NULL)
nthw_eth_dev_ops.mtr_ops_get = meter_ops->eth_mtr_ops_get;
@@ -2337,7 +2337,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
NT_LOG(DBG, NTNIC, "Meter module is not initialized");
/* Initialize the queue system */
- sg_ops = get_sg_ops();
+ sg_ops = nthw_get_sg_ops();
if (sg_ops != NULL) {
err = sg_ops->nthw_virt_queue_init(fpga_info);
@@ -2556,7 +2556,7 @@ nthw_pci_dev_init(struct rte_pci_device *pci_dev)
/* increase initialized ethernet devices - PF */
p_drv->n_eth_dev_init_count++;
- if (get_flow_filter_ops() != NULL) {
+ if (nthw_get_flow_filter_ops() != NULL) {
if (fpga_info->profile == FPGA_INFO_PROFILE_INLINE &&
internals->flw_dev->ndev->be.tpe.ver >= 2) {
RTE_ASSERT(nthw_eth_dev_ops.mtu_set == dev_set_mtu_inline ||
diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index 2d0d0ea54f..5a0ef125be 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -540,7 +540,7 @@ static int convert_flow(struct rte_eth_dev *eth_dev,
static int
eth_flow_destroy(struct rte_eth_dev *eth_dev, struct rte_flow *flow, struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -584,7 +584,7 @@ static struct rte_flow *eth_flow_create(struct rte_eth_dev *eth_dev,
const struct rte_flow_action actions[],
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -667,7 +667,7 @@ static struct rte_flow *eth_flow_create(struct rte_eth_dev *eth_dev,
static int eth_flow_flush(struct rte_eth_dev *eth_dev, struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -708,7 +708,7 @@ static int eth_flow_actions_update(struct rte_eth_dev *eth_dev,
const struct rte_flow_action actions[],
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG(ERR, FILTER, "flow_filter module uninitialized");
@@ -770,7 +770,7 @@ static int eth_flow_dev_dump(struct rte_eth_dev *eth_dev,
FILE *file,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG(ERR, NTNIC, "%s: flow_filter module uninitialized", __func__);
@@ -797,7 +797,7 @@ static int eth_flow_get_aged_flows(struct rte_eth_dev *eth_dev,
uint32_t nb_contexts,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "flow_filter module uninitialized");
@@ -824,7 +824,7 @@ static int eth_flow_get_aged_flows(struct rte_eth_dev *eth_dev,
static int eth_flow_info_get(struct rte_eth_dev *dev, struct rte_flow_port_info *port_info,
struct rte_flow_queue_info *queue_info, struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -849,7 +849,7 @@ static int eth_flow_configure(struct rte_eth_dev *dev, const struct rte_flow_por
uint16_t nb_queue, const struct rte_flow_queue_attr *queue_attr[],
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -875,7 +875,7 @@ static struct rte_flow_pattern_template *eth_flow_pattern_template_create(struct
const struct rte_flow_pattern_template_attr *template_attr,
const struct rte_flow_item pattern[], struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -914,7 +914,7 @@ static int eth_flow_pattern_template_destroy(struct rte_eth_dev *dev,
struct rte_flow_pattern_template *pattern_template,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -939,7 +939,7 @@ static struct rte_flow_actions_template *eth_flow_actions_template_create(struct
const struct rte_flow_action actions[], const struct rte_flow_action masks[],
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -1000,7 +1000,7 @@ static int eth_flow_actions_template_destroy(struct rte_eth_dev *dev,
struct rte_flow_actions_template *actions_template,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, NTNIC, "flow_filter module uninitialized");
@@ -1026,7 +1026,7 @@ static struct rte_flow_template_table *eth_flow_template_table_create(struct rte
struct rte_flow_actions_template *actions_templates[], uint8_t nb_actions_templates,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -1065,7 +1065,7 @@ static int eth_flow_template_table_destroy(struct rte_eth_dev *dev,
struct rte_flow_template_table *template_table,
struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -1091,7 +1091,7 @@ static struct rte_flow *eth_flow_async_create(struct rte_eth_dev *dev, uint32_t
uint8_t pattern_template_index, const struct rte_flow_action actions[],
uint8_t actions_template_index, void *user_data, struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
@@ -1151,7 +1151,7 @@ static int eth_flow_async_destroy(struct rte_eth_dev *dev, uint32_t queue_id,
const struct rte_flow_op_attr *op_attr, struct rte_flow *flow,
void *user_data, struct rte_flow_error *error)
{
- const struct flow_filter_ops *flow_filter_ops = get_flow_filter_ops();
+ const struct flow_filter_ops *flow_filter_ops = nthw_get_flow_filter_ops();
if (flow_filter_ops == NULL) {
NT_LOG_DBGX(ERR, FILTER, "flow_filter module uninitialized");
diff --git a/drivers/net/ntnic/ntnic_mod_reg.c b/drivers/net/ntnic/ntnic_mod_reg.c
index be872aa090..67ba694e25 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.c
+++ b/drivers/net/ntnic/ntnic_mod_reg.c
@@ -12,7 +12,7 @@ void nthw_reg_sg_ops(struct sg_ops_s *ops)
sg_ops = ops;
}
-const struct sg_ops_s *get_sg_ops(void)
+const struct sg_ops_s *nthw_get_sg_ops(void)
{
if (sg_ops == NULL)
nthw_sg_init();
@@ -29,7 +29,7 @@ void nthw_reg_meter_ops(struct meter_ops_s *ops)
meter_ops = ops;
}
-const struct meter_ops_s *get_meter_ops(void)
+const struct meter_ops_s *nthw_get_meter_ops(void)
{
if (meter_ops == NULL)
nthw_meter_init();
@@ -47,7 +47,7 @@ void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops)
ntnic_filter_ops = ops;
}
-const struct ntnic_filter_ops *get_ntnic_filter_ops(void)
+const struct ntnic_filter_ops *nthw_get_filter_ops(void)
{
if (ntnic_filter_ops == NULL)
ntnic_filter_init();
@@ -62,7 +62,7 @@ void nthw_reg_100g_link_ops(struct link_ops_s *ops)
link_100g_ops = ops;
}
-const struct link_ops_s *get_100g_link_ops(void)
+const struct link_ops_s *nthw_get_100g_link_ops(void)
{
if (link_100g_ops == NULL)
nthw_link_100g_init();
@@ -79,7 +79,7 @@ void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops)
link_agx_100g_ops = ops;
}
-const struct link_ops_s *get_agx_100g_link_ops(void)
+const struct link_ops_s *nthw_get_agx_100g_link_ops(void)
{
if (link_agx_100g_ops == NULL)
link_agx_100g_init();
@@ -93,7 +93,7 @@ void nthw_reg_port_ops(const struct port_ops *ops)
port_ops = ops;
}
-const struct port_ops *get_port_ops(void)
+const struct port_ops *nthw_get_port_ops(void)
{
if (port_ops == NULL)
nthw_port_init();
@@ -107,7 +107,7 @@ void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
nt4ga_stat_ops = ops;
}
-const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void)
+const struct nt4ga_stat_ops *nthw_get_nt4ga_stat_ops(void)
{
if (nt4ga_stat_ops == NULL)
nt4ga_stat_ops_init();
@@ -122,7 +122,7 @@ void nthw_reg_adapter_ops(const struct adapter_ops *ops)
adapter_ops = ops;
}
-const struct adapter_ops *get_adapter_ops(void)
+const struct adapter_ops *nthw_get_adapter_ops(void)
{
if (adapter_ops == NULL)
nthw_adapter_init();
@@ -136,7 +136,7 @@ void nthw_reg_clk9563_ops(struct clk9563_ops *ops)
clk9563_ops = ops;
}
-struct clk9563_ops *get_clk9563_ops(void)
+struct clk9563_ops *nthw_get_clk9563_ops(void)
{
if (clk9563_ops == NULL)
clk9563_ops_init();
@@ -150,7 +150,7 @@ void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
rst_nt200a0x_ops = ops;
}
-struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void)
+struct rst_nt200a0x_ops *nthw_get_rst_nt200a0x_ops(void)
{
if (rst_nt200a0x_ops == NULL)
rst_nt200a0x_ops_init();
@@ -164,7 +164,7 @@ void nthw_reg_rst9563_ops(struct rst9563_ops *ops)
rst9563_ops = ops;
}
-struct rst9563_ops *get_rst9563_ops(void)
+struct rst9563_ops *nthw_get_rst9563_ops(void)
{
if (rst9563_ops == NULL)
rst9563_ops_init();
@@ -185,7 +185,7 @@ void nthw_reg_rst9574_ops(struct rst9574_ops *ops)
rst9574_ops = ops;
}
-struct rst9574_ops *get_rst9574_ops(void)
+struct rst9574_ops *nthw_get_rst9574_ops(void)
{
if (rst9574_ops == NULL)
rst9574_ops_init();
@@ -200,7 +200,7 @@ void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops)
rst_nt400dxx_ops = ops;
}
-struct rst_nt400dxx_ops *get_rst_nt400dxx_ops(void)
+struct rst_nt400dxx_ops *nthw_get_rst_nt400dxx_ops(void)
{
if (rst_nt400dxx_ops == NULL)
rst_nt400dxx_ops_init();
@@ -208,7 +208,7 @@ struct rst_nt400dxx_ops *get_rst_nt400dxx_ops(void)
return rst_nt400dxx_ops;
}
-const struct flow_backend_ops *get_flow_backend_ops(void)
+const struct flow_backend_ops *nthw_get_flow_backend_ops(void)
{
if (flow_backend_ops == NULL)
nthw_flow_backend_init();
@@ -223,7 +223,7 @@ void nthw_reg_profile_inline_ops(const struct profile_inline_ops *ops)
profile_inline_ops = ops;
}
-const struct profile_inline_ops *get_profile_inline_ops(void)
+const struct profile_inline_ops *nthw_get_profile_inline_ops(void)
{
if (profile_inline_ops == NULL)
nthw_profile_inline_init();
@@ -238,7 +238,7 @@ void nthw_reg_flow_filter_ops(const struct flow_filter_ops *ops)
flow_filter_ops = ops;
}
-const struct flow_filter_ops *get_flow_filter_ops(void)
+const struct flow_filter_ops *nthw_get_flow_filter_ops(void)
{
if (flow_filter_ops == NULL)
nthw_init_flow_filter();
@@ -253,7 +253,7 @@ void nthw_reg_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops)
dev_fp_flow_ops = ops;
}
-const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void)
+const struct rte_flow_fp_ops *nthw_get_dev_fp_flow_ops(void)
{
if (dev_fp_flow_ops == NULL)
nthw_dev_fp_flow_init();
@@ -268,7 +268,7 @@ void nthw_reg_dev_flow_ops(const struct rte_flow_ops *ops)
dev_flow_ops = ops;
}
-const struct rte_flow_ops *get_dev_flow_ops(void)
+const struct rte_flow_ops *nthw_get_dev_flow_ops(void)
{
if (dev_flow_ops == NULL)
nthw_dev_flow_init();
@@ -283,7 +283,7 @@ void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops)
ntnic_xstats_ops = ops;
}
-struct ntnic_xstats_ops *get_ntnic_xstats_ops(void)
+struct ntnic_xstats_ops *nthw_get_xstats_ops(void)
{
if (ntnic_xstats_ops == NULL)
ntnic_xstats_ops_init();
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h
index 26c8723afa..2ed2286911 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -120,7 +120,7 @@ struct sg_ops_s {
};
void nthw_reg_sg_ops(struct sg_ops_s *ops);
-const struct sg_ops_s *get_sg_ops(void);
+const struct sg_ops_s *nthw_get_sg_ops(void);
void nthw_sg_init(void);
/* Meter ops section */
@@ -129,7 +129,7 @@ struct meter_ops_s {
};
void nthw_reg_meter_ops(struct meter_ops_s *ops);
-const struct meter_ops_s *get_meter_ops(void);
+const struct meter_ops_s *nthw_get_meter_ops(void);
void nthw_meter_init(void);
/*
@@ -140,7 +140,7 @@ struct ntnic_filter_ops {
};
void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops);
-const struct ntnic_filter_ops *get_ntnic_filter_ops(void);
+const struct ntnic_filter_ops *nthw_get_filter_ops(void);
void ntnic_filter_init(void);
struct link_ops_s {
@@ -148,11 +148,11 @@ struct link_ops_s {
};
void nthw_reg_100g_link_ops(struct link_ops_s *ops);
-const struct link_ops_s *get_100g_link_ops(void);
+const struct link_ops_s *nthw_get_100g_link_ops(void);
void nthw_link_100g_init(void);
void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops);
-const struct link_ops_s *get_agx_100g_link_ops(void);
+const struct link_ops_s *nthw_get_agx_100g_link_ops(void);
void link_agx_100g_init(void);
struct port_ops {
@@ -208,7 +208,7 @@ struct port_ops {
};
void nthw_reg_port_ops(const struct port_ops *ops);
-const struct port_ops *get_port_ops(void);
+const struct port_ops *nthw_get_port_ops(void);
void nthw_port_init(void);
struct nt4ga_stat_ops {
@@ -219,7 +219,7 @@ struct nt4ga_stat_ops {
};
void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops);
-const struct nt4ga_stat_ops *get_nt4ga_stat_ops(void);
+const struct nt4ga_stat_ops *nthw_get_nt4ga_stat_ops(void);
void nt4ga_stat_ops_init(void);
struct adapter_ops {
@@ -230,7 +230,7 @@ struct adapter_ops {
};
void nthw_reg_adapter_ops(const struct adapter_ops *ops);
-const struct adapter_ops *get_adapter_ops(void);
+const struct adapter_ops *nthw_get_adapter_ops(void);
void nthw_adapter_init(void);
struct clk9563_ops {
@@ -239,7 +239,7 @@ struct clk9563_ops {
};
void nthw_reg_clk9563_ops(struct clk9563_ops *ops);
-struct clk9563_ops *get_clk9563_ops(void);
+struct clk9563_ops *nthw_get_clk9563_ops(void);
void clk9563_ops_init(void);
struct rst_nt200a0x_ops {
@@ -250,7 +250,7 @@ struct rst_nt200a0x_ops {
};
void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops);
-struct rst_nt200a0x_ops *get_rst_nt200a0x_ops(void);
+struct rst_nt200a0x_ops *nthw_get_rst_nt200a0x_ops(void);
void rst_nt200a0x_ops_init(void);
struct rst9563_ops {
@@ -259,7 +259,7 @@ struct rst9563_ops {
};
void nthw_reg_rst9563_ops(struct rst9563_ops *ops);
-struct rst9563_ops *get_rst9563_ops(void);
+struct rst9563_ops *nthw_get_rst9563_ops(void);
void rst9563_ops_init(void);
struct rst9574_ops {
@@ -270,7 +270,7 @@ struct rst9574_ops {
};
void nthw_reg_rst9574_ops(struct rst9574_ops *ops);
-struct rst9574_ops *get_rst9574_ops(void);
+struct rst9574_ops *nthw_get_rst9574_ops(void);
void rst9574_ops_init(void);
struct rst_nt400dxx_ops {
@@ -279,7 +279,7 @@ struct rst_nt400dxx_ops {
};
void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops);
-struct rst_nt400dxx_ops *get_rst_nt400dxx_ops(void);
+struct rst_nt400dxx_ops *nthw_get_rst_nt400dxx_ops(void);
void rst_nt400dxx_ops_init(void);
struct flow_backend_ops {
@@ -289,7 +289,7 @@ struct flow_backend_ops {
};
void nthw_reg_flow_backend_ops(const struct flow_backend_ops *ops);
-const struct flow_backend_ops *get_flow_backend_ops(void);
+const struct flow_backend_ops *nthw_get_flow_backend_ops(void);
void nthw_flow_backend_init(void);
struct profile_inline_ops {
@@ -447,7 +447,7 @@ struct profile_inline_ops {
};
void nthw_reg_profile_inline_ops(const struct profile_inline_ops *ops);
-const struct profile_inline_ops *get_profile_inline_ops(void);
+const struct profile_inline_ops *nthw_get_profile_inline_ops(void);
void nthw_profile_inline_init(void);
struct flow_filter_ops {
@@ -560,15 +560,15 @@ struct flow_filter_ops {
};
void nthw_reg_dev_fp_flow_ops(const struct rte_flow_fp_ops *ops);
-const struct rte_flow_fp_ops *get_dev_fp_flow_ops(void);
+const struct rte_flow_fp_ops *nthw_get_dev_fp_flow_ops(void);
void nthw_dev_fp_flow_init(void);
void nthw_reg_dev_flow_ops(const struct rte_flow_ops *ops);
-const struct rte_flow_ops *get_dev_flow_ops(void);
+const struct rte_flow_ops *nthw_get_dev_flow_ops(void);
void nthw_dev_flow_init(void);
void nthw_reg_flow_filter_ops(const struct flow_filter_ops *ops);
-const struct flow_filter_ops *get_flow_filter_ops(void);
+const struct flow_filter_ops *nthw_get_flow_filter_ops(void);
void nthw_init_flow_filter(void);
struct ntnic_xstats_ops {
@@ -592,7 +592,7 @@ struct ntnic_xstats_ops {
};
void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops);
-struct ntnic_xstats_ops *get_ntnic_xstats_ops(void);
+struct ntnic_xstats_ops *nthw_get_xstats_ops(void);
void ntnic_xstats_ops_init(void);
#endif /* __NTNIC_MOD_REG_H__ */
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 14/16] net/ntnic: rename ops_init functions
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (12 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 13/16] net/ntnic: rename get ops functions Serhii Iliushyk
@ 2025-09-19 9:14 ` 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 ` [PATCH v1 16/16] net/ntnic: rename table id functions Serhii Iliushyk
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:14 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Add prefix nthw_ to ops init function to follow the naming convention.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
.../net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 2 +-
.../link_agx_100g/nt4ga_agx_link_100g.c | 2 +-
.../net/ntnic/nthw/core/include/nthw_fpga.h | 4 ++--
.../clock_profiles/nthw_fpga_clk9563.c | 2 +-
.../nthw/core/nt200a0x/nthw_fpga_nt200a0x.c | 2 +-
.../core/nt200a0x/reset/nthw_fpga_rst9563.c | 2 +-
.../nt200a0x/reset/nthw_fpga_rst_nt200a0x.c | 2 +-
.../nthw/core/nt400dxx/nthw_fpga_nt400dxx.c | 2 +-
.../core/nt400dxx/reset/nthw_fpga_rst9574.c | 2 +-
.../nt400dxx/reset/nthw_fpga_rst_nt400dxx.c | 2 +-
drivers/net/ntnic/nthw/core/nthw_fpga.c | 4 ++--
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 2 +-
drivers/net/ntnic/ntnic_mod_reg.c | 18 +++++++++---------
drivers/net/ntnic/ntnic_mod_reg.h | 18 +++++++++---------
drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c | 2 +-
15 files changed, 33 insertions(+), 33 deletions(-)
diff --git a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
index 0f7e1f2b00..57b5b147f8 100644
--- a/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
+++ b/drivers/net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c
@@ -593,7 +593,7 @@ static struct nt4ga_stat_ops ops = {
.nt4ga_stat_collect = nt4ga_stat_collect
};
-void nt4ga_stat_ops_init(void)
+void nthw_stat_ops_init(void)
{
NT_LOG_DBGX(DBG, NTNIC, "Stat module was initialized");
nthw_reg_nt4ga_stat_ops(&ops);
diff --git a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
index 1387bb4148..36ecf0d0ec 100644
--- a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
@@ -35,7 +35,7 @@ static struct link_ops_s link_agx_100g_ops = {
.link_init = nt4ga_agx_link_100g_ports_init,
};
-void link_agx_100g_init(void)
+void nthw_link_agx_100g_ops_init(void)
{
nthw_reg_agx_100g_link_ops(&link_agx_100g_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
index 9838ad3c07..532d19d6b8 100644
--- a/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
+++ b/drivers/net/ntnic/nthw/core/include/nthw_fpga.h
@@ -34,7 +34,7 @@ struct nt200a0x_ops {
void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops);
struct nt200a0x_ops *nthw_get_nt200a0x_ops(void);
-void nt200a0x_ops_init(void);
+void nthw_nt200a0x_ops_init(void);
struct nt400dxx_ops {
int (*nthw_fpga_nt400dxx_init)(struct fpga_info_s *p_fpga_info);
@@ -42,6 +42,6 @@ struct nt400dxx_ops {
void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops);
struct nt400dxx_ops *nthw_get_nt400dxx_ops(void);
-void nt400dxx_ops_init(void);
+void nthw_nt400dxx_ops_init(void);
#endif /* __NTHW_FPGA_H__ */
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
index eeca816899..91c9795956 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/clock_profiles/nthw_fpga_clk9563.c
@@ -33,7 +33,7 @@ static struct clk9563_ops ops = { .get_n_data_9563_si5340_nt200a02_u23_v5 =
get_p_data_9563_si5340_nt200a02_u23_v5
};
-void clk9563_ops_init(void)
+void nthw_clk9563_ops_init(void)
{
nthw_reg_clk9563_ops(&ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
index 371177c14f..20bacf8988 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/nthw_fpga_nt200a0x.c
@@ -69,7 +69,7 @@ static int nthw_fpga_nt200a0x_init(struct fpga_info_s *p_fpga_info)
static struct nt200a0x_ops nt200a0x_ops = { .nthw_fpga_nt200a0x_init = nthw_fpga_nt200a0x_init };
-void nt200a0x_ops_init(void)
+void nthw_nt200a0x_ops_init(void)
{
NT_LOG(DBG, NTHW, "NT200A0X OPS INIT");
nthw_reg_nt200a0x_ops(&nt200a0x_ops);
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
index f3a28e801e..c99c9ecbe6 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst9563.c
@@ -233,7 +233,7 @@ static int nthw_fpga_rst9563_init(struct fpga_info_s *p_fpga_info,
static struct rst9563_ops rst9563_ops = { .nthw_fpga_rst9563_init = nthw_fpga_rst9563_init };
-void rst9563_ops_init(void)
+void nthw_rst9563_ops_init(void)
{
NT_LOG(DBG, NTHW, "RST9563 OPS INIT");
nthw_reg_rst9563_ops(&rst9563_ops);
diff --git a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
index 4a2fca5f19..39345369ef 100644
--- a/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
+++ b/drivers/net/ntnic/nthw/core/nt200a0x/reset/nthw_fpga_rst_nt200a0x.c
@@ -575,7 +575,7 @@ static struct rst_nt200a0x_ops rst_nt200a0x_ops = { .nthw_fpga_rst_nt200a0x_init
nthw_fpga_rst_nt200a0x_reset
};
-void rst_nt200a0x_ops_init(void)
+void nthw_rst_nt200a0x_ops_init(void)
{
NT_LOG(DBG, NTHW, "RST NT200A0X OPS INIT");
nthw_reg_rst_nt200a0x_ops(&rst_nt200a0x_ops);
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
index 1f87e36d08..cc4bee9d4d 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/nthw_fpga_nt400dxx.c
@@ -213,7 +213,7 @@ static int nthw_fpga_nt400dxx_init(struct fpga_info_s *p_fpga_info)
static struct nt400dxx_ops nt400dxx_ops = { .nthw_fpga_nt400dxx_init = nthw_fpga_nt400dxx_init };
-void nt400dxx_ops_init(void)
+void nthw_nt400dxx_ops_init(void)
{
nthw_reg_nt400dxx_ops(&nt400dxx_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
index 36d2c46fc6..38614e9365 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst9574.c
@@ -371,7 +371,7 @@ static struct rst9574_ops rst9574_ops = {
.nthw_fpga_rst9574_setup = nthw_fpga_rst9574_setup,
};
-void rst9574_ops_init(void)
+void nthw_rst9574_ops_init(void)
{
nthw_reg_rst9574_ops(&rst9574_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
index 67c562627d..90d0680b99 100644
--- a/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
+++ b/drivers/net/ntnic/nthw/core/nt400dxx/reset/nthw_fpga_rst_nt400dxx.c
@@ -421,7 +421,7 @@ static struct rst_nt400dxx_ops rst_nt400dxx_ops = {
.nthw_fpga_rst_nt400dxx_reset = nthw_fpga_rst_nt400dxx_reset
};
-void rst_nt400dxx_ops_init(void)
+void nthw_rst_nt400dxx_ops_init(void)
{
nthw_reg_rst_nt400dxx_ops(&rst_nt400dxx_ops);
}
diff --git a/drivers/net/ntnic/nthw/core/nthw_fpga.c b/drivers/net/ntnic/nthw/core/nthw_fpga.c
index 0e1f686b4f..24cfb6c284 100644
--- a/drivers/net/ntnic/nthw/core/nthw_fpga.c
+++ b/drivers/net/ntnic/nthw/core/nthw_fpga.c
@@ -565,7 +565,7 @@ void nthw_reg_nt200a0x_ops(struct nt200a0x_ops *ops)
struct nt200a0x_ops *nthw_get_nt200a0x_ops(void)
{
if (nt200a0x_ops == NULL)
- nt200a0x_ops_init();
+ nthw_nt200a0x_ops_init();
return nt200a0x_ops;
}
@@ -579,6 +579,6 @@ void nthw_reg_nt400dxx_ops(struct nt400dxx_ops *ops)
struct nt400dxx_ops *nthw_get_nt400dxx_ops(void)
{
if (nt400dxx_ops == NULL)
- nt400dxx_ops_init();
+ nthw_nt400dxx_ops_init();
return nt400dxx_ops;
}
diff --git a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
index 5a0ef125be..813ac04481 100644
--- a/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
+++ b/drivers/net/ntnic/ntnic_filter/ntnic_filter.c
@@ -1289,7 +1289,7 @@ static const struct ntnic_filter_ops ntnic_filter_ops = {
.poll_statistics = poll_statistics,
};
-void ntnic_filter_init(void)
+void nthw_filter_ops_init(void)
{
nthw_reg_filter_ops(&ntnic_filter_ops);
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.c b/drivers/net/ntnic/ntnic_mod_reg.c
index 67ba694e25..00eb07f848 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.c
+++ b/drivers/net/ntnic/ntnic_mod_reg.c
@@ -50,7 +50,7 @@ void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops)
const struct ntnic_filter_ops *nthw_get_filter_ops(void)
{
if (ntnic_filter_ops == NULL)
- ntnic_filter_init();
+ nthw_filter_ops_init();
return ntnic_filter_ops;
}
@@ -82,7 +82,7 @@ void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops)
const struct link_ops_s *nthw_get_agx_100g_link_ops(void)
{
if (link_agx_100g_ops == NULL)
- link_agx_100g_init();
+ nthw_link_agx_100g_ops_init();
return link_agx_100g_ops;
}
@@ -110,7 +110,7 @@ void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops)
const struct nt4ga_stat_ops *nthw_get_nt4ga_stat_ops(void)
{
if (nt4ga_stat_ops == NULL)
- nt4ga_stat_ops_init();
+ nthw_stat_ops_init();
return nt4ga_stat_ops;
}
@@ -139,7 +139,7 @@ void nthw_reg_clk9563_ops(struct clk9563_ops *ops)
struct clk9563_ops *nthw_get_clk9563_ops(void)
{
if (clk9563_ops == NULL)
- clk9563_ops_init();
+ nthw_clk9563_ops_init();
return clk9563_ops;
}
@@ -153,7 +153,7 @@ void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops)
struct rst_nt200a0x_ops *nthw_get_rst_nt200a0x_ops(void)
{
if (rst_nt200a0x_ops == NULL)
- rst_nt200a0x_ops_init();
+ nthw_rst_nt200a0x_ops_init();
return rst_nt200a0x_ops;
}
@@ -167,7 +167,7 @@ void nthw_reg_rst9563_ops(struct rst9563_ops *ops)
struct rst9563_ops *nthw_get_rst9563_ops(void)
{
if (rst9563_ops == NULL)
- rst9563_ops_init();
+ nthw_rst9563_ops_init();
return rst9563_ops;
}
@@ -188,7 +188,7 @@ void nthw_reg_rst9574_ops(struct rst9574_ops *ops)
struct rst9574_ops *nthw_get_rst9574_ops(void)
{
if (rst9574_ops == NULL)
- rst9574_ops_init();
+ nthw_rst9574_ops_init();
return rst9574_ops;
}
@@ -203,7 +203,7 @@ void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops)
struct rst_nt400dxx_ops *nthw_get_rst_nt400dxx_ops(void)
{
if (rst_nt400dxx_ops == NULL)
- rst_nt400dxx_ops_init();
+ nthw_rst_nt400dxx_ops_init();
return rst_nt400dxx_ops;
}
@@ -286,7 +286,7 @@ void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops)
struct ntnic_xstats_ops *nthw_get_xstats_ops(void)
{
if (ntnic_xstats_ops == NULL)
- ntnic_xstats_ops_init();
+ nthw_xstats_ops_init();
return ntnic_xstats_ops;
}
diff --git a/drivers/net/ntnic/ntnic_mod_reg.h b/drivers/net/ntnic/ntnic_mod_reg.h
index 2ed2286911..b534b09234 100644
--- a/drivers/net/ntnic/ntnic_mod_reg.h
+++ b/drivers/net/ntnic/ntnic_mod_reg.h
@@ -141,7 +141,7 @@ struct ntnic_filter_ops {
void nthw_reg_filter_ops(const struct ntnic_filter_ops *ops);
const struct ntnic_filter_ops *nthw_get_filter_ops(void);
-void ntnic_filter_init(void);
+void nthw_filter_ops_init(void);
struct link_ops_s {
int (*link_init)(struct adapter_info_s *p_adapter_info, nthw_fpga_t *p_fpga);
@@ -153,7 +153,7 @@ void nthw_link_100g_init(void);
void nthw_reg_agx_100g_link_ops(struct link_ops_s *ops);
const struct link_ops_s *nthw_get_agx_100g_link_ops(void);
-void link_agx_100g_init(void);
+void nthw_link_agx_100g_ops_init(void);
struct port_ops {
bool (*get_nim_present)(struct adapter_info_s *p, int port);
@@ -220,7 +220,7 @@ struct nt4ga_stat_ops {
void nthw_reg_nt4ga_stat_ops(const struct nt4ga_stat_ops *ops);
const struct nt4ga_stat_ops *nthw_get_nt4ga_stat_ops(void);
-void nt4ga_stat_ops_init(void);
+void nthw_stat_ops_init(void);
struct adapter_ops {
int (*init)(struct adapter_info_s *p_adapter_info);
@@ -240,7 +240,7 @@ struct clk9563_ops {
void nthw_reg_clk9563_ops(struct clk9563_ops *ops);
struct clk9563_ops *nthw_get_clk9563_ops(void);
-void clk9563_ops_init(void);
+void nthw_clk9563_ops_init(void);
struct rst_nt200a0x_ops {
int (*nthw_fpga_rst_nt200a0x_init)(struct fpga_info_s *p_fpga_info,
@@ -251,7 +251,7 @@ struct rst_nt200a0x_ops {
void nthw_reg_rst_nt200a0x_ops(struct rst_nt200a0x_ops *ops);
struct rst_nt200a0x_ops *nthw_get_rst_nt200a0x_ops(void);
-void rst_nt200a0x_ops_init(void);
+void nthw_rst_nt200a0x_ops_init(void);
struct rst9563_ops {
int (*nthw_fpga_rst9563_init)(struct fpga_info_s *p_fpga_info,
@@ -260,7 +260,7 @@ struct rst9563_ops {
void nthw_reg_rst9563_ops(struct rst9563_ops *ops);
struct rst9563_ops *nthw_get_rst9563_ops(void);
-void rst9563_ops_init(void);
+void nthw_rst9563_ops_init(void);
struct rst9574_ops {
int (*nthw_fpga_rst9574_init)(struct fpga_info_s *p_fpga_info,
@@ -271,7 +271,7 @@ struct rst9574_ops {
void nthw_reg_rst9574_ops(struct rst9574_ops *ops);
struct rst9574_ops *nthw_get_rst9574_ops(void);
-void rst9574_ops_init(void);
+void nthw_rst9574_ops_init(void);
struct rst_nt400dxx_ops {
int (*nthw_fpga_rst_nt400dxx_init)(struct fpga_info_s *p_fpga_info);
@@ -280,7 +280,7 @@ struct rst_nt400dxx_ops {
void nthw_reg_rst_nt400dxx_ops(struct rst_nt400dxx_ops *ops);
struct rst_nt400dxx_ops *nthw_get_rst_nt400dxx_ops(void);
-void rst_nt400dxx_ops_init(void);
+void nthw_rst_nt400dxx_ops_init(void);
struct flow_backend_ops {
const struct flow_api_backend_ops *(*nthw_bin_flow_backend_init)(nthw_fpga_t *p_fpga,
@@ -593,6 +593,6 @@ struct ntnic_xstats_ops {
void nthw_reg_xstats_ops(struct ntnic_xstats_ops *ops);
struct ntnic_xstats_ops *nthw_get_xstats_ops(void);
-void ntnic_xstats_ops_init(void);
+void nthw_xstats_ops_init(void);
#endif /* __NTNIC_MOD_REG_H__ */
diff --git a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
index 1ebf1b8eb5..ab3f144fa2 100644
--- a/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
+++ b/drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c
@@ -819,7 +819,7 @@ static struct ntnic_xstats_ops ops = {
.nthw_xstats_get_by_id = nthw_xstats_get_by_id
};
-void ntnic_xstats_ops_init(void)
+void nthw_xstats_ops_init(void)
{
NT_LOG_DBGX(DBG, NTNIC, "xstats module was initialized");
nthw_reg_xstats_ops(&ops);
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 15/16] net/ntnic: rename nim agx setup function
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (13 preceding siblings ...)
2025-09-19 9:14 ` [PATCH v1 14/16] net/ntnic: rename ops_init functions Serhii Iliushyk
@ 2025-09-19 9:15 ` Serhii Iliushyk
2025-09-19 9:15 ` [PATCH v1 16/16] net/ntnic: rename table id functions Serhii Iliushyk
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:15 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
Add prefix nthw_ to nim_agx_setup to follow naming convention.
Signed-off-by: Serhii Iliushyk <sil-plv@napatech.com>
---
drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c | 2 +-
drivers/net/ntnic/nim/i2c_nim.c | 2 +-
drivers/net/ntnic/nim/i2c_nim.h | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
index 36ecf0d0ec..8bd6584b1d 100644
--- a/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
+++ b/drivers/net/ntnic/link_mgmt/link_agx_100g/nt4ga_agx_link_100g.c
@@ -991,7 +991,7 @@ int nt4ga_agx_link_100g_ports_init(struct adapter_info_s *p_adapter_info, nthw_f
for (i = 0; i < nb_ports; i++) {
/* 2 + adapter port number */
const uint8_t instance = (uint8_t)(2U + i);
- nim_agx_setup(&nim_ctx[i], p_nthw_agx->p_io_nim, p_nthw_agx->p_i2cm,
+ nthw_nim_agx_setup(&nim_ctx[i], p_nthw_agx->p_io_nim, p_nthw_agx->p_i2cm,
p_nthw_agx->p_pca9849);
nim_ctx[i].hwagx.mux_channel = i;
nim_ctx[i].instance = instance; /* not used */
diff --git a/drivers/net/ntnic/nim/i2c_nim.c b/drivers/net/ntnic/nim/i2c_nim.c
index a394b4c5d4..9393467904 100644
--- a/drivers/net/ntnic/nim/i2c_nim.c
+++ b/drivers/net/ntnic/nim/i2c_nim.c
@@ -881,7 +881,7 @@ bool nthw_qsfp28_set_fec_enable(nim_i2c_ctx_p ctx, bool media_side_fec, bool hos
return true;
}
-void nim_agx_setup(struct nim_i2c_ctx *ctx, nthw_pcal6416a_t *p_io_nim, nthw_i2cm_t *p_nt_i2cm,
+void nthw_nim_agx_setup(struct nim_i2c_ctx *ctx, nthw_pcal6416a_t *p_io_nim, nthw_i2cm_t *p_nt_i2cm,
nthw_pca9849_t *p_ca9849)
{
ctx->hwagx.p_nt_i2cm = p_nt_i2cm;
diff --git a/drivers/net/ntnic/nim/i2c_nim.h b/drivers/net/ntnic/nim/i2c_nim.h
index 61dfedaa4f..2fdfd37a03 100644
--- a/drivers/net/ntnic/nim/i2c_nim.h
+++ b/drivers/net/ntnic/nim/i2c_nim.h
@@ -36,7 +36,7 @@ int nthw_construct_and_preinit_nim(nim_i2c_ctx_p ctx, void *extra);
void nthw_qsfp28_set_high_power(nim_i2c_ctx_p ctx);
bool nthw_qsfp28_set_fec_enable(nim_i2c_ctx_p ctx, bool media_side_fec, bool host_side_fec);
-void nim_agx_setup(struct nim_i2c_ctx *ctx, nthw_pcal6416a_t *p_io_nim, nthw_i2cm_t *p_nt_i2cm,
+void nthw_nim_agx_setup(struct nim_i2c_ctx *ctx, nthw_pcal6416a_t *p_io_nim, nthw_i2cm_t *p_nt_i2cm,
nthw_pca9849_t *p_ca9849);
#endif /* I2C_NIM_H_ */
--
2.45.0
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH v1 16/16] net/ntnic: rename table id functions
2025-09-19 9:14 [PATCH v1 00/16] refactoring naming the for exported symbols Serhii Iliushyk
` (14 preceding siblings ...)
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
15 siblings, 0 replies; 17+ messages in thread
From: Serhii Iliushyk @ 2025-09-19 9:15 UTC (permalink / raw)
To: dev; +Cc: mko-plv, sil-plv, ckm, stephen
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
^ permalink raw reply [flat|nested] 17+ messages in thread