MEMIF_TX_N_ERROR,
} memif_tx_func_error_t;
-static vl_counter_t memif_tx_func_error_counters[] = {
+static vlib_error_desc_t memif_tx_func_error_counters[] = {
#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_memif_tx_func_error
#undef _
MEMIF_INPUT_N_ERROR,
} memif_input_error_t;
-static vl_counter_t memif_input_error_counters[] = {
+static vlib_error_desc_t memif_input_error_counters[] = {
#define _(f, n, s, d) { #n, d, VL_COUNTER_SEVERITY_##s },
foreach_memif_input_error
#undef _
u8 *format_pnat_match_tuple(u8 *s, va_list *args) { return 0; }
u8 *format_pnat_rewrite_tuple(u8 *s, va_list *args) { return 0; }
-vl_counter_t pnat_error_counters[10];
+vlib_error_desc_t pnat_error_counters[10];
int ip4_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable) {
return 0;
write(' {}_N_ERROR\n'.format(csetname.upper()))
write('}} vl_counter_{}_enum_t;\n'.format(csetname))
- write('extern vl_counter_t {}_error_counters[];\n'.format(csetname))
+ write('extern vlib_error_desc_t {}_error_counters[];\n'.format(csetname))
def generate_include_types(s, module, stream):
for cnt in counters:
csetname = cnt.name
- write('vl_counter_t {}_error_counters[] = {{\n'.format(csetname))
+ write('vlib_error_desc_t {}_error_counters[] = {{\n'.format(csetname))
for c in cnt.block:
write(' {\n')
write(' .name = "{}",\n'.format(c['name']))
/* Reserves given number of error codes for given node. */
void
-vlib_register_errors (vlib_main_t * vm,
- u32 node_index, u32 n_errors, char *error_strings[],
- vl_counter_t counters[])
+vlib_register_errors (vlib_main_t *vm, u32 node_index, u32 n_errors,
+ char *error_strings[], vlib_error_desc_t counters[])
{
vlib_error_main_t *em = &vm->error_main;
vlib_node_main_t *nm = &vm->node_main;
char *name;
char *desc;
enum vl_counter_severity_e severity;
-} vl_counter_t;
+} vlib_error_desc_t;
typedef struct
{
/* Counter structures in heap. Heap index
indexes counter vector. */
- vl_counter_t *counters_heap;
+ vlib_error_desc_t *counters_heap;
} vlib_error_main_t;
/* Per node error registration. */
-void vlib_register_errors (struct vlib_main_t *vm,
- u32 node_index,
+void vlib_register_errors (struct vlib_main_t *vm, u32 node_index,
u32 n_errors, char *error_strings[],
- vl_counter_t counters[]);
+ vlib_error_desc_t counters[]);
unformat_function_t unformat_vlib_error;
/* Error strings indexed by error code for this node. */
char **error_strings;
- vl_counter_t *error_counters;
+ vlib_error_desc_t *error_counters;
/* Buffer format/unformat for this node. */
format_function_t *format_buffer;
u32 error_heap_index;
/* Counter structures indexed by counter code for this node. */
- vl_counter_t *error_counters;
+ vlib_error_desc_t *error_counters;
/* Vector of next node names.
Only used before next_nodes array is initialized. */
/* Error strings indexed by error code for this node. */
char **tx_function_error_strings;
- vl_counter_t *tx_function_error_counters;
+ vlib_error_desc_t *tx_function_error_counters;
/* Number of error codes used by this node. */
u32 tx_function_n_errors;