X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fdevices%2Fnetmap%2Fnode.c;h=577d4a394b228395f1420d85f3000397b0fa8fdb;hb=671e60e65635b8d030bf303c88411192c747b59e;hp=e120eeaeabde6788f43e15b0a768b88d22b863a2;hpb=586afd762bfa149f5ca167bd5fd5a0cd59ce94fe;p=vpp.git diff --git a/src/vnet/devices/netmap/node.c b/src/vnet/devices/netmap/node.c index e120eeaeabd..577d4a394b2 100644 --- a/src/vnet/devices/netmap/node.c +++ b/src/vnet/devices/netmap/node.c @@ -57,7 +57,7 @@ format_netmap_input_trace (u8 * s, va_list * args) CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *); CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *); netmap_input_trace_t *t = va_arg (*args, netmap_input_trace_t *); - uword indent = format_get_indent (s); + u32 indent = format_get_indent (s); s = format (s, "netmap: hw_if_index %d next-index %d", t->hw_if_index, t->next_index); @@ -98,9 +98,8 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, u32 n_free_bufs; struct netmap_ring *ring; int cur_ring; - u32 thread_index = vlib_get_thread_index (); - u32 n_buffer_bytes = vlib_buffer_free_list_buffer_size (vm, - VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX); + u32 thread_index = vm->thread_index; + u32 n_buffer_bytes = VLIB_BUFFER_DATA_SIZE; if (nif->per_interface_next_index != ~0) next_index = nif->per_interface_next_index; @@ -174,10 +173,9 @@ netmap_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, u32 bytes_to_copy = data_len > n_buffer_bytes ? n_buffer_bytes : data_len; b0->current_data = 0; - clib_memcpy (vlib_buffer_get_current (b0), - (u8 *) NETMAP_BUF (ring, - slot->buf_idx) + offset, - bytes_to_copy); + clib_memcpy_fast (vlib_buffer_get_current (b0), + (u8 *) NETMAP_BUF (ring, slot->buf_idx) + + offset, bytes_to_copy); /* fill buffer header */ b0->current_length = bytes_to_copy; @@ -260,7 +258,7 @@ netmap_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, { int i; u32 n_rx_packets = 0; - u32 thread_index = vlib_get_thread_index (); + u32 thread_index = vm->thread_index; netmap_main_t *nm = &netmap_main; netmap_if_t *nmi;