[v1,4/4] librte_bbdev: update device info structure to use rte_device

Message ID 1551461010-881-5-git-send-email-eleanor.smith@intel.com (mailing list archive)
State Changes Requested, archived
Delegated to: akhil goyal
Headers
Series baseband/fpga_lte_fec: BBDEV FPGA driver for 4G turbo FEC |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Smith, Eleanor March 1, 2019, 5:23 p.m. UTC
  This patch update bbdev API rte_bbdev_info struct to use rte_device
instead of rte_bus.

Signed-off-by: Smith, Eleanor <eleanor.smith@intel.com>
---
 doc/guides/prog_guide/bbdev.rst | 4 ++--
 lib/librte_bbdev/rte_bbdev.c    | 6 +++---
 lib/librte_bbdev/rte_bbdev.h    | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
  

Patch

diff --git a/doc/guides/prog_guide/bbdev.rst b/doc/guides/prog_guide/bbdev.rst
index 9de1444..a570e48 100644
--- a/doc/guides/prog_guide/bbdev.rst
+++ b/doc/guides/prog_guide/bbdev.rst
@@ -255,7 +255,7 @@  This allows the user to query a specific bbdev PMD and get all the device
 capabilities. The ``rte_bbdev_info`` structure provides two levels of
 information:
 
-- Device relevant information, like: name and related rte_bus.
+- Device relevant information, like: name and related rte_device.
 
 - Driver specific information, as defined by the ``struct rte_bbdev_driver_info``
   structure, this is where capabilities reside along with other specifics like:
@@ -266,7 +266,7 @@  information:
     struct rte_bbdev_info {
         int socket_id;
         const char *dev_name;
-        const struct rte_bus *bus;
+        const struct rte_device *device;
         uint16_t num_queues;
         bool started;
         struct rte_bbdev_driver_info drv;
diff --git a/lib/librte_bbdev/rte_bbdev.c b/lib/librte_bbdev/rte_bbdev.c
index c4cc18d..6ca3c8e 100644
--- a/lib/librte_bbdev/rte_bbdev.c
+++ b/lib/librte_bbdev/rte_bbdev.c
@@ -498,7 +498,7 @@  rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
 		if (conf->op_type == RTE_BBDEV_OP_TURBO_DEC &&
 			conf->priority > dev_info.max_ul_queue_priority) {
 			rte_bbdev_log(ERR,
-					"Priority (%u) of queue %u of bdev %u must be <= %u",
+					"Priority (%u) of queue %u of bbdev %u must be <= %u",
 					conf->priority, queue_id, dev_id,
 					dev_info.max_ul_queue_priority);
 			return -EINVAL;
@@ -506,7 +506,7 @@  rte_bbdev_queue_configure(uint16_t dev_id, uint16_t queue_id,
 		if (conf->op_type == RTE_BBDEV_OP_TURBO_ENC &&
 			conf->priority > dev_info.max_dl_queue_priority) {
 			rte_bbdev_log(ERR,
-					"Priority (%u) of queue %u of bdev %u must be <= %u",
+					"Priority (%u) of queue %u of bbdev %u must be <= %u",
 					conf->priority, queue_id, dev_id,
 					dev_info.max_dl_queue_priority);
 			return -EINVAL;
@@ -795,7 +795,7 @@  rte_bbdev_info_get(uint16_t dev_id, struct rte_bbdev_info *dev_info)
 	memset(dev_info, 0, sizeof(*dev_info));
 	dev_info->dev_name = dev->data->name;
 	dev_info->num_queues = dev->data->num_queues;
-	dev_info->bus = rte_bus_find_by_device(dev->device);
+	dev_info->device = dev->device;
 	dev_info->socket_id = dev->data->socket_id;
 	dev_info->started = dev->data->started;
 
diff --git a/lib/librte_bbdev/rte_bbdev.h b/lib/librte_bbdev/rte_bbdev.h
index bec1ef6..7b3891a 100644
--- a/lib/librte_bbdev/rte_bbdev.h
+++ b/lib/librte_bbdev/rte_bbdev.h
@@ -313,7 +313,7 @@  struct rte_bbdev_driver_info {
 struct rte_bbdev_info {
 	int socket_id;  /**< NUMA socket that device is on */
 	const char *dev_name;  /**< Unique device name */
-	const struct rte_bus *bus;  /**< Bus information */
+	const struct rte_device *device; /**< Device Information */
 	uint16_t num_queues;  /**< Number of queues currently configured */
 	bool started;  /**< Set if device is currently started */
 	struct rte_bbdev_driver_info drv;  /**< Info from device driver */