aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/mactime/node.c
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-11-13 16:34:13 -0500
committerFlorin Coras <florin.coras@gmail.com>2018-11-14 15:54:01 +0000
commit178cf493d009995b28fdf220f04c98860ff79a9b (patch)
tree097c1be82b8f6fa9bc04b9b1e193158e2e4997eb /src/plugins/mactime/node.c
parent6917b94f2146aa51195a6a2a1ccd8416a1d74bf3 (diff)
Remove c-11 memcpy checks from perf-critical code
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1 Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'src/plugins/mactime/node.c')
-rw-r--r--src/plugins/mactime/node.c11
1 files changed, 6 insertions, 5 deletions
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;
}
}