aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/compress/isal
diff options
context:
space:
mode:
authorChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-07-04 10:40:06 +0200
committerChristian Ehrhardt <christian.ehrhardt@canonical.com>2019-07-04 10:48:05 +0200
commit8d53e9f3c6001dcb2865f6e894da5b54e1418f88 (patch)
tree63907f21c13636a987d43463c675d0727a04e327 /drivers/compress/isal
parente2bea7436061ca2e7e14bfcfdc5870f2555c3965 (diff)
New upstream version 18.11.2upstream-18.11-stable
Change-Id: I23eb4f9179abf1f9c659891f8fddb27ee68ad26b Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
Diffstat (limited to 'drivers/compress/isal')
-rw-r--r--drivers/compress/isal/isal_compress_pmd.c5
-rw-r--r--drivers/compress/isal/isal_compress_pmd_ops.c16
2 files changed, 13 insertions, 8 deletions
diff --git a/drivers/compress/isal/isal_compress_pmd.c b/drivers/compress/isal/isal_compress_pmd.c
index 9f1e9688..f208b650 100644
--- a/drivers/compress/isal/isal_compress_pmd.c
+++ b/drivers/compress/isal/isal_compress_pmd.c
@@ -372,7 +372,7 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
uint8_t *temp_level_buf = qp->stream->level_buf;
/* Initialize compression stream */
- isal_deflate_stateless_init(qp->stream);
+ isal_deflate_init(qp->stream);
qp->stream->level_buf = temp_level_buf;
@@ -461,8 +461,6 @@ process_isal_deflate(struct rte_comp_op *op, struct isal_comp_qp *qp,
}
op->consumed = qp->stream->total_in;
op->produced = qp->stream->total_out;
- isal_deflate_reset(qp->stream);
-
return ret;
}
@@ -538,7 +536,6 @@ process_isal_inflate(struct rte_comp_op *op, struct isal_comp_qp *qp)
op->consumed = op->src.length - qp->state->avail_in;
}
op->produced = qp->state->total_out;
- isal_inflate_reset(qp->state);
return ret;
}
diff --git a/drivers/compress/isal/isal_compress_pmd_ops.c b/drivers/compress/isal/isal_compress_pmd_ops.c
index 41cade87..472e54e8 100644
--- a/drivers/compress/isal/isal_compress_pmd_ops.c
+++ b/drivers/compress/isal/isal_compress_pmd_ops.c
@@ -133,10 +133,18 @@ isal_comp_pmd_info_get(struct rte_compressdev *dev __rte_unused,
{
if (dev_info != NULL) {
dev_info->capabilities = isal_pmd_capabilities;
- dev_info->feature_flags = RTE_COMPDEV_FF_CPU_AVX512 |
- RTE_COMPDEV_FF_CPU_AVX2 |
- RTE_COMPDEV_FF_CPU_AVX |
- RTE_COMPDEV_FF_CPU_SSE;
+
+ /* Check CPU for supported vector instruction and set
+ * feature_flags
+ */
+ if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX512F))
+ dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX512;
+ else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX2))
+ dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX2;
+ else if (rte_cpu_get_flag_enabled(RTE_CPUFLAG_AVX))
+ dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_AVX;
+ else
+ dev_info->feature_flags |= RTE_COMPDEV_FF_CPU_SSE;
}
}