+static void
+reserve_key_memory(struct l2fwd_crypto_options *options)
+{
+ options->cipher_xform.cipher.key.data = rte_malloc("crypto key",
+ MAX_KEY_SIZE, 0);
+ if (options->cipher_xform.cipher.key.data == NULL)
+ rte_exit(EXIT_FAILURE, "Failed to allocate memory for cipher key");
+
+
+ options->auth_xform.auth.key.data = rte_malloc("auth key",
+ MAX_KEY_SIZE, 0);
+ if (options->auth_xform.auth.key.data == NULL)
+ rte_exit(EXIT_FAILURE, "Failed to allocate memory for auth key");
+
+ options->iv.data = rte_malloc("iv", MAX_KEY_SIZE, 0);
+ if (options->iv.data == NULL)
+ rte_exit(EXIT_FAILURE, "Failed to allocate memory for IV");
+ options->iv.phys_addr = rte_malloc_virt2phy(options->iv.data);
+}
+