From 178cf493d009995b28fdf220f04c98860ff79a9b Mon Sep 17 00:00:00 2001 From: Dave Barach Date: Tue, 13 Nov 2018 16:34:13 -0500 Subject: Remove c-11 memcpy checks from perf-critical code Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach --- src/plugins/mactime/node.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/plugins/mactime') diff --git a/src/plugins/mactime/node.c b/src/plugins/mactime/node.c index 1d45a39e1ce..4d45dd54ef3 100644 --- a/src/plugins/mactime/node.c +++ b/src/plugins/mactime/node.c @@ -142,9 +142,9 @@ mactime_node_inline (vlib_main_t * vm, en0 = vlib_buffer_get_current (b0); kv.key = 0; if (is_tx) - clib_memcpy (&kv.key, en0->dst_address, 6); + clib_memcpy_fast (&kv.key, en0->dst_address, 6); else - clib_memcpy (&kv.key, en0->src_address, 6); + clib_memcpy_fast (&kv.key, en0->src_address, 6); /* Lookup the src/dst mac address */ if (clib_bihash_search_8_8 (lut, &kv, &kv) < 0) @@ -242,15 +242,16 @@ mactime_node_inline (vlib_main_t * vm, && (b0->flags & VLIB_BUFFER_IS_TRACED))) { mactime_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); - clib_memcpy (t->src_mac, en0->src_address, sizeof (t->src_mac)); + clib_memcpy_fast (t->src_mac, en0->src_address, + sizeof (t->src_mac)); t->next_index = next0; t->device_index = device_index0; if (dp) { - clib_memcpy (t->device_name, dp->device_name, - ARRAY_LEN (t->device_name)); + clib_memcpy_fast (t->device_name, dp->device_name, + ARRAY_LEN (t->device_name)); t->device_name[ARRAY_LEN (t->device_name) - 1] = 0; } } -- cgit 1.2.3-korg