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

Function check_supported_size

dpdk/examples/l2fwd-crypto/main.c:1955–1976  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1953}
1954
1955static inline int
1956check_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
1978static int
1979check_iv_param(const struct rte_crypto_param_range *iv_range_size,

Callers 2

check_iv_paramFunction · 0.85
check_capabilitiesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected