diff options
Diffstat (limited to 'drivers/raw')
-rw-r--r-- | drivers/raw/dpaa2_cmdif/Makefile | 3 | ||||
-rw-r--r-- | drivers/raw/dpaa2_cmdif/meson.build | 2 | ||||
-rw-r--r-- | drivers/raw/dpaa2_qdma/Makefile | 3 | ||||
-rw-r--r-- | drivers/raw/dpaa2_qdma/dpaa2_qdma.c | 18 | ||||
-rw-r--r-- | drivers/raw/dpaa2_qdma/dpaa2_qdma.h | 6 | ||||
-rw-r--r-- | drivers/raw/dpaa2_qdma/meson.build | 2 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c | 8 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h | 8 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/base/ifpga_port.c | 6 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/base/ifpga_port_error.c | 2 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/base/meson.build | 4 | ||||
-rw-r--r-- | drivers/raw/ifpga_rawdev/ifpga_rawdev.c | 5 | ||||
-rw-r--r-- | drivers/raw/skeleton_rawdev/skeleton_rawdev.c | 2 | ||||
-rw-r--r-- | drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c | 3 |
14 files changed, 41 insertions, 31 deletions
diff --git a/drivers/raw/dpaa2_cmdif/Makefile b/drivers/raw/dpaa2_cmdif/Makefile index 9b863dda..9bd5ff22 100644 --- a/drivers/raw/dpaa2_cmdif/Makefile +++ b/drivers/raw/dpaa2_cmdif/Makefile @@ -21,10 +21,11 @@ LDLIBS += -lrte_eal LDLIBS += -lrte_kvargs LDLIBS += -lrte_mempool_dpaa2 LDLIBS += -lrte_rawdev +LDLIBS += -lrte_common_dpaax EXPORT_MAP := rte_pmd_dpaa2_cmdif_version.map -LIBABIVER := 1 +LIBABIVER := 2 # # all source are stored in SRCS-y diff --git a/drivers/raw/dpaa2_cmdif/meson.build b/drivers/raw/dpaa2_cmdif/meson.build index 1d146872..37bb24a1 100644 --- a/drivers/raw/dpaa2_cmdif/meson.build +++ b/drivers/raw/dpaa2_cmdif/meson.build @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2018 NXP +version = 2 + build = dpdk_conf.has('RTE_LIBRTE_DPAA2_MEMPOOL') deps += ['rawdev', 'mempool_dpaa2', 'bus_vdev'] sources = files('dpaa2_cmdif.c') diff --git a/drivers/raw/dpaa2_qdma/Makefile b/drivers/raw/dpaa2_qdma/Makefile index d88809ea..bdd99c97 100644 --- a/drivers/raw/dpaa2_qdma/Makefile +++ b/drivers/raw/dpaa2_qdma/Makefile @@ -22,10 +22,11 @@ LDLIBS += -lrte_mempool LDLIBS += -lrte_mempool_dpaa2 LDLIBS += -lrte_rawdev LDLIBS += -lrte_ring +LDLIBS += -lrte_common_dpaax EXPORT_MAP := rte_pmd_dpaa2_qdma_version.map -LIBABIVER := 1 +LIBABIVER := 2 # # all source are stored in SRCS-y diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c index 2787d302..f474442d 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.c +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.c @@ -34,10 +34,10 @@ static struct qdma_hw_queue_list qdma_queue_list = TAILQ_HEAD_INITIALIZER(qdma_queue_list); /* QDMA Virtual Queues */ -struct qdma_virt_queue *qdma_vqs; +static struct qdma_virt_queue *qdma_vqs; /* QDMA per core data */ -struct qdma_per_core_info qdma_core_info[RTE_MAX_LCORE]; +static struct qdma_per_core_info qdma_core_info[RTE_MAX_LCORE]; static struct qdma_hw_queue * alloc_hw_queue(uint32_t lcore_id) @@ -805,7 +805,7 @@ dpaa2_dpdmai_dev_uninit(struct rte_rawdev *rawdev) DPAA2_QDMA_ERR("dmdmai disable failed"); /* Set up the DQRR storage for Rx */ - for (i = 0; i < DPDMAI_PRIO_NUM; i++) { + for (i = 0; i < dpdmai_dev->num_queues; i++) { struct dpaa2_queue *rxq = &(dpdmai_dev->rx_queue[i]); if (rxq->q_storage) { @@ -856,17 +856,17 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) ret); goto init_err; } - dpdmai_dev->num_queues = attr.num_of_priorities; + dpdmai_dev->num_queues = attr.num_of_queues; /* Set up Rx Queues */ - for (i = 0; i < attr.num_of_priorities; i++) { + for (i = 0; i < dpdmai_dev->num_queues; i++) { struct dpaa2_queue *rxq; memset(&rx_queue_cfg, 0, sizeof(struct dpdmai_rx_queue_cfg)); ret = dpdmai_set_rx_queue(&dpdmai_dev->dpdmai, CMD_PRI_LOW, dpdmai_dev->token, - i, &rx_queue_cfg); + i, 0, &rx_queue_cfg); if (ret) { DPAA2_QDMA_ERR("Setting Rx queue failed with err: %d", ret); @@ -893,9 +893,9 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) } /* Get Rx and Tx queues FQID's */ - for (i = 0; i < DPDMAI_PRIO_NUM; i++) { + for (i = 0; i < dpdmai_dev->num_queues; i++) { ret = dpdmai_get_rx_queue(&dpdmai_dev->dpdmai, CMD_PRI_LOW, - dpdmai_dev->token, i, &rx_attr); + dpdmai_dev->token, i, 0, &rx_attr); if (ret) { DPAA2_QDMA_ERR("Reading device failed with err: %d", ret); @@ -904,7 +904,7 @@ dpaa2_dpdmai_dev_init(struct rte_rawdev *rawdev, int dpdmai_id) dpdmai_dev->rx_queue[i].fqid = rx_attr.fqid; ret = dpdmai_get_tx_queue(&dpdmai_dev->dpdmai, CMD_PRI_LOW, - dpdmai_dev->token, i, &tx_attr); + dpdmai_dev->token, i, 0, &tx_attr); if (ret) { DPAA2_QDMA_ERR("Reading device failed with err: %d", ret); diff --git a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h index c6a05780..0cbe9025 100644 --- a/drivers/raw/dpaa2_qdma/dpaa2_qdma.h +++ b/drivers/raw/dpaa2_qdma/dpaa2_qdma.h @@ -11,6 +11,8 @@ struct qdma_io_meta; #define DPAA2_QDMA_MAX_FLE 3 #define DPAA2_QDMA_MAX_SDD 2 +#define DPAA2_DPDMAI_MAX_QUEUES 8 + /** FLE pool size: 3 Frame list + 2 source/destination descriptor */ #define QDMA_FLE_POOL_SIZE (sizeof(struct qdma_io_meta) + \ sizeof(struct qbman_fle) * DPAA2_QDMA_MAX_FLE + \ @@ -142,9 +144,9 @@ struct dpaa2_dpdmai_dev { /** Number of queue in this DPDMAI device */ uint8_t num_queues; /** RX queues */ - struct dpaa2_queue rx_queue[DPDMAI_PRIO_NUM]; + struct dpaa2_queue rx_queue[DPAA2_DPDMAI_MAX_QUEUES]; /** TX queues */ - struct dpaa2_queue tx_queue[DPDMAI_PRIO_NUM]; + struct dpaa2_queue tx_queue[DPAA2_DPDMAI_MAX_QUEUES]; }; #endif /* __DPAA2_QDMA_H__ */ diff --git a/drivers/raw/dpaa2_qdma/meson.build b/drivers/raw/dpaa2_qdma/meson.build index b6a081f1..2a4b69c1 100644 --- a/drivers/raw/dpaa2_qdma/meson.build +++ b/drivers/raw/dpaa2_qdma/meson.build @@ -1,6 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright 2018 NXP +version = 2 + build = dpdk_conf.has('RTE_LIBRTE_DPAA2_MEMPOOL') deps += ['rawdev', 'mempool_dpaa2', 'ring'] sources = files('dpaa2_qdma.c') diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c index f0939dc3..848e5183 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c +++ b/drivers/raw/ifpga_rawdev/base/ifpga_enumerate.c @@ -104,14 +104,14 @@ static struct feature_info port_features[] = { .resource_size = sizeof(struct feature_port_header), .feature_index = PORT_FEATURE_ID_HEADER, .revision_id = PORT_HEADER_REVISION, - .ops = &port_hdr_ops, + .ops = &ifpga_rawdev_port_hdr_ops, }, { .name = PORT_FEATURE_ERR, .resource_size = sizeof(struct feature_port_error), .feature_index = PORT_FEATURE_ID_ERROR, .revision_id = PORT_ERR_REVISION, - .ops = &port_error_ops, + .ops = &ifpga_rawdev_port_error_ops, }, { .name = PORT_FEATURE_UMSG, @@ -124,14 +124,14 @@ static struct feature_info port_features[] = { .resource_size = sizeof(struct feature_port_uint), .feature_index = PORT_FEATURE_ID_UINT, .revision_id = PORT_UINT_REVISION, - .ops = &port_uint_ops, + .ops = &ifpga_rawdev_port_uint_ops, }, { .name = PORT_FEATURE_STP, .resource_size = PORT_FEATURE_STP_REGION_SIZE, .feature_index = PORT_FEATURE_ID_STP, .revision_id = PORT_STP_REVISION, - .ops = &port_stp_ops, + .ops = &ifpga_rawdev_port_stp_ops, }, { .name = PORT_FEATURE_UAFU, diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h index 7a39a580..4391f2fd 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h +++ b/drivers/raw/ifpga_rawdev/base/ifpga_feature_dev.h @@ -156,10 +156,10 @@ struct fpga_uafu_irq_set { int port_set_irq(struct ifpga_port_hw *port, u32 feature_id, void *irq_set); -extern struct feature_ops port_hdr_ops; -extern struct feature_ops port_error_ops; -extern struct feature_ops port_stp_ops; -extern struct feature_ops port_uint_ops; +extern struct feature_ops ifpga_rawdev_port_hdr_ops; +extern struct feature_ops ifpga_rawdev_port_error_ops; +extern struct feature_ops ifpga_rawdev_port_stp_ops; +extern struct feature_ops ifpga_rawdev_port_uint_ops; /* help functions for feature ops */ int fpga_msix_set_block(struct feature *feature, unsigned int start, diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port.c b/drivers/raw/ifpga_rawdev/base/ifpga_port.c index a962f5b4..8b5668d4 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_port.c +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port.c @@ -326,7 +326,7 @@ static int port_hdr_set_prop(struct feature *feature, struct feature_prop *prop) return -ENOENT; } -struct feature_ops port_hdr_ops = { +struct feature_ops ifpga_rawdev_port_hdr_ops = { .init = port_hdr_init, .uinit = port_hdr_uinit, .get_prop = port_hdr_get_prop, @@ -354,7 +354,7 @@ static void port_stp_uinit(struct feature *feature) dev_info(NULL, "port stp uinit.\n"); } -struct feature_ops port_stp_ops = { +struct feature_ops ifpga_rawdev_port_stp_ops = { .init = port_stp_init, .uinit = port_stp_uinit, }; @@ -382,7 +382,7 @@ static void port_uint_uinit(struct feature *feature) dev_info(NULL, "PORT UINT UInit.\n"); } -struct feature_ops port_uint_ops = { +struct feature_ops ifpga_rawdev_port_uint_ops = { .init = port_uint_init, .uinit = port_uint_uinit, }; diff --git a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c index 23db562b..9dd1cf59 100644 --- a/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c +++ b/drivers/raw/ifpga_rawdev/base/ifpga_port_error.c @@ -136,7 +136,7 @@ static int port_error_set_prop(struct feature *feature, return -ENOENT; } -struct feature_ops port_error_ops = { +struct feature_ops ifpga_rawdev_port_error_ops = { .init = port_error_init, .uinit = port_error_uinit, .get_prop = port_error_get_prop, diff --git a/drivers/raw/ifpga_rawdev/base/meson.build b/drivers/raw/ifpga_rawdev/base/meson.build index cb655352..03f5112c 100644 --- a/drivers/raw/ifpga_rawdev/base/meson.build +++ b/drivers/raw/ifpga_rawdev/base/meson.build @@ -18,8 +18,8 @@ sources = [ ] error_cflags = ['-Wno-sign-compare', '-Wno-unused-value', - '-Wno-format', '-Wno-unused-but-set-variable', - '-Wno-strict-aliasing' + '-Wno-format', '-Wno-error=format-security', + '-Wno-strict-aliasing', '-Wno-unused-but-set-variable' ] c_args = cflags foreach flag: error_cflags diff --git a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c index 3fed0578..32e318fc 100644 --- a/drivers/raw/ifpga_rawdev/ifpga_rawdev.c +++ b/drivers/raw/ifpga_rawdev/ifpga_rawdev.c @@ -542,6 +542,7 @@ ifpga_cfg_probe(struct rte_vdev_device *dev) int port; char *name = NULL; char dev_name[RTE_RAWDEV_NAME_MAX_LEN]; + int ret = -1; devargs = dev->device.devargs; @@ -583,7 +584,7 @@ ifpga_cfg_probe(struct rte_vdev_device *dev) snprintf(dev_name, RTE_RAWDEV_NAME_MAX_LEN, "%d|%s", port, name); - rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME), + ret = rte_eal_hotplug_add(RTE_STR(IFPGA_BUS_NAME), dev_name, devargs->args); end: if (kvlist) @@ -591,7 +592,7 @@ end: if (name) free(name); - return 0; + return ret; } static int diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c index 6518a2d9..d7630fc6 100644 --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev.c +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev.c @@ -32,7 +32,7 @@ int skeleton_pmd_logtype; /* Count of instances */ -uint16_t skeldev_init_once; +static uint16_t skeldev_init_once; /**< Rawdev Skeleton dummy driver name */ #define SKELETON_PMD_RAWDEV_NAME rawdev_skeleton diff --git a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c index 3405b898..359c9e29 100644 --- a/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c +++ b/drivers/raw/skeleton_rawdev/skeleton_rawdev_test.c @@ -294,13 +294,14 @@ test_rawdev_attr_set_get(void) "Attribute (Test1) not set correctly (%" PRIu64 ")", ret_value); + free(dummy_value); + ret_value = 0; ret = rte_rawdev_get_attr(TEST_DEV_ID, "Test2", &ret_value); RTE_TEST_ASSERT_EQUAL(*((int *)(uintptr_t)ret_value), 200, "Attribute (Test2) not set correctly (%" PRIu64 ")", ret_value); - free(dummy_value); return TEST_SUCCESS; } |