*/
#include <rte_log.h>
+#include "rte_comp.h"
+
#define RTE_COMPRESSDEV_NAME_MAX_LEN (64)
/**< Max length of name of comp PMD */
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;
uint8_t dev_started : 1;
/**< Device state: STARTED(1)/STOPPED(0) */
+ void **queue_pairs;
+ /**< Array of pointers to queue pairs. */
+ uint16_t nb_queue_pairs;
+ /**< Number of device queue pairs */
+
void *dev_private;
/**< PMD-specific private data */
} __rte_cache_aligned;