
Please see Hardware Offloading with OpenSSL for more details on how to offload OpenSSL cryptographic operations in the
SEC crypto engine (via cryptodev).
Executing custom descriptors
SEC drivers have public descriptor submission interfaces corresponding to the following backends:
• JRI: drivers/crypto/caam/jr.c:caam_jr_enqueue()
• QI: drivers/crypto/caam/qi.c:caam_qi_enqueue()
• DPSECI: drivers/crypto/caam/caamalg_qi2.c:dpaa2_caam_enqueue()
caam_jr_enqueue()
Name
caam_jr_enqueue — Enqueue a job descriptor head. Returns 0 if OK, -EBUSY if the ring is full, -EIO if it cannot map the caller's
descriptor.
Synopsis
int caam_jr_enqueue (struct device *dev, u32 *desc,
void (*cbk) (struct device *dev, u32 *desc, u32 status, void *areq),
void *areq);
Arguments
dev: contains the job ring device that is to process this request.
desc: descriptor that initiated the request, same as “desc” being argued to caam_jr_enqueue.
cbk: pointer to a callback function to be invoked upon completion of this request. This has the form: callback(struct device *dev,
u32 *desc, u32 stat, void *arg)
areq: optional pointer to a user argument for use at callback time.
caam_qi_enqueue()
Name
caam_qi_enqueue — Enqueue a frame descriptor (FD) into a QMan frame queue. Returns 0 if OK, -EIO if it cannot map the
caller's S/G array, -EBUSY if QMan driver fails to enqueue the FD for some reason.
Synopsis
int caam_qi_enqueue(struct device *qidev, struct caam_drv_req *req);
Arguments
qidev: contains the queue interface device that is to process this request.
req: pointer to the request structure the driver application should fill while submitting a job to driver, containing a callback function
and its parameter, Queue Manager S/Gs for input and output, a per-context structure containing the CAAM shared descriptor etc.
dpaa2_caam_enqueue()
Name
dpaa2_caam_enqueue — Enqueue a frame descriptor (FD) into a QMan frame queue. Returns 0 if OK, -EBUSY if QMan driver
fails to enqueue the FD for some reason or if congestion is detected.
Synopsis
int dpaa2_caam_enqueue(struct device *dev, struct caam_request *req);
Arguments
dev: DPSECI device.
Device Drivers
Layerscape LS1028A BSP User Guide, Rev. 0.3, 04/2019
NXP Semiconductors
75
Содержание Layerscape LS1028A BSP
Страница 135: ......