[dpdk-dev] [PATCH] compress/qat: fix build issue with clang 7.0.0
Trahe, Fiona
fiona.trahe at intel.com
Mon Oct 29 18:29:36 CET 2018
Hi Jerin,
> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com]
> Sent: Saturday, October 27, 2018 9:48 AM
> To: dev at dpdk.org; Trahe, Fiona <fiona.trahe at intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch at intel.com>; Gupta, Ashish <Ashish.Gupta at cavium.com>
> Cc: thomas at monjalon.net; Jacob, Jerin <Jerin.JacobKollanukkaran at cavium.com>
> Subject: [dpdk-dev] [PATCH] compress/qat: fix build issue with clang 7.0.0
>
> QAT_NUM_BUFS_IN_IM_SGL defined as 1 the code access beyond
> the first element.
>
> error log:
> /export/dpdk.org/drivers/compress/qat/qat_comp_pmd.c:214:3:
> error: array index 1 is past the end of the array
> (which contains 1 element) [-Werror,-Warray-bounds]
> sgl->buffers[1].addr = mz_start_phys + offset_of_flat_buffs +
>
> Fixes: a124830a6f00 ("compress/qat: enable dynamic huffman encoding")
>
> Signed-off-by: Jerin Jacob <jerin.jacob at caviumnetworks.com>
> ---
> drivers/compress/qat/qat_comp.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/compress/qat/qat_comp.h b/drivers/compress/qat/qat_comp.h
> index 99a4462eb..24d0d9cb4 100644
> --- a/drivers/compress/qat/qat_comp.h
> +++ b/drivers/compress/qat/qat_comp.h
> @@ -17,7 +17,7 @@
>
> #define QAT_64_BYTE_ALIGN_MASK (~0x3f)
> #define QAT_64_BYTE_ALIGN (64)
> -#define QAT_NUM_BUFS_IN_IM_SGL 1
> +#define QAT_NUM_BUFS_IN_IM_SGL 2
[Fiona] Thanks for this. I'm surprised gcc didn't give a warning.
However, setting to 2 causes issues on some platforms, which
was why we reverted to 1 in an earlier iteration.
So Nack
I'll send a different patch to fix.
>
> #define ERR_CODE_QAT_COMP_WRONG_FW -99
>
> --
> 2.19.1
More information about the dev
mailing list