summaryrefslogtreecommitdiffstats
path: root/src/vnet/vxlan-gbp/decap.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2018-09-28 15:16:14 +0000
committerDamjan Marion <dmarion@me.com>2019-03-28 20:51:32 +0000
commit76b5649d074ab198cbf5737ac76d21649a61bffd (patch)
treebb856c9638cb63ead6c00837daad01373551b4e1 /src/vnet/vxlan-gbp/decap.c
parent1f4e1cbf576fc6ab4e871ba0603028112074b43b (diff)
Punt Infra
A punt/exception path that provides: 1) clients that use the infra 2) clients can create punt reasons 3) clients can register to recieve packets that are punted for a given reason to be sent to the desired node. 4) nodes which punt packets fill in the {reason,protocol} of the buffere (in the meta-data) and send to the new node "punt-dispatch" 5) punt-dispatch sends packets to the registered nodes or drops Change-Id: Ia4f144337f1387cbe585b4f375d0842aefffcde5 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/vxlan-gbp/decap.c')
-rw-r--r--src/vnet/vxlan-gbp/decap.c26
1 files changed, 22 insertions, 4 deletions
diff --git a/src/vnet/vxlan-gbp/decap.c b/src/vnet/vxlan-gbp/decap.c
index 7dc8d250f10..c520e25dcf2 100644
--- a/src/vnet/vxlan-gbp/decap.c
+++ b/src/vnet/vxlan-gbp/decap.c
@@ -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];
}