cryptodev: remove crypto operation status value
authorKirill Rybalchenko <kirill.rybalchenko@intel.com>
Mon, 17 Jul 2017 15:25:00 +0000 (16:25 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Jul 2017 14:26:45 +0000 (17:26 +0300)
Crypto operation status RTE_CRYPTO_OP_STATUS_ENQUEUED is removed
from rte_crypto.h as it is not needed for crypto operation processing.
This status value is redundant to RTE_CRYPTO_OP_STATUS_NOT_PROCESSED value
and it was not intended to be part of public API.

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
doc/guides/rel_notes/release_17_08.rst
drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
drivers/crypto/scheduler/scheduler_pmd_private.h
lib/librte_cryptodev/rte_crypto.h

index cf0b7cb..292e87a 100644 (file)
@@ -293,6 +293,7 @@ API Changes
   * Added new field ``session_pool`` to ``rte_cryptodev_queue_pair_setup()``.
   * Removed ``aad_size`` parameter from ``rte_cryptodev_sym_capability_check_auth()``.
   * Added ``iv_size`` parameter to ``rte_cryptodev_sym_capability_check_auth()``.
+  * Removed ``RTE_CRYPTO_OP_STATUS_ENQUEUED`` from enum ``rte_crypto_op_status``.
 
 
 ABI Changes
index fda662f..032d264 100644 (file)
@@ -414,7 +414,6 @@ set_mb_job_params(JOB_AES_HMAC *job, struct aesni_mb_qp *qp,
                op->status = RTE_CRYPTO_OP_STATUS_INVALID_SESSION;
                return -1;
        }
-       op->status = RTE_CRYPTO_OP_STATUS_ENQUEUED;
 
        /* Set crypto operation */
        job->chain_order = session->chain_order;
@@ -541,7 +540,7 @@ post_process_mb_job(struct aesni_mb_qp *qp, JOB_AES_HMAC *job)
                                                        op->sym->session,
                                                        cryptodev_driver_id);
 
-       if (unlikely(op->status == RTE_CRYPTO_OP_STATUS_ENQUEUED)) {
+       if (likely(op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)) {
                switch (job->status) {
                case STS_COMPLETED:
                        op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
index a786d3a..e606716 100644 (file)
@@ -142,8 +142,7 @@ scheduler_order_drain(struct rte_ring *order_ring,
 
        while (nb_ops_to_deq < nb_objs) {
                SCHEDULER_GET_RING_OBJ(order_ring, nb_ops_to_deq, op);
-               if (op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED ||
-                                       op->status == RTE_CRYPTO_OP_STATUS_ENQUEUED)
+               if (op->status == RTE_CRYPTO_OP_STATUS_NOT_PROCESSED)
                        break;
                nb_ops_to_deq++;
        }
index 4695229..0908368 100644 (file)
@@ -66,8 +66,6 @@ enum rte_crypto_op_status {
        /**< Operation completed successfully */
        RTE_CRYPTO_OP_STATUS_NOT_PROCESSED,
        /**< Operation has not yet been processed by a crypto device */
-       RTE_CRYPTO_OP_STATUS_ENQUEUED,
-       /**< Operation is enqueued on device */
        RTE_CRYPTO_OP_STATUS_AUTH_FAILED,
        /**< Authentication verification failed */
        RTE_CRYPTO_OP_STATUS_INVALID_SESSION,