summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/reass/ip4_full_reass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/ip/reass/ip4_full_reass.c')
-rw-r--r--src/vnet/ip/reass/ip4_full_reass.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/vnet/ip/reass/ip4_full_reass.c b/src/vnet/ip/reass/ip4_full_reass.c
index d2069c0876c..79f4673a7f5 100644
--- a/src/vnet/ip/reass/ip4_full_reass.c
+++ b/src/vnet/ip/reass/ip4_full_reass.c
@@ -1172,6 +1172,7 @@ ip4_full_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
else if (reass)
{
u32 handoff_thread_idx;
+ u32 counter = ~0;
switch (ip4_full_reass_update
(vm, node, rm, rt, reass, &bi0, &next0,
&error0, CUSTOM == type, &handoff_thread_idx))
@@ -1186,29 +1187,23 @@ ip4_full_reass_inline (vlib_main_t * vm, vlib_node_runtime_t * node,
handoff_thread_idx;
break;
case IP4_REASS_RC_TOO_MANY_FRAGMENTS:
- vlib_node_increment_counter (vm, node->node_index,
- IP4_ERROR_REASS_FRAGMENT_CHAIN_TOO_LONG,
- 1);
- ip4_full_reass_drop_all (vm, node, reass);
- ip4_full_reass_free (rm, rt, reass);
- goto next_packet;
+ counter = IP4_ERROR_REASS_FRAGMENT_CHAIN_TOO_LONG;
break;
case IP4_REASS_RC_NO_BUF:
- vlib_node_increment_counter (vm, node->node_index,
- IP4_ERROR_REASS_NO_BUF, 1);
- ip4_full_reass_drop_all (vm, node, reass);
- ip4_full_reass_free (rm, rt, reass);
- goto next_packet;
+ counter = IP4_ERROR_REASS_NO_BUF;
break;
case IP4_REASS_RC_INTERNAL_ERROR:
- /* drop everything and start with a clean slate */
- vlib_node_increment_counter (vm, node->node_index,
- IP4_ERROR_REASS_INTERNAL_ERROR,
+ counter = IP4_ERROR_REASS_INTERNAL_ERROR;
+ break;
+ }
+
+ if (~0 != counter)
+ {
+ vlib_node_increment_counter (vm, node->node_index, counter,
1);
ip4_full_reass_drop_all (vm, node, reass);
ip4_full_reass_free (rm, rt, reass);
goto next_packet;
- break;
}
}
else