cryptodev: fix supported size check
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 15 May 2018 19:13:13 +0000 (20:13 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Tue, 22 May 2018 14:36:11 +0000 (16:36 +0200)
commit23f0db51adbeb5ec098a9a6ed7b888f96ef7729b
tree98840d8b03971a3362269ecd8c81044f074fc050
parent5fa2a3089b5df4089009558e9d2f9b8aa31fccfb
cryptodev: fix supported size check

Crypto capability structure contains supported
sizes for key, IV, digest, etc. on different algorithms.
These sizes can be expressed as a single value or
a range of values.
The check was broken when a size was checked against
a range with multiple values.

Also, for more clarity, the param_range_check macro
has been converted into a function.

Fixes: 38227c0e3ad2 ("cryptodev: retrieve device info")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
lib/librte_cryptodev/rte_cryptodev.c