aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/pg
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2019-01-18 20:03:41 +0100
committerFlorin Coras <florin.coras@gmail.com>2019-01-18 23:18:00 +0000
commit64d557cd6723cc3a7ae3a0a68a52e220f8f2c7f1 (patch)
tree648b6990d16da26d0d8ed97b4c16c7b6d8fa0fb1 /src/vnet/pg
parent847d52882580378a5180e3d05a32249eef6da02e (diff)
Add vlib_buffer_copy_indices inline function
This reverts commit 1e59f9ddbdda14591967e1d66eab8623f9ba58e4. Change-Id: Iae1d372b887e170d28cac2fe4c61325ee5a5894a Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vnet/pg')
-rw-r--r--src/vnet/pg/input.c7
1 files changed, 3 insertions, 4 deletions
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)