From 52dcc63d09a0fa103738ac6a258d84247585cf78 Mon Sep 17 00:00:00 2001 From: Hemant Agrawal Date: Fri, 18 Oct 2019 13:26:11 +0530 Subject: [PATCH] test/crypto: fix build without rte_security This patch fixes the compilation issue in test_cryptodev.c when RTE_LIBRTE_SECURITY is disabled. Fixes: d883e6e7131b ("test/crypto: add PDCP C-Plane encap cases") Signed-off-by: Hemant Agrawal Acked-by: Thierry Herbelot Acked-by: Akhil Goyal --- app/test/test_cryptodev.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/test/test_cryptodev.c b/app/test/test_cryptodev.c index 35738a40db..4c4ff7d189 100644 --- a/app/test/test_cryptodev.c +++ b/app/test/test_cryptodev.c @@ -72,9 +72,13 @@ struct crypto_unittest_params { union { struct rte_cryptodev_sym_session *sess; +#ifdef RTE_LIBRTE_SECURITY struct rte_security_session *sec_session; +#endif }; +#ifdef RTE_LIBRTE_SECURITY enum rte_security_session_action_type type; +#endif struct rte_crypto_op *op; struct rte_mbuf *obuf, *ibuf; @@ -574,6 +578,7 @@ ut_teardown(void) struct rte_cryptodev_stats stats; /* free crypto session structure */ +#ifdef RTE_LIBRTE_SECURITY if (ut_params->type == RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL) { if (ut_params->sec_session) { rte_security_session_destroy(rte_cryptodev_get_sec_ctx @@ -581,7 +586,9 @@ ut_teardown(void) ut_params->sec_session); ut_params->sec_session = NULL; } - } else { + } else +#endif + { if (ut_params->sess) { rte_cryptodev_sym_session_clear( ts_params->valid_devs[0], -- 2.20.1