| 1953 | } |
| 1954 | |
| 1955 | static inline int |
| 1956 | check_supported_size(uint16_t length, uint16_t min, uint16_t max, |
| 1957 | uint16_t increment) |
| 1958 | { |
| 1959 | uint16_t supp_size; |
| 1960 | |
| 1961 | /* Single value */ |
| 1962 | if (increment == 0) { |
| 1963 | if (length == min) |
| 1964 | return 0; |
| 1965 | else |
| 1966 | return -1; |
| 1967 | } |
| 1968 | |
| 1969 | /* Range of values */ |
| 1970 | for (supp_size = min; supp_size <= max; supp_size += increment) { |
| 1971 | if (length == supp_size) |
| 1972 | return 0; |
| 1973 | } |
| 1974 | |
| 1975 | return -1; |
| 1976 | } |
| 1977 | |
| 1978 | static int |
| 1979 | check_iv_param(const struct rte_crypto_param_range *iv_range_size, |
no outgoing calls
no test coverage detected