summaryrefslogtreecommitdiffstats
path: root/src/vnet/session/transport.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/session/transport.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/session/transport.c')
-rw-r--r--src/vnet/session/transport.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/session/transport.c b/src/vnet/session/transport.c
index 06c541a9e2b..91b80d7c11e 100644
--- a/src/vnet/session/transport.c
+++ b/src/vnet/session/transport.c
@@ -319,7 +319,7 @@ transport_endpoint_mark_used (u8 proto, ip46_address_t * ip, u16 port)
transport_endpoint_t *tep;
clib_spinlock_lock_if_init (&local_endpoints_lock);
tep = transport_endpoint_new ();
- clib_memcpy (&tep->ip, ip, sizeof (*ip));
+ clib_memcpy_fast (&tep->ip, ip, sizeof (*ip));
tep->port = port;
transport_endpoint_table_add (&local_endpoints_table, proto, tep,
tep - local_endpoints);
@@ -388,7 +388,7 @@ transport_get_interface_ip (u32 sw_if_index, u8 is_ip4, ip46_address_t * addr)
return clib_error_return (0, "no routable ip6 addresses on %U",
format_vnet_sw_if_index_name,
vnet_get_main (), sw_if_index);
- clib_memcpy (&addr->ip6, ip6, sizeof (*ip6));
+ clib_memcpy_fast (&addr->ip6, ip6, sizeof (*ip6));
}
return 0;
}
@@ -404,7 +404,7 @@ transport_find_local_ip_for_remote (u32 sw_if_index,
if (sw_if_index == ENDPOINT_INVALID_INDEX)
{
/* Find a FIB path to the destination */
- clib_memcpy (&prefix.fp_addr, &rmt->ip, sizeof (rmt->ip));
+ clib_memcpy_fast (&prefix.fp_addr, &rmt->ip, sizeof (rmt->ip));
prefix.fp_proto = rmt->is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
prefix.fp_len = rmt->is_ip4 ? 32 : 128;
@@ -449,7 +449,8 @@ transport_alloc_local_endpoint (u8 proto, transport_endpoint_cfg_t * rmt_cfg,
else
{
/* Assume session layer vetted this address */
- clib_memcpy (lcl_addr, &rmt_cfg->peer.ip, sizeof (rmt_cfg->peer.ip));
+ clib_memcpy_fast (lcl_addr, &rmt_cfg->peer.ip,
+ sizeof (rmt_cfg->peer.ip));
}
/*