summaryrefslogtreecommitdiffstats
path: root/lib/librte_rawdev/rte_rawdev_pmd.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/librte_rawdev/rte_rawdev_pmd.h')
-rw-r--r--lib/librte_rawdev/rte_rawdev_pmd.h28
1 files changed, 24 insertions, 4 deletions
diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h
index 408adf0f..bb9bbc35 100644
--- a/lib/librte_rawdev/rte_rawdev_pmd.h
+++ b/lib/librte_rawdev/rte_rawdev_pmd.h
@@ -251,6 +251,24 @@ typedef int (*rawdev_queue_release_t)(struct rte_rawdev *dev,
uint16_t queue_id);
/**
+ * Get the count of number of queues configured on this device.
+ *
+ * Another way to fetch this information is to fetch the device configuration.
+ * But, that assumes that the device configuration managed by the driver has
+ * that kind of information.
+ *
+ * This function helps in getting queue count supported, independently. It
+ * can help in cases where iterator needs to be implemented.
+ *
+ * @param
+ * Raw device pointer
+ * @return
+ * Number of queues; 0 is assumed to be a valid response.
+ *
+ */
+typedef uint16_t (*rawdev_queue_count_t)(struct rte_rawdev *dev);
+
+/**
* Enqueue an array of raw buffers to the device.
*
* Buffer being used is opaque - it can be obtained from mempool or from
@@ -506,6 +524,8 @@ struct rte_rawdev_ops {
rawdev_queue_setup_t queue_setup;
/**< Release an raw queue. */
rawdev_queue_release_t queue_release;
+ /**< Get the number of queues attached to the device */
+ rawdev_queue_count_t queue_count;
/**< Enqueue an array of raw buffers to device. */
rawdev_enqueue_bufs_t enqueue_bufs;
@@ -556,7 +576,7 @@ struct rte_rawdev_ops {
* @return
* - Slot in the rte_dev_devices array for a new device;
*/
-struct rte_rawdev * __rte_experimental
+struct rte_rawdev *
rte_rawdev_pmd_allocate(const char *name, size_t dev_private_size,
int socket_id);
@@ -568,7 +588,7 @@ rte_rawdev_pmd_allocate(const char *name, size_t dev_private_size,
* @return
* - 0 on success, negative on error
*/
-int __rte_experimental
+int
rte_rawdev_pmd_release(struct rte_rawdev *rawdev);
/**
@@ -585,7 +605,7 @@ rte_rawdev_pmd_release(struct rte_rawdev *rawdev);
* - Raw device pointer if device is successfully created.
* - NULL if device cannot be created.
*/
-struct rte_rawdev * __rte_experimental
+struct rte_rawdev *
rte_rawdev_pmd_init(const char *name, size_t dev_private_size,
int socket_id);
@@ -597,7 +617,7 @@ rte_rawdev_pmd_init(const char *name, size_t dev_private_size,
* @return
* - 0 on success, negative on error
*/
-int __rte_experimental
+int
rte_rawdev_pmd_uninit(const char *name);
#ifdef __cplusplus