Remove c-11 memcpy checks from perf-critical code
Change-Id: Id4f37f5d4a03160572954a416efa1ef9b3d79ad1
Signed-off-by: Dave Barach <dave@barachs.net>
diff --git a/src/vnet/l2/l2_vtr.c b/src/vnet/l2/l2_vtr.c
index 7096891..aa3d5c4 100644
--- a/src/vnet/l2/l2_vtr.c
+++ b/src/vnet/l2/l2_vtr.c
@@ -91,10 +91,10 @@
}
else if (vtr_op == L2_VTR_PUSH_2)
{
- clib_memcpy (in_config->macs_tags.b_dst_address, b_dmac,
- sizeof (in_config->macs_tags.b_dst_address));
- clib_memcpy (in_config->macs_tags.b_src_address, b_smac,
- sizeof (in_config->macs_tags.b_src_address));
+ clib_memcpy_fast (in_config->macs_tags.b_dst_address, b_dmac,
+ sizeof (in_config->macs_tags.b_dst_address));
+ clib_memcpy_fast (in_config->macs_tags.b_src_address, b_smac,
+ sizeof (in_config->macs_tags.b_src_address));
in_config->macs_tags.b_type =
clib_net_to_host_u16 (ETHERNET_TYPE_DOT1AD);
in_config->macs_tags.priority_dei_id =
@@ -726,10 +726,12 @@
else if (in_config->push_bytes)
*vtr_op = L2_VTR_PUSH_2;
- clib_memcpy (ð_hdr->dst_address, in_config->macs_tags.b_dst_address,
- sizeof (eth_hdr->dst_address));
- clib_memcpy (ð_hdr->src_address, in_config->macs_tags.b_src_address,
- sizeof (eth_hdr->src_address));
+ clib_memcpy_fast (ð_hdr->dst_address,
+ in_config->macs_tags.b_dst_address,
+ sizeof (eth_hdr->dst_address));
+ clib_memcpy_fast (ð_hdr->src_address,
+ in_config->macs_tags.b_src_address,
+ sizeof (eth_hdr->src_address));
*b_vlanid =
clib_host_to_net_u16 (in_config->macs_tags.priority_dei_id) & 0xFFF;