From: Akhil Goyal Date: Wed, 12 Oct 2016 11:16:29 +0000 (+0530) Subject: app/test: store digest/IV at a DMA able address X-Git-Tag: spdx-start~5516 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=57af81f7fa472a6b8a1d87b15178e1d1567e7cbc;p=dpdk.git app/test: store digest/IV at a DMA able address For physical crypto devices, IV and digest are processed by the crypto device which needs the contents to be written on some DMA able address. So in order to do that, IV and digest are accomodated in the packet. Signed-off-by: Akhil Goyal Acked-by: Fiona Trahe --- diff --git a/app/test/test_cryptodev_perf.c b/app/test/test_cryptodev_perf.c index 43a7166e98..0b6e050c84 100644 --- a/app/test/test_cryptodev_perf.c +++ b/app/test/test_cryptodev_perf.c @@ -2722,9 +2722,12 @@ test_perf_set_crypto_op_aes(struct rte_crypto_op *op, struct rte_mbuf *m, 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; @@ -2893,7 +2896,9 @@ test_perf_aes_sha(uint8_t dev_id, uint16_t queue_id, 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); }