Licensing Information

Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3226
return;
}
if (status == IX_CRYPTO_ACC_STATUS_SUCCESS) {
/* On success, need to copy hash back into original client buffer */
memcpy(q->ixp_hash_dest, q->ixp_hash_src,
(q->ixp_q_data->ixp_auth_alg == CRYPTO_SHA1) ?
SHA1_HASH_LEN : MD5_HASH_LEN);
}
else {
printk("ixp: hash perform failed status=%d\n", status);
q->ixp_q_crp->crp_etype = EINVAL;
}
/* Free internal buffer used for hashing */
kfree(IX_MBUF_MDATA(&q->ixp_q_mbuf));
crypto_done(q->ixp_q_crp);
kmem_cache_free(qcache, q);
}
/*
* setup a request and perform it
*/
static void
ixp_q_process(struct ixp_q *q)
{
IxCryptoAccStatus status;
struct ixp_data *ixp = q->ixp_q_data;
int auth_off = 0;
int auth_len = 0;
int crypt_off = 0;
int crypt_len = 0;
int icv_off = 0;
char *crypt_func;
dprintk("%s(%p)\n", __FUNCTION__, q);
if (q->ixp_q_ccrd) {
if (q->ixp_q_ccrd->crd_flags & CRD_F_ENCRYPT) {
if (q->ixp_q_ccrd->crd_flags & CRD_F_IV_EXPLICIT) {
q->ixp_q_iv = q->ixp_q_ccrd->crd_iv;
} else {
q->ixp_q_iv = q->ixp_q_iv_data;
read_random(q->ixp_q_iv, ixp->ixp_ctx.cipherCtx.cipherInitialVectorLen);
}
if ((q->ixp_q_ccrd->crd_flags & CRD_F_IV_PRESENT) == 0)
crypto_copyback(q->ixp_q_crp->crp_flags, q->ixp_q_crp->crp_buf,