#include <vnet/ip/ip.h>
#include <vnet/classify/policer_classify.h>
#include <vnet/classify/vnet_classify.h>
+#include <vnet/l2/feat_bitmap.h>
+#include <vnet/l2/l2_input.h>
/* Dispatch functions meant to be instantiated elsewhere */
#define foreach_policer_classify_error \
_(MISS, "Policer classify misses") \
_(HIT, "Policer classify hits") \
-_(CHAIN_HIT, "Polcier classify hits after chain walk") \
+_(CHAIN_HIT, "Policer classify hits after chain walk") \
_(DROP, "Policer classify action drop")
typedef enum
u32 hits = 0;
u32 misses = 0;
u32 chain_hits = 0;
- u32 drop = 0;
u32 n_next_nodes;
u64 time_in_policer_periods;
{
next0 = POLICER_CLASSIFY_NEXT_INDEX_DROP;
b0->error = node->errors[POLICER_CLASSIFY_ERROR_DROP];
- drop++;
}
hits++;
}
next0 = POLICER_CLASSIFY_NEXT_INDEX_DROP;
b0->error =
node->errors[POLICER_CLASSIFY_ERROR_DROP];
- drop++;
}
hits++;
chain_hits++;
POLICER_CLASSIFY_ERROR_HIT, hits);
vlib_node_increment_counter (vm, node->node_index,
POLICER_CLASSIFY_ERROR_CHAIN_HIT, chain_hits);
- vlib_node_increment_counter (vm, node->node_index,
- POLICER_CLASSIFY_ERROR_DROP, drop);
return frame->n_vectors;
}