aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/l2/l2_vtr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/l2/l2_vtr.c')
-rw-r--r--src/vnet/l2/l2_vtr.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/vnet/l2/l2_vtr.c b/src/vnet/l2/l2_vtr.c
index 7096891381d..aa3d5c45bee 100644
--- a/src/vnet/l2/l2_vtr.c
+++ b/src/vnet/l2/l2_vtr.c
@@ -91,10 +91,10 @@ l2pbb_configure (vlib_main_t * vlib_main,
}
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 @@ l2pbb_get (vlib_main_t * vlib_main, vnet_main_t * vnet_main, u32 sw_if_index,
else if (in_config->push_bytes)
*vtr_op = L2_VTR_PUSH_2;
- clib_memcpy (&eth_hdr->dst_address, in_config->macs_tags.b_dst_address,
- sizeof (eth_hdr->dst_address));
- clib_memcpy (&eth_hdr->src_address, in_config->macs_tags.b_src_address,
- sizeof (eth_hdr->src_address));
+ clib_memcpy_fast (&eth_hdr->dst_address,
+ in_config->macs_tags.b_dst_address,
+ sizeof (eth_hdr->dst_address));
+ clib_memcpy_fast (&eth_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;