mbuf: extend meaning of QinQ stripped bit
[dpdk.git] / lib / librte_compressdev / rte_compressdev_internal.h
index 57af163..22ceac6 100644 (file)
@@ -10,6 +10,8 @@
  */
 #include <rte_log.h>
 
+#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 */