While testing I/O performance on a SolidRun Clearfog Pro (ARMADA A38x) with an SSD (PLEXTOR PX-128M6G-2242) encrypted by GELI AES-CBC, errors were reported on the console/dmesg about running out of TMDA descriptors.
Looking at sys/dev/cesa/cesa.h, the comments seem to focus on network buffers with a maximum size of 1500 bytes while SSD disk I/O in my case would involve 4KB buffers. Without really diving into the rest of the code, I've increased the values in cesa.h and can now operate the SSD with sustained rates ~200MB/s without running out of TDMA descriptors.
There might be better ways to do this but the "diff" below most certainly fixed my issue.
--- sys/dev/cesa/cesa.h (revision 329554)
+++ sys/dev/cesa/cesa.h (working copy)
@@ -63,8 +63,8 @@
/* Values below are optimized for requests containing about 1.5 kB of data */
-#define CESA_SA_DESC_PER_REQ 2
-#define CESA_TDMA_DESC_PER_REQ 8
+#define CESA_SA_DESC_PER_REQ (2 * 3) /* 4KB, not 1.5kB */
+#define CESA_TDMA_DESC_PER_REQ (8 * 3) /* 4KB, not 1.5kB */
#define CESA_SA_DESCRIPTORS (CESA_SA_DESC_PER_REQ * CESA_REQUESTS)
#define CESA_TDMA_DESCRIPTORS (CESA_TDMA_DESC_PER_REQ * CESA_REQUESTS)
Add some people to CC: that can likely help with this issue.