crypto-sw-scheduler: crypto-dispatch improvement
Currently sw_scheduler runs interchangeably over queues of one selected type either ENCRYPT or DECRYPT, then switches the type for the next run. This runs perfectly when we have elements in both ENCRYPT and DECRYPT queues, however, this leads to performance degradation when only one of the queues have elements i.e either all traffic is to be encrypted or decrypted. If all operations are encryption, then 50% of the time, the loop exits without dequeueing.With this change, that dequeueing happens on every loop. This increases the performance of single mode operation (ecryption or decryption) by over 15%. This change was also added in commit61cdc09810
to fix similar performance issue when the crypto-dispatch node is in interrupt node, however was removed by9a9604b09f
which has its own limitations. Type: improvement Change-Id: I15c1375427e06187e9c4faf2461ab79935830802 Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
This commit is contained in:
@ -455,7 +455,9 @@ crypto_sw_scheduler_dequeue (vlib_main_t *vm, u32 *nb_elts_processed,
|
||||
crypto_sw_scheduler_queue_t *current_queue = 0;
|
||||
u32 tail, head;
|
||||
u8 found = 0;
|
||||
u8 recheck_queues = 1;
|
||||
|
||||
run_next_queues:
|
||||
/* get a pending frame to process */
|
||||
if (ptd->self_crypto_enabled)
|
||||
{
|
||||
@ -565,6 +567,11 @@ crypto_sw_scheduler_dequeue (vlib_main_t *vm, u32 *nb_elts_processed,
|
||||
return f;
|
||||
}
|
||||
|
||||
if (!found && recheck_queues)
|
||||
{
|
||||
recheck_queues = 0;
|
||||
goto run_next_queues;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user