ut/crypto: align rte_crypto_op to 64B
The original struct in DPDK requires 64B alignment. Change-Id: Ica41edbeff6b281e753107dd863aaee882cf7bed Signed-off-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Reviewed-on: https://review.gerrithub.io/c/443590 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
a182010194
commit
76981be477
@ -291,7 +291,7 @@ rte_crypto_op_attach_sym_session(struct rte_crypto_op *op,
|
|||||||
static int
|
static int
|
||||||
test_setup(void)
|
test_setup(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i, rc;
|
||||||
|
|
||||||
/* Prepare essential variables for test routines */
|
/* Prepare essential variables for test routines */
|
||||||
g_bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct crypto_bdev_io));
|
g_bdev_io = calloc(1, sizeof(struct spdk_bdev_io) + sizeof(struct crypto_bdev_io));
|
||||||
@ -319,8 +319,13 @@ test_setup(void)
|
|||||||
* same coverage just calloc them here.
|
* same coverage just calloc them here.
|
||||||
*/
|
*/
|
||||||
for (i = 0; i < MAX_TEST_BLOCKS; i++) {
|
for (i = 0; i < MAX_TEST_BLOCKS; i++) {
|
||||||
g_test_crypto_ops[i] = calloc(1, sizeof(struct rte_crypto_op) +
|
rc = posix_memalign((void **)&g_test_crypto_ops[i], 64,
|
||||||
sizeof(struct rte_crypto_sym_op));
|
sizeof(struct rte_crypto_op) + sizeof(struct rte_crypto_sym_op));
|
||||||
|
if (rc != 0) {
|
||||||
|
assert(false);
|
||||||
|
}
|
||||||
|
memset(g_test_crypto_ops[i], 0, sizeof(struct rte_crypto_op) +
|
||||||
|
sizeof(struct rte_crypto_sym_op));
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user