eventdev: move Rx adapter to separate function
[dpdk.git] / drivers / compress / isal / isal_compress_pmd_ops.c
index 77d5d4b..585f228 100644 (file)
@@ -12,7 +12,9 @@
 static const struct rte_compressdev_capabilities isal_pmd_capabilities[] = {
        {
                .algo = RTE_COMP_ALGO_DEFLATE,
-               .comp_feature_flags =   RTE_COMP_FF_SHAREABLE_PRIV_XFORM,
+               .comp_feature_flags =   RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
+                                       RTE_COMP_FF_HUFFMAN_FIXED |
+                                       RTE_COMP_FF_HUFFMAN_DYNAMIC,
                .window_size = {
                        .min = 15,
                        .max = 15,
@@ -162,6 +164,9 @@ isal_comp_pmd_qp_release(struct rte_compressdev *dev, uint16_t qp_id)
        if (qp->stream->level_buf != NULL)
                rte_free(qp->stream->level_buf);
 
+       if (qp->state != NULL)
+               rte_free(qp->state);
+
        if (dev->data->queue_pairs[qp_id] != NULL)
                rte_free(dev->data->queue_pairs[qp_id]);
 
@@ -240,6 +245,11 @@ isal_comp_pmd_qp_setup(struct rte_compressdev *dev, uint16_t qp_id,
                        ISAL_DEF_LVL3_DEFAULT, RTE_CACHE_LINE_SIZE,
                        socket_id);
 
+       /* Initialize memory for decompression state structure */
+       qp->state = rte_zmalloc_socket("Isa-l decompression state",
+                       sizeof(struct inflate_state), RTE_CACHE_LINE_SIZE,
+                       socket_id);
+
        qp->id = qp_id;
        dev->data->queue_pairs[qp_id] = qp;