| 2609 | } |
| 2610 | |
| 2611 | static int |
| 2612 | create_wireless_algo_cipher_operation(const uint8_t *iv, uint8_t iv_len, |
| 2613 | unsigned int cipher_len, |
| 2614 | unsigned int cipher_offset) |
| 2615 | { |
| 2616 | struct crypto_testsuite_params *ts_params = &testsuite_params; |
| 2617 | struct crypto_unittest_params *ut_params = &unittest_params; |
| 2618 | |
| 2619 | /* Generate Crypto op data structure */ |
| 2620 | ut_params->op = rte_crypto_op_alloc(ts_params->op_mpool, |
| 2621 | RTE_CRYPTO_OP_TYPE_SYMMETRIC); |
| 2622 | TEST_ASSERT_NOT_NULL(ut_params->op, |
| 2623 | "Failed to allocate pktmbuf offload"); |
| 2624 | |
| 2625 | /* Set crypto operation data parameters */ |
| 2626 | rte_crypto_op_attach_sym_session(ut_params->op, ut_params->sess); |
| 2627 | |
| 2628 | struct rte_crypto_sym_op *sym_op = ut_params->op->sym; |
| 2629 | |
| 2630 | /* set crypto operation source mbuf */ |
| 2631 | sym_op->m_src = ut_params->ibuf; |
| 2632 | |
| 2633 | /* iv */ |
| 2634 | rte_memcpy(rte_crypto_op_ctod_offset(ut_params->op, uint8_t *, IV_OFFSET), |
| 2635 | iv, iv_len); |
| 2636 | sym_op->cipher.data.length = cipher_len; |
| 2637 | sym_op->cipher.data.offset = cipher_offset; |
| 2638 | return 0; |
| 2639 | } |
| 2640 | |
| 2641 | static int |
| 2642 | create_wireless_algo_cipher_operation_oop(const uint8_t *iv, uint8_t iv_len, |
no test coverage detected