[dpdk-dev] [PATCH] compress/isal: fix compression stream initialization

Daly, Lee lee.daly at intel.com
Wed Mar 27 12:35:28 CET 2019


Hi Tomasz,

> -----Original Message-----
> From: Cel, TomaszX
> Sent: Tuesday, March 26, 2019 9:42 AM
> To: dev at dpdk.org
> Cc: stable at dpdk.org; Trahe, Fiona <fiona.trahe at intel.com>; Daly, Lee
> <lee.daly at intel.com>; Tucker, Greg B <greg.b.tucker at intel.com>; Jozwiak,
> TomaszX <tomaszx.jozwiak at intel.com>
> Subject: [PATCH] compress/isal: fix compression stream initialization
> 
> This patch fixes ISAL internal state fields initialization.
> 
> Fixes: dc49e6aa4879 ("compress/isal: add ISA-L compression functionality")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Tomasz Cel <tomaszx.cel at intel.com>
> ---
>  drivers/compress/isal/isal_compress_pmd.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/compress/isal/isal_compress_pmd.c
> b/drivers/compress/isal/isal_compress_pmd.c
> index 8879a42..1e518b3 100644
> --- a/drivers/compress/isal/isal_compress_pmd.c
> +++ b/drivers/compress/isal/isal_compress_pmd.c
> @@ -412,7 +412,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;
> 
> @@ -514,8 +514,6 @@ process_isal_deflate(struct rte_comp_op *op, struct
> isal_comp_qp *qp,
>  		op->output_chksum = qp->stream->internal_state.crc;
>  	}
> 
> -	isal_deflate_reset(qp->stream);
I have tested this and it works, removing this reset function makes sense as everything cleared here is cleared in the init function anyway,
On that note, the same is to be said to isal_inflate_reset, everything cleared in reset is cleared, plus more, in isal_inflate_init.
I suggest we also remove isal_inflate_reset for commonality across both functions.

> -
>  	return ret;
>  }
> 
> --
> 2.7.4



More information about the dev mailing list