ovpanait / zynq-aes

AES hardware engine for Xilinx Zynq platform
MIT License
27 stars 10 forks source link

openssl speed sometimes hangs #4

Closed ovpanait closed 4 years ago

ovpanait commented 4 years ago

Running openssl speed in a loop will at some point hang:

# while :; do openssl speed  -evp aes-256-ctr -elapsed; done

Sometimes the issue will occur fast, sometimes it might take lots of iterations.

From examining the dmesg debug logs, it seems that openssl interleaves calls to 256-bit ECB_ENCRYPTION (rctx->cmd = 0x62) with the benchmarked CTR calls. Every time, the issue occurs after a 256-bit ECB_ENCRYPTION operation is sent after a CTR operation.

/proc/interrupts indicates that a Rx interrupt occurred, but no Tx interrupt was received. This might indicate that the accelerator hit a corner case and hung (TLAST signal was not asserted).

Currently, the issue is not reproducible during simulation using the existing AXI VIP setup.