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

Function check_iv_param

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

Source from the content-addressed store, hash-verified

1976}
1977
1978static int
1979check_iv_param(const struct rte_crypto_param_range *iv_range_size,
1980 unsigned int iv_param, int iv_random_size,
1981 uint16_t iv_length)
1982{
1983 /*
1984 * Check if length of provided IV is supported
1985 * by the algorithm chosen.
1986 */
1987 if (iv_param) {
1988 if (check_supported_size(iv_length,
1989 iv_range_size->min,
1990 iv_range_size->max,
1991 iv_range_size->increment)
1992 != 0)
1993 return -1;
1994 /*
1995 * Check if length of IV to be randomly generated
1996 * is supported by the algorithm chosen.
1997 */
1998 } else if (iv_random_size != -1) {
1999 if (check_supported_size(iv_random_size,
2000 iv_range_size->min,
2001 iv_range_size->max,
2002 iv_range_size->increment)
2003 != 0)
2004 return -1;
2005 }
2006
2007 return 0;
2008}
2009
2010static int
2011check_capabilities(struct l2fwd_crypto_options *options, uint8_t cdev_id)

Callers 1

check_capabilitiesFunction · 0.85

Calls 1

check_supported_sizeFunction · 0.85

Tested by

no test coverage detected