[dpdk-dev] [EXT] [PATCH] compressdev: clarify destination buffer size for corner case

Shally Verma shallyv at marvell.com
Sat Jul 27 06:21:55 CEST 2019



> -----Original Message-----
> From: Fiona Trahe <fiona.trahe at intel.com>
> Sent: Thursday, July 25, 2019 10:34 PM
> To: dev at dpdk.org
> Cc: akhil.goyal at nxp.com; fiona.trahe at intel.com; Shally Verma
> <shallyv at marvell.com>
> Subject: [EXT] [PATCH] compressdev: clarify destination buffer size for
> corner case
> 
> External Email
> 
> ----------------------------------------------------------------------
> Clarify the corner case with incompressible data whereby the output can
> actually be greater than the uncompressed data.
> 
> Signed-off-by: Fiona Trahe <fiona.trahe at intel.com>
> ---
>  lib/librte_compressdev/rte_comp.h |    6 ++++++
>  1 files changed, 6 insertions(+), 0 deletions(-)
> 
> diff --git a/lib/librte_compressdev/rte_comp.h
> b/lib/librte_compressdev/rte_comp.h
> index b7474c4..95306c5 100644
> --- a/lib/librte_compressdev/rte_comp.h
> +++ b/lib/librte_compressdev/rte_comp.h
> @@ -323,6 +323,12 @@ struct rte_comp_op {
>  	 * If the output data is expected to be bigger than this a chain of
>  	 * mbufs can be passed to the PMD if the PMD's capabilities indicate
>  	 * it supports this.
> +	 *
> +	 * @note, if incompressible data is passed to an engine for
> compression
> +	 * using RTE_COMP_ALGO_DEFLATE, it's possible for the output data
> +	 * to be larger than the uncompressed data, due to the inclusion
> +	 * of the DEFLATE header blocks. The size of m_dst should
> accommodate
> +	 * this, else OUT_OF_SPACE errors can be expected in this case.
>  	 */
> 
>  	struct {
> --
> 1.7.0.7
Acked-by: Shally Verma <shallyv at marvell.com>


More information about the dev mailing list