| 2697 | } |
| 2698 | |
| 2699 | static void |
| 2700 | reserve_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 | |
| 2726 | static void |
| 2727 | raise_signal(int signum) |
no test coverage detected