Table 10. Algorithms supported by each interface / backend (continued)
Algorithm name / Backend
Job Ring Interface
Queue Interface
DPSEC Interface
hmac(sha384)
Yes
No
Yes
hmac(sha512)
Yes
No
Yes
md5
Yes
No
Yes
sha1
Yes
No
Yes
sha224
Yes
No
Yes
sha256
Yes
No
Yes
sha384
Yes
No
Yes
sha512
Yes
No
Yes
CAAM Job Ring backend driver specifics
CAAM Job Ring backend driver (
caam_jr
) implements and utilizes the job ring interface (JRI) for submitting crypto API service
requests from the frontend drivers (
caamalg
,
caamhash
,
caam_pkc
,
caamrng
) to CAAM engine.
CAAM drivers have a few options, most notably hardware job ring size and interrupt coalescing. They can be used to fine-tune
performance for a particular use case.
The option
Freescale CAAM-Multicore platform driver backend
enables the basic platform driver (
caam
). All (non-DPAA2) sub-
options depend on this.
The option
Freescale CAAM Job Ring driver backend (SEC)
enables the Job Ring backend (
caam_jr
).
The sub-option
Job Ring Size
allows the user to select the size of the hardware job rings; if requests arrive at the driver enqueue
entry point in a bursty nature, the bursts' maximum length can be approximated etc. One can set the greatest burst length to save
performance and memory consumption.
The sub-option
Job Ring interrupt coalescing
allows the user to select the use of the hardware’s interrupt coalescing feature.
Note that the driver already performs IRQ coalescing in software, and zero-loss benchmarks have in fact produced better results
with this option turned off. If selected, two additional options become effective:
•
Job Ring interrupt coalescing count threshold
(CRYPTO_DEV_FSL_CAAM_INTC_THLD)
Selects the value of the descriptor completion threshold, in the range 1-256. A selection of 1 effectively defeats the coalescing
feature, and any selection equal or greater than the selected ring size will force timeouts for each interrupt.
•
Job Ring interrupt coalescing timer threshold
(CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD)
Selects the value of the completion timeout threshold in multiples of 64 SEC interface clocks, to which, if no new descriptor
completions occur within this window (and at least one completed job is pending), then an interrupt will occur. This is selectable
in the range 1-65535.
The options to register to Crypto API, hwrng API respectively, allow the frontend drivers to register their algorithm capabilities with
the corresponding APIs. They should be deselected only when the purpose is to perform Crypto API requests in software (on the
GPPs) instead of offloading them on SEC engine.
caamhash
frontend (hash algorithms) may be individually turned off, since the nature of the application may be such that it prefers
software (core) crypto latency due to many small-sized requests.
caam_pkc
frontend (public key / asymmetric algorithms) can be turned off too, if needed.
caamrng
frontend (Random Number Generation) may be turned off in case there is an alternate source of entropy available to
the kernel.
Linux kernel
Layerscape LS1028A BSP User Guide, Rev. 0.3, 04/2019
72
NXP Semiconductors
Summary of Contents for Layerscape LS1028A BSP
Page 135: ......