X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_compressdev%2Frte_compressdev_internal.h;h=22ceac66e2c9e33a3a549a6c69567de30207b1be;hb=7353ee7344b45426b921b91c56aa211ab0e58a89;hp=57af163c16068cb18f0e94212734adab0e2a82ba;hpb=24a0fef851fb0f94fc4dd23b8acaf885e9deaf93;p=dpdk.git diff --git a/lib/librte_compressdev/rte_compressdev_internal.h b/lib/librte_compressdev/rte_compressdev_internal.h index 57af163c16..22ceac66e2 100644 --- a/lib/librte_compressdev/rte_compressdev_internal.h +++ b/lib/librte_compressdev/rte_compressdev_internal.h @@ -10,6 +10,8 @@ */ #include +#include "rte_comp.h" + #define RTE_COMPRESSDEV_NAME_MAX_LEN (64) /**< Max length of name of comp PMD */ @@ -19,9 +21,55 @@ extern int compressdev_logtype; rte_log(RTE_LOG_ ## level, compressdev_logtype, "%s(): "fmt "\n", \ __func__, ##args) +/** + * Dequeue processed packets from queue pair of a device. + * + * @param qp + * The queue pair from which to retrieve + * processed operations. + * @param ops + * The address of an array of pointers to + * *rte_comp_op* structures that must be + * large enough to store *nb_ops* pointers in it + * @param nb_ops + * The maximum number of operations to dequeue + * @return + * - The number of operations actually dequeued, which is the number + * of pointers to *rte_comp_op* structures effectively supplied to the + * *ops* array. + */ +typedef uint16_t (*compressdev_dequeue_pkt_burst_t)(void *qp, + struct rte_comp_op **ops, uint16_t nb_ops); + +/** + * Enqueue a burst of operations for processing. + * + * @param qp + * The queue pair on which operations + * are to be enqueued for processing + * @param ops + * The address of an array of *nb_ops* pointers + * to *rte_comp_op* structures which contain + * the operations to be processed + * @param nb_ops + * The number of operations to process + * @return + * The number of operations actually enqueued on the device. The return + * value can be less than the value of the *nb_ops* parameter when the + * comp devices queue is full or if invalid parameters are specified in + * a *rte_comp_op*. + */ + +typedef uint16_t (*compressdev_enqueue_pkt_burst_t)(void *qp, + struct rte_comp_op **ops, uint16_t nb_ops); /** The data structure associated with each comp device. */ struct rte_compressdev { + compressdev_dequeue_pkt_burst_t dequeue_burst; + /**< Pointer to PMD receive function */ + compressdev_enqueue_pkt_burst_t enqueue_burst; + /**< Pointer to PMD transmit function */ + struct rte_compressdev_data *data; /**< Pointer to device data */ struct rte_compressdev_ops *dev_ops; @@ -31,9 +79,6 @@ struct rte_compressdev { struct rte_device *device; /**< Backing device */ - uint8_t driver_id; - /**< comp driver identifier*/ - __extension__ uint8_t attached : 1; /**< Flag indicating the device is attached */