From: Maxime Coquelin Date: Fri, 2 Oct 2020 08:59:30 +0000 (+0200) Subject: baseband/fpga_5gnr_fec: fix API naming X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=7adbb468fb72bbe497553c332697c5cf66dddb13;p=dpdk.git baseband/fpga_5gnr_fec: fix API naming DPDK APIs have to be prefixed with "rte_" in order to avoid namespace pollution. Let's fix it while fpga_5gnr_fec API is still experimental. Fixes: 2d4306438c92 ("baseband/fpga_5gnr_fec: add configure function") Signed-off-by: Maxime Coquelin Reviewed-by: Tom Rix --- diff --git a/app/test-bbdev/test_bbdev_perf.c b/app/test-bbdev/test_bbdev_perf.c index 6ddf012a61..9245d6f40a 100644 --- a/app/test-bbdev/test_bbdev_perf.c +++ b/app/test-bbdev/test_bbdev_perf.c @@ -624,14 +624,14 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, #ifdef RTE_LIBRTE_PMD_BBDEV_FPGA_5GNR_FEC if ((get_init_device() == true) && (!strcmp(info->drv.driver_name, FPGA_5GNR_PF_DRIVER_NAME))) { - struct fpga_5gnr_fec_conf conf; + struct rte_fpga_5gnr_fec_conf conf; unsigned int i; printf("Configure FPGA 5GNR FEC Driver %s with default values\n", info->drv.driver_name); /* clear default configuration before initialization */ - memset(&conf, 0, sizeof(struct fpga_5gnr_fec_conf)); + memset(&conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); /* Set PF mode : * true if PF is used for data plane @@ -659,7 +659,7 @@ add_bbdev_dev(uint8_t dev_id, struct rte_bbdev_info *info, conf.flr_time_out = FLR_5G_TIMEOUT; /* setup FPGA PF with configuration information */ - ret = fpga_5gnr_fec_configure(info->dev_name, &conf); + ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf); TEST_ASSERT_SUCCESS(ret, "Failed to configure 5G FPGA PF for bbdev %s", info->dev_name); diff --git a/doc/guides/bbdevs/fpga_5gnr_fec.rst b/doc/guides/bbdevs/fpga_5gnr_fec.rst index 709e7baed9..c199c8787d 100644 --- a/doc/guides/bbdevs/fpga_5gnr_fec.rst +++ b/doc/guides/bbdevs/fpga_5gnr_fec.rst @@ -169,12 +169,12 @@ queues, priorities, load balance, bandwidth and other settings necessary for the device to perform FEC functions. This configuration needs to be executed at least once after reboot or PCI FLR and can -be achieved by using the function ``fpga_5gnr_fec_configure()``, which sets up the -parameters defined in ``fpga_5gnr_fec_conf`` structure: +be achieved by using the function ``rte_fpga_5gnr_fec_configure()``, which sets up the +parameters defined in ``rte_fpga_5gnr_fec_conf`` structure: .. code-block:: c - struct fpga_5gnr_fec_conf { + struct rte_fpga_5gnr_fec_conf { bool pf_mode_en; uint8_t vf_ul_queues_number[FPGA_5GNR_FEC_NUM_VFS]; uint8_t vf_dl_queues_number[FPGA_5GNR_FEC_NUM_VFS]; @@ -213,15 +213,15 @@ parameters defined in ``fpga_5gnr_fec_conf`` structure: the FLR time out then set this setting to 0x262=610. -An example configuration code calling the function ``fpga_5gnr_fec_configure()`` is shown +An example configuration code calling the function ``rte_fpga_5gnr_fec_configure()`` is shown below: .. code-block:: c - struct fpga_5gnr_fec_conf conf; + struct rte_fpga_5gnr_fec_conf conf; unsigned int i; - memset(&conf, 0, sizeof(struct fpga_5gnr_fec_conf)); + memset(&conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); conf.pf_mode_en = 1; for (i = 0; i < FPGA_5GNR_FEC_NUM_VFS; ++i) { @@ -234,7 +234,7 @@ below: conf.ul_load_balance = 64; /* setup FPGA PF */ - ret = fpga_5gnr_fec_configure(info->dev_name, &conf); + ret = rte_fpga_5gnr_fec_configure(info->dev_name, &conf); TEST_ASSERT_SUCCESS(ret, "Failed to configure 4G FPGA PF for bbdev %s", info->dev_name); diff --git a/doc/guides/rel_notes/release_20_11.rst b/doc/guides/rel_notes/release_20_11.rst index e46ed843d2..28c25605f1 100644 --- a/doc/guides/rel_notes/release_20_11.rst +++ b/doc/guides/rel_notes/release_20_11.rst @@ -309,6 +309,10 @@ API Changes * ipsec: ``RTE_SATP_LOG2_NUM`` has been dropped from ``enum`` and subsequently moved ``rte_ipsec`` lib from experimental to stable. +* baseband/fpga_5gnr_fec: Renamed function ``fpga_5gnr_fec_configure`` to + ``rte_fpga_5gnr_fec_configure`` and structure ``fpga_5gnr_fec_conf`` to + ``rte_fpga_5gnr_fec_conf``. + * rawdev: Added a structure size parameter to the functions ``rte_rawdev_queue_setup()``, ``rte_rawdev_queue_conf_get()``, ``rte_rawdev_info_get()`` and ``rte_rawdev_configure()``, diff --git a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c index 61f9c04ba2..1d73f9540e 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c +++ b/drivers/baseband/fpga_5gnr_fec/rte_fpga_5gnr_fec.c @@ -1944,10 +1944,10 @@ fpga_5gnr_fec_remove(struct rte_pci_device *pci_dev) } static inline void -set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) +set_default_fpga_conf(struct rte_fpga_5gnr_fec_conf *def_conf) { /* clear default configuration before initialization */ - memset(def_conf, 0, sizeof(struct fpga_5gnr_fec_conf)); + memset(def_conf, 0, sizeof(struct rte_fpga_5gnr_fec_conf)); /* Set pf mode to true */ def_conf->pf_mode_en = true; @@ -1962,15 +1962,15 @@ set_default_fpga_conf(struct fpga_5gnr_fec_conf *def_conf) /* Initial configuration of FPGA 5GNR FEC device */ int -fpga_5gnr_fec_configure(const char *dev_name, - const struct fpga_5gnr_fec_conf *conf) +rte_fpga_5gnr_fec_configure(const char *dev_name, + const struct rte_fpga_5gnr_fec_conf *conf) { uint32_t payload_32, address; uint16_t payload_16; uint8_t payload_8; uint16_t q_id, vf_id, total_q_id, total_ul_q_id, total_dl_q_id; struct rte_bbdev *bbdev = rte_bbdev_get_named_dev(dev_name); - struct fpga_5gnr_fec_conf def_conf; + struct rte_fpga_5gnr_fec_conf def_conf; if (bbdev == NULL) { rte_bbdev_log(ERR, diff --git a/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map b/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map index d723bc9b0e..db43cd8403 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map +++ b/drivers/baseband/fpga_5gnr_fec/rte_pmd_bbdev_fpga_5gnr_fec_version.map @@ -5,6 +5,6 @@ DPDK_21 { EXPERIMENTAL { global: - fpga_5gnr_fec_configure; + rte_fpga_5gnr_fec_configure; }; diff --git a/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h b/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h index 70a4acf0b7..c2752fbd52 100644 --- a/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h +++ b/drivers/baseband/fpga_5gnr_fec/rte_pmd_fpga_5gnr_fec.h @@ -30,7 +30,7 @@ extern "C" { /** * Structure to pass FPGA 4G FEC configuration. */ -struct fpga_5gnr_fec_conf { +struct rte_fpga_5gnr_fec_conf { /** 1 if PF is used for dataplane, 0 for VFs */ bool pf_mode_en; /** Number of UL queues per VF */ @@ -64,8 +64,8 @@ struct fpga_5gnr_fec_conf { */ __rte_experimental int -fpga_5gnr_fec_configure(const char *dev_name, - const struct fpga_5gnr_fec_conf *conf); +rte_fpga_5gnr_fec_configure(const char *dev_name, + const struct rte_fpga_5gnr_fec_conf *conf); #ifdef __cplusplus }