diff options
author | Dave Barach <dave@barachs.net> | 2019-01-24 15:12:53 -0500 |
---|---|---|
committer | Dave Barach <dave@barachs.net> | 2019-01-24 15:14:15 -0500 |
commit | 8704097b9bd1e2ca717116fa1e7d61b4736c3fbd (patch) | |
tree | d5dca764970d47bc4e4c4dd34ef22d9f630ef3af | |
parent | 8e4a89bf42196308601de7544abe554df7b0df45 (diff) |
move misc-drop-errors to vnet
thanks, Eliot...
Change-Id: I8d8fee09bf1fe24933e6ef4e126dba8e22fe62b1
Signed-off-by: Dave Barach <dave@barachs.net>
-rw-r--r-- | src/vlib/error.c | 31 | ||||
-rw-r--r-- | src/vnet/interface_output.c | 31 |
2 files changed, 31 insertions, 31 deletions
diff --git a/src/vlib/error.c b/src/vlib/error.c index 691e6396d97..a416649cfa7 100644 --- a/src/vlib/error.c +++ b/src/vlib/error.c @@ -109,37 +109,6 @@ vlib_error_drop_buffers (vlib_main_t * vm, return n_buffers; } -/* Convenience node to drop a vector of buffers with a "misc error". */ -static uword -misc_drop_buffers (vlib_main_t * vm, - vlib_node_runtime_t * node, vlib_frame_t * frame) -{ - return vlib_error_drop_buffers (vm, node, vlib_frame_vector_args (frame), - /* buffer stride */ 1, - frame->n_vectors, - /* next */ 0, - node->node_index, - /* error */ 0); -} - -static char *misc_drop_buffers_error_strings[] = { - [0] = "misc. errors", -}; - -/* *INDENT-OFF* */ -VLIB_REGISTER_NODE (misc_drop_buffers_node,static) = { - .function = misc_drop_buffers, - .name = "misc-drop-buffers", - .vector_size = sizeof (u32), - .n_errors = 1, - .n_next_nodes = 1, - .next_nodes = { - "error-drop", - }, - .error_strings = misc_drop_buffers_error_strings, -}; -/* *INDENT-ON* */ - void vlib_stats_register_error_index (u8 *, u64 *, u64) __attribute__ ((weak)); void diff --git a/src/vnet/interface_output.c b/src/vnet/interface_output.c index ba69d36b6c4..e814efa608a 100644 --- a/src/vnet/interface_output.c +++ b/src/vnet/interface_output.c @@ -1019,6 +1019,37 @@ VLIB_REGISTER_NODE (vnet_per_buffer_interface_output_node,static) = { }; /* *INDENT-ON* */ +/* Convenience node to drop a vector of buffers with a "misc error". */ +static uword +misc_drop_buffers (vlib_main_t * vm, + vlib_node_runtime_t * node, vlib_frame_t * frame) +{ + return vlib_error_drop_buffers (vm, node, vlib_frame_vector_args (frame), + /* buffer stride */ 1, + frame->n_vectors, + /* next */ 0, + node->node_index, + /* error */ 0); +} + +static char *misc_drop_buffers_error_strings[] = { + [0] = "misc. errors", +}; + +/* *INDENT-OFF* */ +VLIB_REGISTER_NODE (misc_drop_buffers_node,static) = { + .function = misc_drop_buffers, + .name = "misc-drop-buffers", + .vector_size = sizeof (u32), + .n_errors = 1, + .n_next_nodes = 1, + .next_nodes = { + "error-drop", + }, + .error_strings = misc_drop_buffers_error_strings, +}; +/* *INDENT-ON* */ + VLIB_NODE_FUNCTION_MULTIARCH (vnet_per_buffer_interface_output_node, vnet_per_buffer_interface_output); |