DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] cryptodev: remove crypto operation status value
@ 2017-07-17 15:25 Kirill Rybalchenko
  2017-07-19 14:00 ` Declan Doherty
  0 siblings, 1 reply; 3+ messages in thread
From: Kirill Rybalchenko @ 2017-07-17 15:25 UTC (permalink / raw)
  To: roy.fan.zhang, declan.doherty; +Cc: dev, Kirill Rybalchenko

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>
---
 doc/guides/rel_notes/release_17_08.rst           | 1 +
 drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c       | 3 +--
 drivers/crypto/scheduler/scheduler_pmd_private.h | 3 +--
 lib/librte_cryptodev/rte_crypto.h                | 2 --
 4 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/doc/guides/rel_notes/release_17_08.rst b/doc/guides/rel_notes/release_17_08.rst
index 6f3b662..fc886a3 100644
--- a/doc/guides/rel_notes/release_17_08.rst
+++ b/doc/guides/rel_notes/release_17_08.rst
@@ -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
diff --git a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
index 13cffaf..1b335e0 100644
--- a/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
+++ b/drivers/crypto/aesni_mb/rte_aesni_mb_pmd.c
@@ -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;
diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index a786d3a..e606716 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -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++;
 	}
diff --git a/lib/librte_cryptodev/rte_crypto.h b/lib/librte_cryptodev/rte_crypto.h
index 4695229..0908368 100644
--- a/lib/librte_cryptodev/rte_crypto.h
+++ b/lib/librte_cryptodev/rte_crypto.h
@@ -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,
-- 
2.5.5

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] cryptodev: remove crypto operation status value
  2017-07-17 15:25 [dpdk-dev] [PATCH] cryptodev: remove crypto operation status value Kirill Rybalchenko
@ 2017-07-19 14:00 ` Declan Doherty
  2017-07-19 14:35   ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 3+ messages in thread
From: Declan Doherty @ 2017-07-19 14:00 UTC (permalink / raw)
  To: Kirill Rybalchenko, roy.fan.zhang; +Cc: dev

On 17/07/2017 4:25 PM, Kirill Rybalchenko wrote:
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [dpdk-dev] [PATCH] cryptodev: remove crypto operation status value
  2017-07-19 14:00 ` Declan Doherty
@ 2017-07-19 14:35   ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 3+ messages in thread
From: De Lara Guarch, Pablo @ 2017-07-19 14:35 UTC (permalink / raw)
  To: Doherty, Declan, Rybalchenko, Kirill, Zhang, Roy Fan; +Cc: dev



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Declan Doherty
> Sent: Wednesday, July 19, 2017 3:00 PM
> To: Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Zhang, Roy Fan
> <roy.fan.zhang@intel.com>
> Cc: dev@dpdk.org
> Subject: Re: [dpdk-dev] [PATCH] cryptodev: remove crypto operation status
> value
> 
> On 17/07/2017 4:25 PM, Kirill Rybalchenko wrote:
> > 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>

Applied to dpdk-next-crypto.
Thanks,

Pablo

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-07-19 14:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-17 15:25 [dpdk-dev] [PATCH] cryptodev: remove crypto operation status value Kirill Rybalchenko
2017-07-19 14:00 ` Declan Doherty
2017-07-19 14:35   ` De Lara Guarch, Pablo

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).