[dpdk-dev] [PATCH 2/4] compress/qat: add stateful decompression

Trahe, Fiona fiona.trahe at intel.com
Fri Sep 20 12:09:05 CEST 2019



> -----Original Message-----
> From: Dybkowski, AdamX
> Sent: Monday, August 26, 2019 8:45 AM
> To: dev at dpdk.org; Trahe, Fiona <fiona.trahe at intel.com>; akhil.goyal at nxp.com; Trybula, ArturX
> <arturx.trybula at intel.com>
> Cc: Dybkowski, AdamX <adamx.dybkowski at intel.com>
> Subject: [PATCH 2/4] compress/qat: add stateful decompression
> 
> This patch adds the stateful decompression feature
> to the DPDK QAT PMD.
> 
> Signed-off-by: Adam Dybkowski <adamx.dybkowski at intel.com>
> ---
>  drivers/compress/qat/qat_comp.c     | 256 +++++++++++++++++++++++++---
>  drivers/compress/qat/qat_comp.h     |  32 ++++
>  drivers/compress/qat/qat_comp_pmd.c | 166 ++++++++++++++++--
>  drivers/compress/qat/qat_comp_pmd.h |   2 +
>  4 files changed, 423 insertions(+), 33 deletions(-)
> 
> diff --git a/drivers/compress/qat/qat_comp.c b/drivers/compress/qat/qat_comp.c
> index 835aaa838..a80cd6864 100644
> --- a/drivers/compress/qat/qat_comp.c
> +++ b/drivers/compress/qat/qat_comp.c
> @@ -27,22 +27,51 @@ qat_comp_build_request(void *in_op, uint8_t *out_msg,
>  	struct rte_comp_op *op = in_op;
>  	struct qat_comp_op_cookie *cookie =
>  			(struct qat_comp_op_cookie *)op_cookie;
> -	struct qat_comp_xform *qat_xform = op->private_xform;
> -	const uint8_t *tmpl = (uint8_t *)&qat_xform->qat_comp_req_tmpl;
> +	struct qat_comp_stream *stream;
> +	struct qat_comp_xform *qat_xform;
> +	const uint8_t *tmpl;
>  	struct icp_qat_fw_comp_req *comp_req =
>  	    (struct icp_qat_fw_comp_req *)out_msg;
> 
> -	if (unlikely(op->op_type != RTE_COMP_OP_STATELESS)) {
> -		QAT_DP_LOG(ERR, "QAT PMD only supports stateless compression "
> -				"operation requests, op (%p) is not a "
> -				"stateless operation.", op);
> -		op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
> -		return -EINVAL;
> +	if (op->op_type == RTE_COMP_OP_STATEFUL) {
> +		stream = op->stream;
> +		qat_xform = &stream->qat_xform;
> +		if (unlikely(qat_xform->qat_comp_request_type !=
> +			     QAT_COMP_REQUEST_DECOMPRESS)) {
> +			QAT_DP_LOG(ERR, "QAT PMD does not support stateful compression");
> +			op->status = RTE_COMP_OP_STATUS_INVALID_ARGS;
> +			return -EINVAL;
> +		}
> +		if (unlikely(stream->op_in_progress)) {
> +			QAT_DP_LOG(ERR, "QAT PMD does not support running multiple stateless
> operations on the same stream at once");
[Fiona] typo - should be stateful


More information about the dev mailing list