MCPcopy Create free account
hub / github.com/F-Stack/f-stack / create_wireless_algo_cipher_operation

Function create_wireless_algo_cipher_operation

dpdk/app/test/test_cryptodev.c:2611–2639  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2609}
2610
2611static int
2612create_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
2641static int
2642create_wireless_algo_cipher_operation_oop(const uint8_t *iv, uint8_t iv_len,

Callers 7

test_kasumi_encryptionFunction · 0.85
test_kasumi_decryptionFunction · 0.85
test_snow3g_encryptionFunction · 0.85
test_snow3g_decryptionFunction · 0.85
test_zuc_cipherFunction · 0.85
test_zuc_cipher_sglFunction · 0.85

Calls 3

rte_crypto_op_allocFunction · 0.85
rte_memcpyFunction · 0.50

Tested by

no test coverage detected