We decided to enable HW cryptography/digest acceleration in our SAMA5D3 Xplained.
For this, we built and loaded cryptodev module in our Yocto image and after that, started to get the unusual disconnects in our client-server application that is using SSL.
To troubleshoot the issue, we slightly modified the BOOST's sample ssl client and server (client sends 1000000 bytes to echo server) and ran it on the core-image-minimal and got to the same result: no issues when cryptodev is not loaded and 100% disconnect in case if it is.
We checked the acceleration is working by running "openssl speed sha1" (the difference in case of HW and SW is visible) and made sure our ssl server can do only one cipher suite - AES128-SHA (hard-coded only available suite).
Minimal set of actions required to reproduce the issue:
1) Build the core-image-minimal yocto image with local.conf including openssl, cryptodev-module, needed boost and ssh modules:
Things we added to local.conf (for full config see local.conf.zip):
CORE_IMAGE_EXTRA_INSTALL = " \
2) Build and launch the sample ssl server (server.cpp from sources.zip). oe-init-build-env build-atmel
3) Build and launch the sample ssl client (client.cpp from sources.zip)
client localhost 5000
4) Client should send and receive 1000000 bytes of data with no problem
5) Stop the server
6) Load cryptodev
7) Run server and client - client gets a disconnect while receiving the datamodprobe cryptodev