DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Trahe, Fiona" <fiona.trahe@intel.com>
To: Jerin Jacob <jerin.jacob@caviumnetworks.com>,
	"dev@dpdk.org" <dev@dpdk.org>,
	"Gupta, Ashish" <Ashish.Gupta@cavium.com>
Cc: "thomas@monjalon.net" <thomas@monjalon.net>,
	"Jacob,  Jerin" <Jerin.JacobKollanukkaran@cavium.com>,
	"Trahe, Fiona" <fiona.trahe@intel.com>
Subject: Re: [dpdk-dev] [PATCH] compress/qat: fix build issue with clang 7.0.0
Date: Mon, 29 Oct 2018 17:29:36 +0000	[thread overview]
Message-ID: <348A99DA5F5B7549AA880327E580B43589667138@IRSMSX101.ger.corp.intel.com> (raw)
In-Reply-To: <20181027164739.13110-1-jerin.jacob@caviumnetworks.com>

Hi Jerin,

> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Saturday, October 27, 2018 9:48 AM
> To: dev@dpdk.org; Trahe, Fiona <fiona.trahe@intel.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Gupta, Ashish <Ashish.Gupta@cavium.com>
> Cc: thomas@monjalon.net; Jacob, Jerin <Jerin.JacobKollanukkaran@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@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

  reply	other threads:[~2018-10-29 17:29 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-27 16:48 Jerin Jacob
2018-10-29 17:29 ` Trahe, Fiona [this message]
2018-10-31  0:39 ` [dpdk-dev] [PATCH] compress/qat: fix out-of-bounds error Fiona Trahe
2018-10-31  6:35   ` Jerin Jacob
2018-11-01 14:16     ` Bruce Richardson
2018-11-02 11:41       ` Akhil Goyal
2018-11-01 21:16   ` Jozwiak, TomaszX

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=348A99DA5F5B7549AA880327E580B43589667138@IRSMSX101.ger.corp.intel.com \
    --to=fiona.trahe@intel.com \
    --cc=Ashish.Gupta@cavium.com \
    --cc=Jerin.JacobKollanukkaran@cavium.com \
    --cc=dev@dpdk.org \
    --cc=jerin.jacob@caviumnetworks.com \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).