| 8742 | } |
| 8743 | |
| 8744 | static int |
| 8745 | create_aead_xform(struct rte_crypto_op *op, |
| 8746 | enum rte_crypto_aead_algorithm algo, |
| 8747 | enum rte_crypto_aead_operation aead_op, |
| 8748 | uint8_t *key, const uint8_t key_len, |
| 8749 | const uint8_t aad_len, const uint8_t auth_len, |
| 8750 | uint8_t iv_len) |
| 8751 | { |
| 8752 | TEST_ASSERT_NOT_NULL(rte_crypto_op_sym_xforms_alloc(op, 1), |
| 8753 | "failed to allocate space for crypto transform"); |
| 8754 | |
| 8755 | struct rte_crypto_sym_op *sym_op = op->sym; |
| 8756 | |
| 8757 | /* Setup AEAD Parameters */ |
| 8758 | sym_op->xform->type = RTE_CRYPTO_SYM_XFORM_AEAD; |
| 8759 | sym_op->xform->next = NULL; |
| 8760 | sym_op->xform->aead.algo = algo; |
| 8761 | sym_op->xform->aead.op = aead_op; |
| 8762 | sym_op->xform->aead.key.data = key; |
| 8763 | sym_op->xform->aead.key.length = key_len; |
| 8764 | sym_op->xform->aead.iv.offset = IV_OFFSET; |
| 8765 | sym_op->xform->aead.iv.length = iv_len; |
| 8766 | sym_op->xform->aead.digest_length = auth_len; |
| 8767 | sym_op->xform->aead.aad_length = aad_len; |
| 8768 | |
| 8769 | debug_hexdump(stdout, "key:", key, key_len); |
| 8770 | |
| 8771 | return 0; |
| 8772 | } |
| 8773 | |
| 8774 | static int |
| 8775 | create_aead_operation(enum rte_crypto_aead_operation op, |
no test coverage detected