aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2020-01-09 04:20:57 -0500
committerNeale Ranns <nranns@cisco.com>2020-01-09 21:38:40 +0000
commitd3d7ef5ec828ec895c6f90090118782e497b9084 (patch)
tree18167876bc8a6fc6fc4efe8c8bc876341fc0c51e /src
parent87b0c892947006cbfa80fd2af15e8edb4029f327 (diff)
fib: leverage well-optimized clib_memcpy
Type: fix Change-Id: I684910837ca4d9c8a07262459158bbb0423a33af Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/fib/fib_api.c8
-rw-r--r--src/vnet/fib/fib_path.c2
-rw-r--r--src/vnet/fib/fib_types.c2
3 files changed, 6 insertions, 6 deletions
diff --git a/src/vnet/fib/fib_api.c b/src/vnet/fib/fib_api.c
index e020b26fd6e..856271f0bc6 100644
--- a/src/vnet/fib/fib_api.c
+++ b/src/vnet/fib/fib_api.c
@@ -75,9 +75,9 @@ fib_api_next_hop_decode (const vl_api_fib_path_t *in,
ip46_address_t *out)
{
if (in->proto == FIB_API_PATH_NH_PROTO_IP4)
- memcpy (&out->ip4, &in->nh.address.ip4, sizeof (out->ip4));
+ clib_memcpy (&out->ip4, &in->nh.address.ip4, sizeof (out->ip4));
else if (in->proto == FIB_API_PATH_NH_PROTO_IP6)
- memcpy (&out->ip6, &in->nh.address.ip6, sizeof (out->ip6));
+ clib_memcpy (&out->ip6, &in->nh.address.ip6, sizeof (out->ip6));
}
static vl_api_fib_path_nh_proto_t
@@ -110,11 +110,11 @@ fib_api_next_hop_encode (const fib_route_path_t *rpath,
fp->proto = fib_api_path_dpo_proto_to_nh(rpath->frp_proto);
if (rpath->frp_proto == DPO_PROTO_IP4)
- memcpy (&fp->nh.address.ip4,
+ clib_memcpy (&fp->nh.address.ip4,
&rpath->frp_addr.ip4,
sizeof (rpath->frp_addr.ip4));
else if (rpath->frp_proto == DPO_PROTO_IP6)
- memcpy (&fp->nh.address.ip6,
+ clib_memcpy (&fp->nh.address.ip6,
&rpath->frp_addr.ip6,
sizeof (rpath->frp_addr.ip6));
}
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index ef5d58c9e2b..c8a2a09cbff 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -1488,7 +1488,7 @@ fib_path_copy (fib_node_index_t path_index,
orig_path = fib_path_get(path_index);
ASSERT(NULL != orig_path);
- memcpy(path, orig_path, sizeof(*path));
+ clib_memcpy(path, orig_path, sizeof(*path));
FIB_PATH_DBG(path, "create-copy:%d", path_index);
diff --git a/src/vnet/fib/fib_types.c b/src/vnet/fib/fib_types.c
index c859913eeff..38f7926e350 100644
--- a/src/vnet/fib/fib_types.c
+++ b/src/vnet/fib/fib_types.c
@@ -106,7 +106,7 @@ void
fib_prefix_copy (fib_prefix_t *dst,
const fib_prefix_t *src)
{
- memcpy(dst, src, sizeof(*dst));
+ clib_memcpy(dst, src, sizeof(*dst));
}
int