net/i40e: fix check of flow director programming status
[dpdk.git] / drivers / compress / isal / isal_compress_pmd_ops.c
index 77d5d4b..41cade8 100644 (file)
 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_OOP_SGL_IN_SGL_OUT |
+                                       RTE_COMP_FF_OOP_SGL_IN_LB_OUT |
+                                       RTE_COMP_FF_OOP_LB_IN_SGL_OUT |
+                                       RTE_COMP_FF_SHAREABLE_PRIV_XFORM |
+                                       RTE_COMP_FF_HUFFMAN_FIXED |
+                                       RTE_COMP_FF_HUFFMAN_DYNAMIC,
                .window_size = {
                        .min = 15,
                        .max = 15,
@@ -162,8 +167,14 @@ 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 (dev->data->queue_pairs[qp_id] != NULL)
-               rte_free(dev->data->queue_pairs[qp_id]);
+       if (qp->state != NULL)
+               rte_free(qp->state);
+
+       if (qp->processed_pkts != NULL)
+               rte_ring_free(qp->processed_pkts);
+
+       rte_free(qp);
+       dev->data->queue_pairs[qp_id] = NULL;
 
        return 0;
 }
@@ -240,6 +251,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;