Licensing Information

Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3239
}
/*
* the parameter offsets for exp_mod
*/
#define IXP_PARAM_BASE 0
#define IXP_PARAM_EXP 1
#define IXP_PARAM_MOD 2
#define IXP_PARAM_RES 3
/*
* key processing complete callback, is also used to start processing
* by passing a NULL for pResult
*/
static void
ixp_kperform_cb(
IxCryptoAccPkeEauOperation operation,
IxCryptoAccPkeEauOpResult *pResult,
BOOL carryOrBorrow,
IxCryptoAccStatus status)
{
struct ixp_pkq *q, *tmp;
unsigned long flags;
dprintk("%s(0x%x, %p, %d, 0x%x)\n", __FUNCTION__, operation, pResult,
carryOrBorrow, status);
/* handle a completed request */
if (pResult) {
if (ixp_pk_cur && &ixp_pk_cur->pkq_result == pResult) {
q = ixp_pk_cur;
if (status != IX_CRYPTO_ACC_STATUS_SUCCESS) {
dprintk("%s() - op failed 0x%x\n", __FUNCTION__, status);
q->pkq_krp->krp_status = ERANGE; /* could do better */
} else {
/* copy out the result */
if (ixp_copy_obuf(&q->pkq_krp->krp_param[IXP_PARAM_RES],
&q->pkq_result, q->pkq_obuf))
q->pkq_krp->krp_status = ERANGE;
}
crypto_kdone(q->pkq_krp);
kfree(q);
ixp_pk_cur = NULL;
} else
printk("%s - callback with invalid result pointer\n", __FUNCTION__);