op->sym->auth.aad.length = AES_CIPHER_IV_LENGTH;
/* Cipher Parameters */
- op->sym->cipher.iv.data = aes_iv;
+ op->sym->cipher.iv.data = (uint8_t *)m->buf_addr + m->data_off;
+ op->sym->cipher.iv.phys_addr = rte_pktmbuf_mtophys(m);
op->sym->cipher.iv.length = AES_CIPHER_IV_LENGTH;
+ rte_memcpy(op->sym->cipher.iv.data, aes_iv, AES_CIPHER_IV_LENGTH);
+
/* Data lengths/offsets Parameters */
op->sym->auth.data.offset = 0;
op->sym->auth.data.length = data_len;
rte_pktmbuf_free(mbufs[k]);
return -1;
}
-
+ /* Make room for Digest and IV in mbuf */
+ rte_pktmbuf_append(mbufs[i], digest_length);
+ rte_pktmbuf_prepend(mbufs[i], AES_CIPHER_IV_LENGTH);
}