Licensing Information
Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3233
q = list_entry(ixp->ixp_q.next, struct ixp_q, ixp_q_list);
if (q->ixp_q_acrd) {
pri = &ixp->ixp_pri_mbuf;
sec = &ixp->ixp_sec_mbuf;
IX_MBUF_MLEN(pri) = IX_MBUF_PKT_LEN(pri) = 128;
IX_MBUF_MDATA(pri) = (unsigned char *) kmalloc(128, SLAB_ATOMIC);
IX_MBUF_MLEN(sec) = IX_MBUF_PKT_LEN(sec) = 128;
IX_MBUF_MDATA(sec) = (unsigned char *) kmalloc(128, SLAB_ATOMIC);
}
/* Only need to register if a crypt op or HMAC op */
if (!(ixp->ixp_auth_alg == CRYPTO_SHA1 ||
ixp->ixp_auth_alg == CRYPTO_MD5)) {
status = ixCryptoAccCtxRegister(
&ixp->ixp_ctx,
pri, sec,
ixp_register_cb,
ixp_perform_cb,
&ixp->ixp_ctx_id);
}
else {
/* Otherwise we start processing pending q */
schedule_work(&ixp->ixp_pending_work);
}
if (IX_CRYPTO_ACC_STATUS_SUCCESS == status)
return;
if (IX_CRYPTO_ACC_STATUS_EXCEED_MAX_TUNNELS == status) {
printk("ixp: ixCryptoAccCtxRegister failed (out of tunnels)\n");
ixp_blocked = 1;
/* perhaps we should return EGAIN on queued ops ? */
return;
}
printk("ixp: ixCryptoAccCtxRegister failed %d\n", status);
ixp->ixp_ctx_id = -1;
/*
* everything waiting is toasted
*/
while (!list_empty(&ixp->ixp_q)) {
q = list_entry(ixp->ixp_q.next, struct ixp_q, ixp_q_list);
list_del(&q->ixp_q_list);
q->ixp_q_crp->crp_etype = ENOENT;
crypto_done(q->ixp_q_crp);
kmem_cache_free(qcache, q);
}










