Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
buffers: remove unused code
[vpp.git]
/
src
/
vnet
/
devices
/
netmap
/
node.c
diff --git
a/src/vnet/devices/netmap/node.c
b/src/vnet/devices/netmap/node.c
index
67ddce5
..
577d4a3
100644
(file)
--- a/
src/vnet/devices/netmap/node.c
+++ b/
src/vnet/devices/netmap/node.c
@@
-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 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;
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;
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;
/* 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;
{
int i;
u32 n_rx_packets = 0;
- u32 thread_index = v
lib_get_thread_index ()
;
+ u32 thread_index = v
m->thread_index
;
netmap_main_t *nm = &netmap_main;
netmap_if_t *nmi;
netmap_main_t *nm = &netmap_main;
netmap_if_t *nmi;