From 8269d3dbe70adaae60806d5d84e35f25d23193c5 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Tue, 30 Jan 2018 09:02:20 -0800 Subject: Improved tracing for the IP[46] not-enabled case. now we get 00:00:03:665501: pg-input ... 00:00:03:665681: ethernet-input ... 00:00:03:665691: ip6-input UDP: 2001::1 -> ffef::1 tos 0x00, flow label 0x0, hop limit 64, payload length 108 UDP: 1234 -> 1234 length 108, checksum 0x7b25 00:00:03:665695: ip6-not-enabled UDP: 2001::1 -> ffef::1 tos 0x00, flow label 0x0, hop limit 64, payload length 108 UDP: 1234 -> 1234 length 108, checksum 0x7b25 00:00:03:665706: error-drop ethernet-input: no error Same goes for IPv4 Change-Id: Ia360df39b43281d3a0aa1b686f04b73cfa37c546 Signed-off-by: Neale Ranns --- src/vnet/ip/ip4_punt_drop.c | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'src/vnet/ip/ip4_punt_drop.c') diff --git a/src/vnet/ip/ip4_punt_drop.c b/src/vnet/ip/ip4_punt_drop.c index 4e74963f742..3600d7cb9d3 100644 --- a/src/vnet/ip/ip4_punt_drop.c +++ b/src/vnet/ip/ip4_punt_drop.c @@ -28,7 +28,7 @@ VNET_FEATURE_ARC_INIT (ip4_punt) = VNET_FEATURE_ARC_INIT (ip4_drop) = { .arc_name = "ip4-drop", - .start_nodes = VNET_FEATURES ("ip4-drop"), + .start_nodes = VNET_FEATURES ("ip4-drop", "ip4-not-enabled"), }; /* *INDENT-ON* */ @@ -186,6 +186,17 @@ ip4_drop (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) } +static uword +ip4_not_enabled (vlib_main_t * vm, + vlib_node_runtime_t * node, vlib_frame_t * frame) +{ + if (node->flags & VLIB_NODE_FLAG_TRACE) + ip4_forward_next_trace (vm, node, frame, VLIB_TX); + + return ip_drop_or_punt (vm, node, frame, + vnet_feat_arc_ip4_drop.feature_arc_index); +} + static uword ip4_punt (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { @@ -211,6 +222,20 @@ VLIB_REGISTER_NODE (ip4_drop_node, static) = VLIB_NODE_FUNCTION_MULTIARCH (ip4_drop_node, ip4_drop); +VLIB_REGISTER_NODE (ip4_not_enabled_node, static) = +{ + .function = ip4_not_enabled, + .name = "ip4-not-enabled", + .vector_size = sizeof (u32), + .format_trace = format_ip4_forward_next_trace, + .n_next_nodes = 1, + .next_nodes = { + [0] = "error-drop", + }, +}; + +VLIB_NODE_FUNCTION_MULTIARCH (ip4_not_enabled_node, ip4_not_enabled); + VLIB_REGISTER_NODE (ip4_punt_node, static) = { .function = ip4_punt, -- cgit 1.2.3-korg