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

Function reserve_key_memory

dpdk/examples/l2fwd-crypto/main.c:2699–2724  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2697}
2698
2699static void
2700reserve_key_memory(struct l2fwd_crypto_options *options)
2701{
2702 options->cipher_xform.cipher.key.data = options->cipher_key;
2703
2704 options->auth_xform.auth.key.data = options->auth_key;
2705
2706 options->aead_xform.aead.key.data = options->aead_key;
2707
2708 options->cipher_iv.data = rte_malloc("cipher iv", MAX_KEY_SIZE, 0);
2709 if (options->cipher_iv.data == NULL)
2710 rte_exit(EXIT_FAILURE, "Failed to allocate memory for cipher IV");
2711
2712 options->auth_iv.data = rte_malloc("auth iv", MAX_KEY_SIZE, 0);
2713 if (options->auth_iv.data == NULL)
2714 rte_exit(EXIT_FAILURE, "Failed to allocate memory for auth IV");
2715
2716 options->aead_iv.data = rte_malloc("aead_iv", MAX_KEY_SIZE, 0);
2717 if (options->aead_iv.data == NULL)
2718 rte_exit(EXIT_FAILURE, "Failed to allocate memory for AEAD iv");
2719
2720 options->aad.data = rte_malloc("aad", MAX_KEY_SIZE, 0);
2721 if (options->aad.data == NULL)
2722 rte_exit(EXIT_FAILURE, "Failed to allocate memory for AAD");
2723 options->aad.phys_addr = rte_malloc_virt2iova(options->aad.data);
2724}
2725
2726static void
2727raise_signal(int signum)

Callers 1

mainFunction · 0.85

Calls 3

rte_mallocFunction · 0.85
rte_exitFunction · 0.85
rte_malloc_virt2iovaFunction · 0.85

Tested by

no test coverage detected