(op_mode == IN_PLACE ?
ut_params->ibuf : ut_params->obuf),
data_pad_len);
- TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
- "no room to append auth tag");
memset(sym_op->auth.digest.data, 0, auth_tag_len);
} else {
uint16_t remaining_off = (auth_offset >> 3) + (auth_len >> 3);
uint8_t *, remaining_off);
sym_op->auth.digest.phys_addr = rte_pktmbuf_iova_offset(sgl_buf,
remaining_off);
- TEST_ASSERT_NOT_NULL(sym_op->auth.digest.data,
- "no room to append auth tag");
memset(sym_op->auth.digest.data, 0, remaining_off);
while (sgl_buf->next != NULL) {
memset(rte_pktmbuf_mtod(sgl_buf, uint8_t *),
}
memset(buffer, 0, sizeof(buffer));
- /* Create SNOW 3G operation */
+ /* Create KASUMI operation */
retval = create_wireless_algo_auth_cipher_operation(
tdata->digest.len,
tdata->cipher_iv.data, tdata->cipher_iv.len,
unsigned int ciphertext_len;
struct rte_cryptodev_info dev_info;
+ struct rte_cryptodev_sym_capability_idx cap_idx;
+
+ /* Check if device supports ZUC EIA3 */
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3;
+
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);
}
}
- /* Create KASUMI session */
+ /* Create ZUC session */
retval = create_wireless_algo_auth_cipher_session(
ts_params->valid_devs[0],
(verify ? RTE_CRYPTO_CIPHER_OP_DECRYPT
ciphertext_len = ceil_byte_length(tdata->ciphertext.len);
plaintext_len = ceil_byte_length(tdata->plaintext.len);
- /* Append data which is padded to a multiple of */
- /* the algorithms block size */
ciphertext_pad_len = RTE_ALIGN_CEIL(ciphertext_len, 16);
plaintext_pad_len = RTE_ALIGN_CEIL(plaintext_len, 16);
uint8_t digest_buffer[10000];
struct rte_cryptodev_info dev_info;
+ struct rte_cryptodev_sym_capability_idx cap_idx;
+
+ /* Check if device supports ZUC EIA3 */
+ cap_idx.type = RTE_CRYPTO_SYM_XFORM_AUTH;
+ cap_idx.algo.auth = RTE_CRYPTO_AUTH_ZUC_EIA3;
+
+ if (rte_cryptodev_sym_capability_get(ts_params->valid_devs[0],
+ &cap_idx) == NULL)
+ return -ENOTSUP;
rte_cryptodev_info_get(ts_params->valid_devs[0], &dev_info);