MCPcopy Create free account
hub / github.com/F-Stack/f-stack / ipsec_proto_testsuite_setup

Function ipsec_proto_testsuite_setup

dpdk/app/test/test_cryptodev.c:810–852  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

808
809#ifdef RTE_LIB_SECURITY
810static int
811ipsec_proto_testsuite_setup(void)
812{
813 struct crypto_testsuite_params *ts_params = &testsuite_params;
814 struct crypto_unittest_params *ut_params = &unittest_params;
815 struct rte_cryptodev_info dev_info;
816 int ret = 0;
817
818 rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
819
820 if (!(dev_info.feature_flags & RTE_CRYPTODEV_FF_SECURITY)) {
821 RTE_LOG(INFO, USER1, "Feature flag requirements for IPsec Proto "
822 "testsuite not met\n");
823 return TEST_SKIPPED;
824 }
825
826 /* Reconfigure to enable security */
827 ret = dev_configure_and_start(0);
828 if (ret != TEST_SUCCESS)
829 return ret;
830
831 /* Set action type */
832 ut_params->type = RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL;
833
834 if (security_proto_supported(
835 RTE_SECURITY_ACTION_TYPE_LOOKASIDE_PROTOCOL,
836 RTE_SECURITY_PROTOCOL_IPSEC) < 0) {
837 RTE_LOG(INFO, USER1, "Capability requirements for IPsec Proto "
838 "test not met\n");
839 ret = TEST_SKIPPED;
840 }
841
842 test_ipsec_alg_list_populate();
843 test_ipsec_ah_alg_list_populate();
844
845 /*
846 * Stop the device. Device would be started again by individual test
847 * case setup routine.
848 */
849 rte_cryptodev_stop(ts_params->valid_devs[0]);
850
851 return ret;
852}
853
854static int
855pdcp_proto_testsuite_setup(void)

Callers

nothing calls this directly

Calls 6

rte_cryptodev_info_getFunction · 0.85
security_proto_supportedFunction · 0.85
rte_cryptodev_stopFunction · 0.85
dev_configure_and_startFunction · 0.70

Tested by

no test coverage detected