X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_rawdev%2Frte_rawdev_pmd.h;h=811e51d07cf73c6548392be75af26ebcd87902a1;hb=e892fa595e19b5cce315045444b3b7e31130ef19;hp=6d6cf14a14c9c24389d80e7418b1f454efefa08a;hpb=931cc531aad239a016949c5bc436334e6348e65e;p=dpdk.git diff --git a/lib/librte_rawdev/rte_rawdev_pmd.h b/lib/librte_rawdev/rte_rawdev_pmd.h index 6d6cf14a14..811e51d07c 100644 --- a/lib/librte_rawdev/rte_rawdev_pmd.h +++ b/lib/librte_rawdev/rte_rawdev_pmd.h @@ -73,8 +73,6 @@ struct rte_rawdev_global { uint16_t nb_devs; }; -extern struct rte_rawdev_global *rte_rawdev_globals; -/** Pointer to global raw devices data structure. */ extern struct rte_rawdev *rte_rawdevs; /** The pool of rte_rawdev structures. */ @@ -250,6 +248,24 @@ typedef int (*rawdev_queue_setup_t)(struct rte_rawdev *dev, 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. * @@ -506,6 +522,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;