u32 frame_num = apif->rx_req->tp_frame_nr;
u8 *block_start = apif->rx_ring + block * block_size;
uword n_trace = vlib_get_trace_count (vm, node);
- u32 thread_index = vlib_get_thread_index ();
+ u32 thread_index = vm->thread_index;
u32 n_buffer_bytes = vlib_buffer_free_list_buffer_size (vm,
VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
u32 min_bufs = apif->rx_req->tp_frame_size / n_buffer_bytes;
{
if (PREDICT_TRUE (offset == 0))
{
- clib_memcpy (vlib_buffer_get_current (b0),
- (u8 *) tph + tph->tp_mac,
- sizeof (ethernet_header_t));
+ clib_memcpy_fast (vlib_buffer_get_current (b0),
+ (u8 *) tph + tph->tp_mac,
+ sizeof (ethernet_header_t));
ethernet_header_t *eth = vlib_buffer_get_current (b0);
ethernet_vlan_header_t *vlan =
(ethernet_vlan_header_t *) (eth + 1);
bytes_copied = sizeof (ethernet_header_t);
}
}
- clib_memcpy (((u8 *) vlib_buffer_get_current (b0)) +
- bytes_copied + vlan_len,
- (u8 *) tph + tph->tp_mac + offset + bytes_copied,
- (bytes_to_copy - bytes_copied));
+ clib_memcpy_fast (((u8 *) vlib_buffer_get_current (b0)) +
+ bytes_copied + vlan_len,
+ (u8 *) tph + tph->tp_mac + offset +
+ bytes_copied, (bytes_to_copy - bytes_copied));
/* fill buffer header */
b0->current_length = bytes_to_copy + vlan_len;
tr = vlib_add_trace (vm, node, first_b0, sizeof (*tr));
tr->next_index = next0;
tr->hw_if_index = apif->hw_if_index;
- clib_memcpy (&tr->tph, tph, sizeof (struct tpacket2_hdr));
+ clib_memcpy_fast (&tr->tph, tph, sizeof (struct tpacket2_hdr));
}
/* enque and take next packet */