summaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_api.c
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/vnet/fib/fib_api.c
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/vnet/fib/fib_api.c')
-rw-r--r--src/vnet/fib/fib_api.c8
1 files changed, 4 insertions, 4 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));
}