diff options
author | Dave Barach <dave@barachs.net> | 2018-11-13 16:34:13 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-11-14 15:54:01 +0000 |
commit | 178cf493d009995b28fdf220f04c98860ff79a9b (patch) | |
tree | 097c1be82b8f6fa9bc04b9b1e193158e2e4997eb /src/plugins/stn/stn.c | |
parent | 6917b94f2146aa51195a6a2a1ccd8416a1d74bf3 (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/stn/stn.c')
-rw-r--r-- | src/plugins/stn/stn.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c index e3f56d38a15..6f5fbdb2866 100644 --- a/src/plugins/stn/stn.c +++ b/src/plugins/stn/stn.c @@ -141,9 +141,9 @@ stn_ip46_punt_fn (vlib_main_t * vm, vlib_buffer_advance(p0, -sizeof(*eth)); eth = (ethernet_header_t *) vlib_buffer_get_current(p0); if (is_ipv4) - clib_memcpy(eth, &stn_ip4_ethernet_header, sizeof(*eth)); + clib_memcpy_fast(eth, &stn_ip4_ethernet_header, sizeof(*eth)); else - clib_memcpy(eth, &stn_ip6_ethernet_header, sizeof(*eth)); + clib_memcpy_fast(eth, &stn_ip6_ethernet_header, sizeof(*eth)); } else { @@ -261,12 +261,12 @@ stn_init (vlib_main_t * vm) clib_bihash_init_16_8(&stn->rule_by_address_table, "stn addresses", 1024, 1<<20); - clib_memcpy(stn_ip4_ethernet_header.dst_address, stn_hw_addr_dst, 6); - clib_memcpy(stn_ip4_ethernet_header.src_address, stn_hw_addr_local, 6); + clib_memcpy_fast(stn_ip4_ethernet_header.dst_address, stn_hw_addr_dst, 6); + clib_memcpy_fast(stn_ip4_ethernet_header.src_address, stn_hw_addr_local, 6); stn_ip4_ethernet_header.type = clib_host_to_net_u16(ETHERNET_TYPE_IP4); - clib_memcpy(stn_ip6_ethernet_header.dst_address, stn_hw_addr_dst, 6); - clib_memcpy(stn_ip6_ethernet_header.src_address, stn_hw_addr_local, 6); + clib_memcpy_fast(stn_ip6_ethernet_header.dst_address, stn_hw_addr_dst, 6); + clib_memcpy_fast(stn_ip6_ethernet_header.src_address, stn_hw_addr_local, 6); stn_ip6_ethernet_header.type = clib_host_to_net_u16(ETHERNET_TYPE_IP6); return stn_api_init (vm, stn); |