X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Fpipe%2Fpipe.c;h=89932a776681dab42195f15dac1c1bbacbb4d5ce;hb=154a903a958ee6459ae1019883e6c4796b4cafc7;hp=8b30f4705d65ee667ee4fa3c7cfe73963ec81588;hpb=b7b929931a07fbb27b43d5cd105f366c3e29807e;p=vpp.git diff --git a/src/vnet/devices/pipe/pipe.c b/src/vnet/devices/pipe/pipe.c index 8b30f4705d6..89932a77668 100644 --- a/src/vnet/devices/pipe/pipe.c +++ b/src/vnet/devices/pipe/pipe.c @@ -51,7 +51,7 @@ static pipe_main_t pipe_main; /* * The pipe rewrite is the same size as an ethernet header (since it * is an ethernet interface and the DP is optimised for writing - * sizeof(ethernet_header_t) rewirtes. Hwoever, there are no MAC addresses + * sizeof(ethernet_header_t) rewrites. Hwoever, there are no MAC addresses * since pipes don't have them. */ static u8 * @@ -131,16 +131,12 @@ pipe_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) { u32 n_left_from, n_left_to_next, n_copy, *from, *to_next; u32 next_index = VNET_PIPE_TX_NEXT_ETHERNET_INPUT; - u32 i, sw_if_index = 0; - u32 n_pkts = 0, n_bytes = 0; - u32 thread_index = vm->thread_index; - vnet_main_t *vnm = vnet_get_main (); - vnet_interface_main_t *im = &vnm->interface_main; + u32 i, sw_if_index = 0, n_pkts = 0, n_bytes = 0; vlib_buffer_t *b; pipe_t *pipe; n_left_from = frame->n_vectors; - from = vlib_frame_args (frame); + from = vlib_frame_vector_args (frame); while (n_left_from > 0) { @@ -148,7 +144,7 @@ pipe_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) n_copy = clib_min (n_left_from, n_left_to_next); - clib_memcpy (to_next, from, n_copy * sizeof (from[0])); + clib_memcpy_fast (to_next, from, n_copy * sizeof (from[0])); n_left_to_next -= n_copy; n_left_from -= n_copy; i = 0; @@ -169,12 +165,6 @@ pipe_tx (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) from += n_copy; vlib_put_next_frame (vm, node, next_index, n_left_to_next); - - /* increment TX interface stat */ - vlib_increment_combined_counter (im->combined_sw_if_counters + - VNET_INTERFACE_COUNTER_TX, - thread_index, sw_if_index, n_pkts, - n_bytes); } return n_left_from;