Punt Infra
[vpp.git] / src / vnet / vxlan-gbp / decap.c
index 39dac41..c520e25 100644 (file)
@@ -16,7 +16,7 @@
  */
 
 #include <vlib/vlib.h>
-#include <vnet/pg/pg.h>
+
 #include <vnet/vxlan-gbp/vxlan_gbp.h>
 
 typedef struct
@@ -309,7 +309,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error0 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next0 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next0 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b0->error = node->errors[error0];
            }
@@ -342,7 +348,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error1 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next1 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next1 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b1->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b1->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b1->error = node->errors[error1];
            }
@@ -444,7 +456,13 @@ vxlan_gbp_input (vlib_main_t * vm,
              else
                {
                  error0 = VXLAN_GBP_ERROR_NO_SUCH_TUNNEL;
-                 next0 = VXLAN_GBP_INPUT_NEXT_NO_TUNNEL;
+                 next0 = VXLAN_GBP_INPUT_NEXT_PUNT;
+                 if (is_ip4)
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP4];
+                 else
+                   b0->punt_reason =
+                     vxm->punt_no_such_tunnel[FIB_PROTOCOL_IP6];
                }
              b0->error = node->errors[error0];
            }
@@ -549,7 +567,7 @@ typedef enum
   IP_VXLAN_GBP_BYPASS_NEXT_DROP,
   IP_VXLAN_GBP_BYPASS_NEXT_VXLAN_GBP,
   IP_VXLAN_GBP_BYPASS_N_NEXT,
-} ip_vxan_gbp_bypass_next_t;
+} ip_vxlan_gbp_bypass_next_t;
 
 always_inline uword
 ip_vxlan_gbp_bypass_inline (vlib_main_t * vm,