sym_op->auth.data.length = QUOTE_512_BYTES;
/* Set crypto operation cipher parameters */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;
- rte_memcpy(sym_op->cipher.iv.data, aes_cbc_iv, CIPHER_IV_LENGTH_AES_CBC);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ aes_cbc_iv, CIPHER_IV_LENGTH_AES_CBC);
sym_op->cipher.data.offset = 0;
sym_op->cipher.data.length = QUOTE_512_BYTES;
sym_op->auth.data.offset = 0;
sym_op->auth.data.length = QUOTE_512_BYTES;
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = CIPHER_IV_LENGTH_AES_CBC;
- rte_memcpy(sym_op->cipher.iv.data, iv, CIPHER_IV_LENGTH_AES_CBC);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, CIPHER_IV_LENGTH_AES_CBC);
sym_op->cipher.data.offset = 0;
sym_op->cipher.data.length = QUOTE_512_BYTES;
sym_op->m_src = ut_params->ibuf;
/* iv */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = cipher_offset;
return 0;
sym_op->m_dst = ut_params->obuf;
/* iv */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = cipher_offset;
return 0;
TEST_HEXDUMP(stdout, "aad:", sym_op->auth.aad.data, aad_len);
/* iv */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = cipher_offset + auth_offset;
sym_op->auth.data.length = auth_len;
TEST_HEXDUMP(stdout, "aad:", sym_op->auth.aad.data, aad_len);
/* iv */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = cipher_offset + auth_offset;
sym_op->auth.data.length = auth_len;
sym_op->auth.aad.data, aad_len);
/* iv */
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, iv, iv_len);
-
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ iv, iv_len);
sym_op->cipher.data.length = cipher_len;
sym_op->cipher.data.offset = auth_offset + cipher_offset;
sym_op->auth.aad.length);
/* Append IV at the end of the crypto operation*/
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
+ uint8_t *, IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = tdata->iv.len;
- rte_memcpy(sym_op->cipher.iv.data, tdata->iv.data, tdata->iv.len);
- TEST_HEXDUMP(stdout, "iv:", sym_op->cipher.iv.data,
+ rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
+ TEST_HEXDUMP(stdout, "iv:", iv_ptr,
sym_op->cipher.iv.length);
/* Append plaintext/ciphertext */
sym_op->auth.digest.length);
}
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
+ uint8_t *, IV_OFFSET);
+
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = tdata->iv.len;
- rte_memcpy(sym_op->cipher.iv.data, tdata->iv.data, tdata->iv.len);
+ rte_memcpy(iv_ptr, tdata->iv.data, tdata->iv.len);
- TEST_HEXDUMP(stdout, "iv:", sym_op->cipher.iv.data, tdata->iv.len);
+ TEST_HEXDUMP(stdout, "iv:", iv_ptr, tdata->iv.len);
sym_op->cipher.data.length = 0;
sym_op->cipher.data.offset = 0;
sym_op->auth.digest.data,
sym_op->auth.digest.length);
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = reference->iv.len;
- rte_memcpy(sym_op->cipher.iv.data, reference->iv.data, reference->iv.len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ reference->iv.data, reference->iv.len);
sym_op->cipher.data.length = 0;
sym_op->cipher.data.offset = 0;
sym_op->auth.digest.data,
sym_op->auth.digest.length);
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = reference->iv.len;
- rte_memcpy(sym_op->cipher.iv.data, reference->iv.data, reference->iv.len);
+ rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET),
+ reference->iv.data, reference->iv.len);
sym_op->cipher.data.length = reference->ciphertext.len;
sym_op->cipher.data.offset = 0;
sym_op->auth.digest.length);
}
- sym_op->cipher.iv.data = rte_crypto_op_ctod_offset(ut_params->op,
- uint8_t *, IV_OFFSET);
- sym_op->cipher.iv.phys_addr = rte_crypto_op_ctophys_offset(ut_params->op,
- IV_OFFSET);
+ uint8_t *iv_ptr = rte_crypto_op_ctod_offset(ut_params->op,
+ uint8_t *, IV_OFFSET);
+ sym_op->cipher.iv.offset = IV_OFFSET;
sym_op->cipher.iv.length = iv_len;
- rte_memcpy(sym_op->cipher.iv.data, tdata->iv.data, iv_len);
+ rte_memcpy(iv_ptr, tdata->iv.data, iv_len);
sym_op->auth.aad.data = (uint8_t *)rte_pktmbuf_prepend(
ut_params->ibuf, aad_len);
memset(sym_op->auth.aad.data, 0, aad_len);
rte_memcpy(sym_op->auth.aad.data, tdata->aad.data, aad_len);
- TEST_HEXDUMP(stdout, "iv:", sym_op->cipher.iv.data, iv_len);
+ TEST_HEXDUMP(stdout, "iv:", iv_ptr, iv_len);
TEST_HEXDUMP(stdout, "aad:",
sym_op->auth.aad.data, aad_len);