From: Hemant Agrawal Date: Fri, 18 Oct 2019 07:56:11 +0000 (+0530) Subject: test/crypto: fix build without rte_security X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=52dcc63d09a0fa103738ac6a258d84247585cf78;p=dpdk.git 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 --- 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],