app/crypto-perf: fix parameters copy
authorJerin Jacob <jerin.jacob@caviumnetworks.com>
Wed, 16 May 2018 12:28:04 +0000 (17:58 +0530)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 22 May 2018 14:36:11 +0000 (16:36 +0200)
commit873dac8ec608ca02d59214b4a3022b2f25de717b
tree01f86b137cebfe7c509cc9b745f3e91b67895107
parent21f579fcefd3ac21d1894be662f774cf48bb914e
app/crypto-perf: fix parameters copy

Since arm64 was using plain memcpy for rte_memcpy, gcc 8.1, could
detect size was more than source address range. In this case, the
source was wrong.

test/test/test_cryptodev.c: In function 'test_multi_session_random_usage':
rte_memcpy_64.h:364:29: error: 'memcpy'
forming offset [113, 184] is out of the bounds [0, 112] of object
'testsuite_params' with type 'struct crypto_testsuite_params'
[-Werror=array-bounds]
 #define rte_memcpy(d, s, n) memcpy((d), (s), (n))
                             ^~~~~~~~~~~~~~~~~~~~~
test/test/test_cryptodev.c:6618:3: note:
in expansion of macro 'rte_memcpy'
   rte_memcpy(&ut_paramz[i].ut_params, &testsuite_params,
   ^~~~~~~~~~
test/test/test_cryptodev.c:140:39: note:
'testsuite_params' declared here
 static struct crypto_testsuite_params testsuite_params = { NULL };

Fixes: ffbe3be0d4b5 ("app/test: add libcrypto")
Cc: stable@dpdk.org
Suggested-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
test/test/test_cryptodev.c