DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] compress/qat: fix build issue with clang 7.0.0
@ 2018-10-27 16:48 Jerin Jacob
  2018-10-29 17:29 ` Trahe, Fiona
  2018-10-31  0:39 ` [dpdk-dev] [PATCH] compress/qat: fix out-of-bounds error Fiona Trahe
  0 siblings, 2 replies; 7+ messages in thread
From: Jerin Jacob @ 2018-10-27 16:48 UTC (permalink / raw)
  To: dev, Fiona Trahe, Pablo de Lara, Gupta, Ashish; +Cc: thomas, Jacob,  Jerin

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
 
 #define ERR_CODE_QAT_COMP_WRONG_FW -99
 
-- 
2.19.1

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-11-02 11:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-27 16:48 [dpdk-dev] [PATCH] compress/qat: fix build issue with clang 7.0.0 Jerin Jacob
2018-10-29 17:29 ` Trahe, Fiona
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

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).