crypto/qat: fix handle device-agnostic session
authorArek Kusztal <arkadiuszx.kusztal@intel.com>
Mon, 17 Jul 2017 16:57:15 +0000 (17:57 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Jul 2017 11:10:41 +0000 (14:10 +0300)
commitf51606537a9d3c6333fe6d55b518efeb9ecc6d01
tree4e50ee7debba1283dc4529c4b5f434b03855a315
parent0b4b1e1b88edab32a0cdfe706c800c0419c3a16a
crypto/qat: fix handle device-agnostic session

Older generations of QuickAssist hardware
may not support all algorithms supported by newer
generations. When sessions were specific to the device
this only needed to be handled on session creation.
With device-agnostic sessions, a session created
for a newer device may get routed to an older device which
can't support it.
This patch adds an enum to define QAT device generations
and uses this to detect and handle the above case on the
data path.
It also renames the capabilities structures and #defines
to match the generation names and adds the generation
to the device table in the documentation.

Fixes: b3bbd9e5f265 ("cryptodev: support device independent sessions")

Signed-off-by: Arek Kusztal <arkadiuszx.kusztal@intel.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
doc/guides/cryptodevs/qat.rst
drivers/crypto/qat/qat_adf/qat_algs.h
drivers/crypto/qat/qat_adf/qat_algs_build_desc.c
drivers/crypto/qat/qat_crypto.c
drivers/crypto/qat/qat_crypto.h
drivers/crypto/qat/qat_crypto_capabilities.h
drivers/crypto/qat/qat_qp.c
drivers/crypto/qat/rte_qat_cryptodev.c