[dpdk-dev,v4,02/26] cryptodev: replace enums with 1-byte variables
Checks
Commit Message
Instead of storing some crypto operation flags,
such as operation status, as enumerations,
store them as uint8_t, for memory efficiency.
Also, reserve extra 5 bytes in the crypto operation,
for future additions.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Akhil Goyal <akhil.goyal@nxp.com>
Acked-by: Fiona Trahe <fiona.trahe@intel.com>
---
doc/guides/rel_notes/release_17_08.rst | 3 +++
lib/librte_cryptodev/rte_crypto.h | 9 +++++----
2 files changed, 8 insertions(+), 4 deletions(-)
@@ -151,6 +151,9 @@ API Changes
* Removed the field ``rte_crypto_sym_op_sess_type`` from ``rte_crypto_sym_op``,
and moved it to ``rte_crypto_op`` as ``rte_crypto_op_sess_type``.
+ * Enumerations ``rte_crypto_op_sess_type``, ``rte_crypto_op_status`` and
+ ``rte_crypto_op_sess_type`` in ``rte_crypto_op`` have been modified to be
+ uint8_t values.
ABI Changes
@@ -102,19 +102,20 @@ enum rte_crypto_op_sess_type {
* rte_cryptodev_enqueue_burst() / rte_cryptodev_dequeue_burst() .
*/
struct rte_crypto_op {
- enum rte_crypto_op_type type;
+ uint8_t type;
/**< operation type */
-
- enum rte_crypto_op_status status;
+ uint8_t status;
/**<
* operation status - this is reset to
* RTE_CRYPTO_OP_STATUS_NOT_PROCESSED on allocation from mempool and
* will be set to RTE_CRYPTO_OP_STATUS_SUCCESS after crypto operation
* is successfully processed by a crypto PMD
*/
- enum rte_crypto_op_sess_type sess_type;
+ uint8_t sess_type;
/**< operation session type */
+ uint8_t reserved[5];
+ /**< Reserved bytes to fill 64 bits for future additions */
struct rte_mempool *mempool;
/**< crypto operation mempool which operation is allocated from */