numam-dpdk/drivers/crypto/qat
Amit Prakash Shukla 04361fe2ac crypto/qat: fix build with GCC 12
GCC 12 raises the following warning:

In function '_mm_storeu_si128',
    inlined from 'rte_mov16' at
	../lib/eal/x86/include/rte_memcpy.h:508:2,
    inlined from 'rte_mov128' at
	../lib/eal/x86/include/rte_memcpy.h:542:2,
    inlined from 'rte_memcpy_generic' at
	../lib/eal/x86/include/rte_memcpy.h:732:4,
    inlined from 'rte_memcpy' at
	../lib/eal/x86/include/rte_memcpy.h:882:10,
    inlined from 'qat_sym_do_precomputes.constprop' at
	../drivers/crypto/qat/qat_sym_session.c:1434:2:
/usr/lib/gcc/x86_64-pc-linux-gnu/12.1.1/include/emmintrin.h:739:8: error:
	array subscript 8 is outside array bounds of 'unsigned char[128]'
	[-Werror=array-bounds]
  739 |   *__P = __B;
      |   ~~~~~^~~~~

../drivers/crypto/qat/qat_sym_session.c:
	In function 'qat_sym_do_precomputes.constprop':
../drivers/crypto/qat/qat_sym_session.c:1305:17: note:
	at offset 192 into object 'opad.750' of size 128
 1305 | uint8_t
	  opad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)];
      |           ^~~~

../drivers/crypto/qat/qat_sym_session.c:
	In function 'qat_sym_do_precomputes.constprop':
../drivers/crypto/qat/qat_sym_session.c:1304:17: note:
	at offset 128 into object 'ipad.749' of size 128
 1304 | uint8_t
	  ipad[qat_hash_get_block_size(ICP_QAT_HW_AUTH_ALGO_DELIMITER)];
      |           ^~~~

Added a check to prevent compiler warnings.

Fixes: 1703e94ac5 ("qat: add driver for QuickAssist devices")
Cc: stable@dpdk.org

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
2022-09-27 17:16:52 +02:00
..
dev crypto/qat: enable asymmetric crypto on GEN4 device 2022-06-01 16:26:35 +02:00
qat_asym.c crypto/qat: fix missing copy guards in asym mod 2022-06-21 20:04:50 +02:00
qat_asym.h crypto/qat: refactor asym algorithm macros and logs 2022-06-01 16:26:35 +02:00
qat_crypto.c crypto/qat: unify device private data structure 2021-11-04 19:46:27 +01:00
qat_crypto.h crypto/qat: unify raw data path functions 2022-02-23 09:59:16 +01:00
qat_ec.h crypto/qat: add secp384r1 curve 2022-06-01 16:26:35 +02:00
qat_sym_session.c crypto/qat: fix build with GCC 12 2022-09-27 17:16:52 +02:00
qat_sym_session.h crypto/qat: rework session functions 2022-02-23 09:59:16 +01:00
qat_sym.c bus/pci: make driver-only headers private 2022-09-23 16:14:34 +02:00
qat_sym.h crypto/qat: rework burst data path 2022-02-23 09:59:16 +01:00