From 64d557cd6723cc3a7ae3a0a68a52e220f8f2c7f1 Mon Sep 17 00:00:00 2001 From: Damjan Marion Date: Fri, 18 Jan 2019 20:03:41 +0100 Subject: Add vlib_buffer_copy_indices inline function This reverts commit 1e59f9ddbdda14591967e1d66eab8623f9ba58e4. Change-Id: Iae1d372b887e170d28cac2fe4c61325ee5a5894a Signed-off-by: Damjan Marion --- src/vnet/pg/input.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/vnet/pg') diff --git a/src/vnet/pg/input.c b/src/vnet/pg/input.c index 792c67cd88d..6088b91271e 100644 --- a/src/vnet/pg/input.c +++ b/src/vnet/pg/input.c @@ -1590,13 +1590,12 @@ pg_generate_packets (vlib_node_runtime_t * node, head = clib_fifo_head (bi0->buffer_fifo); if (head + n_this_frame <= end) - clib_memcpy_fast (to_next, head, n_this_frame * sizeof (u32)); + vlib_buffer_copy_indices (to_next, head, n_this_frame); else { u32 n = end - head; - clib_memcpy_fast (to_next + 0, head, n * sizeof (u32)); - clib_memcpy_fast (to_next + n, start, - (n_this_frame - n) * sizeof (u32)); + vlib_buffer_copy_indices (to_next + 0, head, n); + vlib_buffer_copy_indices (to_next + n, start, n_this_frame - n); } if (s->replay_packet_templates == 0) -- cgit 1.2.3-korg