crypto-sw-scheduler: crypto-dispatch improvement 73/40373/2
authorNiyaz Murshed <niyaz.murshed@arm.com>
Wed, 21 Feb 2024 19:52:31 +0000 (19:52 +0000)
committerFan Zhang <fanzhang.oss@gmail.com>
Mon, 15 Apr 2024 23:30:55 +0000 (23:30 +0000)
commitdd5f75c6fd729985b988a69652d99ad11ba7efe7
treeac7d8861a3286b45467f85d234e1592ee8ae75c9
parent4ebe5eef8a696a349105d6bdf21c8c11db938a1d
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 commit https://github.com/FDio/vpp/commit/61cdc0981084f049067626b0123db700035120df
to fix similar performance issue when the crypto-dispatch node is in interrupt
node, however was removed by https://github.com/FDio/vpp/commit/9a9604b09f15691d7c4ddf29afd99a31e7e31eed
which has its own limitations.

Type: improvement
Change-Id: I15c1375427e06187e9c4faf2461ab79935830802
Signed-off-by: Niyaz Murshed <niyaz.murshed@arm.com>
src/plugins/crypto_sw_scheduler/main.c