summaryrefslogtreecommitdiffstats
path: root/src/vnet/ip/ip.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/vnet/ip/ip.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/vnet/ip/ip.c')
-rw-r--r--src/vnet/ip/ip.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/vnet/ip/ip.c b/src/vnet/ip/ip.c
index 144bbcc405d..cab0cd0315a 100644
--- a/src/vnet/ip/ip.c
+++ b/src/vnet/ip/ip.c
@@ -70,7 +70,7 @@ ip_is_local (u32 fib_index, ip46_address_t * ip46_address, u8 is_ip4)
prefix.fp_proto = FIB_PROTOCOL_IP6;
}
- clib_memcpy (&prefix.fp_addr, ip46_address, sizeof (ip46_address_t));
+ clib_memcpy_fast (&prefix.fp_addr, ip46_address, sizeof (ip46_address_t));
fei = fib_table_lookup (fib_index, &prefix);
flags = fib_entry_get_flags (fei);
@@ -83,7 +83,7 @@ ip_copy (ip46_address_t * dst, ip46_address_t * src, u8 is_ip4)
if (is_ip4)
dst->ip4.as_u32 = src->ip4.as_u32;
else
- clib_memcpy (&dst->ip6, &src->ip6, sizeof (ip6_address_t));
+ clib_memcpy_fast (&dst->ip6, &src->ip6, sizeof (ip6_address_t));
}
void
@@ -92,7 +92,8 @@ ip_set (ip46_address_t * dst, void *src, u8 is_ip4)
if (is_ip4)
dst->ip4.as_u32 = ((ip4_address_t *) src)->as_u32;
else
- clib_memcpy (&dst->ip6, (ip6_address_t *) src, sizeof (ip6_address_t));
+ clib_memcpy_fast (&dst->ip6, (ip6_address_t *) src,
+ sizeof (ip6_address_t));
}
u8