crypto/scheduler: fix multicore reordering
authorKirill Rybalchenko <kirill.rybalchenko@intel.com>
Tue, 18 Jul 2017 10:35:38 +0000 (11:35 +0100)
committerPablo de Lara <pablo.de.lara.guarch@intel.com>
Wed, 19 Jul 2017 14:26:48 +0000 (17:26 +0300)
commit89244ea4853aa48f180d02f9723df05823162dc2
tree7bfd668a3f3f46fff139a6c41783e7839fc79bfc
parent26c4ab1a16be8f0c5c2262d182afa86397c39969
crypto/scheduler: fix multicore reordering

Operations can be dequeued from the reordering ring only after they
were dequeued from the crypto pmd with rte_cryptodev_dequeue_burst()
function. It is not correct to dequeue them when status just changed
from RTE_CRYPTO_OP_STATUS_NOT_PROCESSED to any other value, as the
operations still can be processed by crypto pmd internally.
Now multicore scheduler workers mark status of all dequeued from
crypto pmd operations with CRYPTO_OP_STATUS_BIT_COMPLETE bit set.
Scheduler will dequeue crypto operations from reordering ring only
when this status bit is set. Prior to put this operation to output
buffer, scheduler clears this bit, so the application gets
unmodified status from crypto pmd.

Fixes: 4c07e0552f0a ("crypto/scheduler: add multicore scheduling mode")

Signed-off-by: Kirill Rybalchenko <kirill.rybalchenko@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
drivers/crypto/scheduler/scheduler_multicore.c