crypto-sw-scheduler: fix interrupt mode 19/38719/2
authorAlexander Skorichenko <askorichenko@netgate.com>
Mon, 24 Apr 2023 07:34:23 +0000 (09:34 +0200)
committerMatthew Smith <mgsmith@netgate.com>
Tue, 25 Apr 2023 18:02:43 +0000 (18:02 +0000)
commit61cdc0981084f049067626b0123db700035120df
tree2aea52ebb2d553921b2c14443c3b576f96e18f62
parent980f3fb2d3a3f62b296341cb423df6e1d93a193d
crypto-sw-scheduler: fix interrupt mode

Type: fix

Currently sw_scheduler runs interchangeably over queues of one selected
type either ENCRYPT or DECRYPT. Then switches the type for the next run.
This works fine in polling mode as missed frames get processed on the
next run. In interrupt mode if all of the workers miss a frame on the
first run the interrupt flag is lowered so the frame remains pending in
queues waiting for another crypto event to raise the interrupt.

With this fix force sw_scheduler in interrupt mode check the second half
of the queues if the first pass returned no results. This guarantees a
pending frame gets into processing before interrupt is reset.

Change-Id: I7e91d125702336eba72c6a3abaeabcae010d396a
Signed-off-by: Alexander Skorichenko <askorichenko@netgate.com>
src/plugins/crypto_sw_scheduler/main.c