Licensing Information

Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3228
 * DAVIDM fix this limitation one day by using
 * a buffer pool and chaining, it is not currently
 * needed for current user/kernel space acceleration
 */
printk("ixp: Cannot handle more than 1 iovec yet !\n");
q->ixp_q_crp->crp_etype = ENOENT;
goto done;
}
IX_MBUF_MLEN(&q->ixp_q_mbuf) =
IX_MBUF_PKT_LEN(&q->ixp_q_mbuf) = uiop->uio_iov[0].iov_len;
IX_MBUF_MDATA(&q->ixp_q_mbuf) = uiop->uio_iov[0].iov_base;
} else /* contig buffer */ {
IX_MBUF_MLEN(&q->ixp_q_mbuf) =
IX_MBUF_PKT_LEN(&q->ixp_q_mbuf) = q->ixp_q_crp->crp_ilen;
IX_MBUF_MDATA(&q->ixp_q_mbuf) = q->ixp_q_crp->crp_buf;
}
IX_MBUF_PRIV(&q->ixp_q_mbuf) = q;
if (ixp->ixp_auth_alg == CRYPTO_SHA1 || ixp->ixp_auth_alg == CRYPTO_MD5) {
/*
 * For SHA1 and MD5 hash, need to create an internal buffer that is big
 * enough to hold the original data + the appropriate padding for the
 * hash algorithm.
 */
UINT8 *tbuf = NULL;
IX_MBUF_MLEN(&q->ixp_q_mbuf) = IX_MBUF_PKT_LEN(&q->ixp_q_mbuf) =
((IX_MBUF_MLEN(&q->ixp_q_mbuf) * 8) + 72 + 511) / 8;
tbuf = kmalloc(IX_MBUF_MLEN(&q->ixp_q_mbuf), SLAB_ATOMIC);

if (IX_MBUF_MDATA(&q->ixp_q_mbuf) == NULL) {
printk("ixp: kmalloc(%u, SLAB_ATOMIC) failed\n",
IX_MBUF_MLEN(&q->ixp_q_mbuf));
q->ixp_q_crp->crp_etype = ENOMEM;
goto done;
}
memcpy(tbuf, &(IX_MBUF_MDATA(&q->ixp_q_mbuf))[auth_off], auth_len);
/* Set location in client buffer to copy hash into */
q->ixp_hash_dest =
&(IX_MBUF_MDATA(&q->ixp_q_mbuf))[auth_off + auth_len];
IX_MBUF_MDATA(&q->ixp_q_mbuf) = tbuf;
/* Set location in internal buffer for where hash starts */
q->ixp_hash_src = &(IX_MBUF_MDATA(&q->ixp_q_mbuf))[auth_len];