| 9039 | |
| 9040 | #ifdef RTE_LIB_SECURITY |
| 9041 | static int |
| 9042 | security_proto_supported(enum rte_security_session_action_type action, |
| 9043 | enum rte_security_session_protocol proto) |
| 9044 | { |
| 9045 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 9046 | |
| 9047 | const struct rte_security_capability *capabilities; |
| 9048 | const struct rte_security_capability *capability; |
| 9049 | uint16_t i = 0; |
| 9050 | |
| 9051 | void *ctx = rte_cryptodev_get_sec_ctx(ts_params->valid_devs[0]); |
| 9052 | |
| 9053 | |
| 9054 | capabilities = rte_security_capabilities_get(ctx); |
| 9055 | |
| 9056 | if (capabilities == NULL) |
| 9057 | return -ENOTSUP; |
| 9058 | |
| 9059 | while ((capability = &capabilities[i++])->action != |
| 9060 | RTE_SECURITY_ACTION_TYPE_NONE) { |
| 9061 | if (capability->action == action && |
| 9062 | capability->protocol == proto) |
| 9063 | return 0; |
| 9064 | } |
| 9065 | |
| 9066 | return -ENOTSUP; |
| 9067 | } |
| 9068 | |
| 9069 | /* Basic algorithm run function for async inplace mode. |
| 9070 | * Creates a session from input parameters and runs one operation |
no test coverage detected