doc: doxygen documentation for vhost-user CLI Commmands (VPP-279)
[vpp.git] / vnet / vnet / ipsec / ipsec_if_in.c
index e557442..db75ab9 100644 (file)
 #include <vnet/ipsec/ipsec.h>
 #include <vnet/ipsec/esp.h>
 
+#if DPDK_CRYPTO==1
+#define ESP_NODE "dpdk-esp-decrypt"
+#else
+#define ESP_NODE "esp-decrypt"
+#endif
+
 /* Statistics (not really errors) */
 #define foreach_ipsec_if_input_error    \
 _(RX, "good packets received")
@@ -111,8 +117,9 @@ ipsec_if_input_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
            {
              ipsec_tunnel_if_t *t;
              t = pool_elt_at_index (im->tunnel_interfaces, p[0]);
-             vnet_buffer (b0)->output_features.ipsec_sad_index =
-               t->input_sa_index;
+             vnet_buffer (b0)->ipsec.sad_index = t->input_sa_index;
+             vnet_buffer (b0)->ipsec.flags =
+               t->hw_if_index == ~0 ? IPSEC_FLAG_IPSEC_GRE_TUNNEL : 0;
              vlib_buffer_advance (b0, ip4_header_bytes (ip0));
              next0 = IPSEC_IF_INPUT_NEXT_ESP_DECRYPT;
            }
@@ -152,8 +159,8 @@ VLIB_REGISTER_NODE (ipsec_if_input_node) = {
   .n_next_nodes = IPSEC_IF_INPUT_N_NEXT,
 
   .next_nodes = {
-        [IPSEC_IF_INPUT_NEXT_ESP_DECRYPT] = "esp-decrypt",
-        [IPSEC_IF_INPUT_NEXT_DROP] = "error-drop",
+       [IPSEC_IF_INPUT_NEXT_ESP_DECRYPT] = ESP_NODE,
+       [IPSEC_IF_INPUT_NEXT_DROP] = "error-drop",
   },
 };
 /* *INDENT-ON* */