| 808 | |
| 809 | #ifdef RTE_LIB_SECURITY |
| 810 | static int |
| 811 | ipsec_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 | |
| 854 | static int |
| 855 | pdcp_proto_testsuite_setup(void) |
nothing calls this directly
no test coverage detected