Licensing Information
Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3224
ixp->ixp_ctx.authCtx.authAlgo = IX_CRYPTO_ACC_AUTH_SHA1;
ixp->ixp_ctx.authCtx.authDigestLen = AUTH_LEN(cri, SHA1_HASH_LEN);
ixp->ixp_ctx.authCtx.aadLen = 0;
/* Only SHA1_HMAC needs a key */
if (cri->cri_alg == CRYPTO_SHA1_HMAC) {
ixp->ixp_ctx.authCtx.authKeyLen = (cri->cri_klen + 7) / 8;
if (ixp->ixp_ctx.authCtx.authKeyLen >
sizeof(ixp->ixp_ctx.authCtx.key.authKey)) {
printk(
"ixp4xx: Invalid key length for SHA1_HMAC - %d bits\n",
cri->cri_klen);
ixp_freesession(NULL, i);
return EINVAL;
}
memcpy(ixp->ixp_ctx.authCtx.key.authKey,
cri->cri_key, (cri->cri_klen + 7) / 8);
}
break;
default:
printk("ixp: unknown algo 0x%x\n", cri->cri_alg);
ixp_freesession(NULL, i);
return EINVAL;
}
cri = cri->cri_next;
}
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,20)
INIT_WORK(&ixp->ixp_pending_work, ixp_process_pending_wq);
INIT_WORK(&ixp->ixp_registration_work, ixp_registration_wq);
#else
INIT_WORK(&ixp->ixp_pending_work, ixp_process_pending, ixp);
INIT_WORK(&ixp->ixp_registration_work, ixp_registration, ixp);
#endif
return 0;
}
/*
* Free a session.
*/
static int
ixp_freesession(device_t dev, u_int64_t tid)
{
u_int32_t sid = CRYPTO_SESID2LID(tid);
dprintk("%s()\n", __FUNCTION__);










