All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] crypto/scheduler: change ordering ring dequeue
@ 2017-04-19 14:47 Fan Zhang
  2017-04-19 16:31 ` De Lara Guarch, Pablo
  0 siblings, 1 reply; 2+ messages in thread
From: Fan Zhang @ 2017-04-19 14:47 UTC (permalink / raw)
  To: dev; +Cc: pablo.de.lara.guarch

Commit <ecaed092b677> ("ring: return remaining entry count when
dequeuing") changed the return of rte_ring_sc_dequeue_bulk, this
patch updates the scheduler to comply with this change.

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/crypto/scheduler/scheduler_pmd_private.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/crypto/scheduler/scheduler_pmd_private.h b/drivers/crypto/scheduler/scheduler_pmd_private.h
index 33edd1d..421dae3 100644
--- a/drivers/crypto/scheduler/scheduler_pmd_private.h
+++ b/drivers/crypto/scheduler/scheduler_pmd_private.h
@@ -132,7 +132,7 @@ scheduler_order_drain(struct rte_ring *order_ring,
 	struct rte_crypto_op *op;
 	uint32_t nb_objs = rte_ring_count(order_ring);
 	uint32_t nb_ops_to_deq = 0;
-	int status = -1;
+	uint32_t nb_ops_deqd = 0;
 
 	if (nb_objs > nb_ops)
 		nb_objs = nb_ops;
@@ -145,10 +145,10 @@ scheduler_order_drain(struct rte_ring *order_ring,
 	}
 
 	if (nb_ops_to_deq)
-		status = rte_ring_sc_dequeue_bulk(order_ring, (void **)ops,
-				nb_ops_to_deq, NULL);
+		nb_ops_deqd = rte_ring_sc_dequeue_bulk(order_ring,
+				(void **)ops, nb_ops_to_deq, NULL);
 
-	return (status == 0) ? nb_ops_to_deq : 0;
+	return nb_ops_deqd;
 }
 /** device specific operations function pointer structure */
 extern struct rte_cryptodev_ops *rte_crypto_scheduler_pmd_ops;
-- 
2.7.4

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

* Re: [PATCH] crypto/scheduler: change ordering ring dequeue
  2017-04-19 14:47 [PATCH] crypto/scheduler: change ordering ring dequeue Fan Zhang
@ 2017-04-19 16:31 ` De Lara Guarch, Pablo
  0 siblings, 0 replies; 2+ messages in thread
From: De Lara Guarch, Pablo @ 2017-04-19 16:31 UTC (permalink / raw)
  To: Zhang, Roy Fan, dev



> -----Original Message-----
> From: Zhang, Roy Fan
> Sent: Wednesday, April 19, 2017 3:47 PM
> To: dev@dpdk.org
> Cc: De Lara Guarch, Pablo
> Subject: [PATCH] crypto/scheduler: change ordering ring dequeue
> 
> Commit <ecaed092b677> ("ring: return remaining entry count when
> dequeuing") changed the return of rte_ring_sc_dequeue_bulk, this
> patch updates the scheduler to comply with this change.
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>

Modified title to: "crypto/scheduler fix ring dequeue return handling"
Added "Fixes: 8a48e039432b ("crypto/scheduler: optimize crypto op ordering")"

Applied to dpdk-next-crypto.

Thanks,
Pablo

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

end of thread, other threads:[~2017-04-19 16:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-19 14:47 [PATCH] crypto/scheduler: change ordering ring dequeue Fan Zhang
2017-04-19 16:31 ` De Lara Guarch, Pablo

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.