summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/nat')
-rwxr-xr-xsrc/plugins/nat/in2out.c11
-rw-r--r--src/plugins/nat/in2out_ed.c11
-rw-r--r--src/plugins/nat/nat44_classify.c11
-rw-r--r--src/plugins/nat/nat64.c4
-rw-r--r--src/plugins/nat/nat64_in2out.c11
-rw-r--r--src/plugins/nat/nat64_out2in.c11
-rw-r--r--src/plugins/nat/nat_inlines.h2
-rw-r--r--src/plugins/nat/nat_ipfix_logging.c108
-rwxr-xr-xsrc/plugins/nat/out2in.c11
-rw-r--r--src/plugins/nat/out2in_ed.c11
10 files changed, 92 insertions, 99 deletions
diff --git a/src/plugins/nat/in2out.c b/src/plugins/nat/in2out.c
index cb169814eac..d4432d98016 100755
--- a/src/plugins/nat/in2out.c
+++ b/src/plugins/nat/in2out.c
@@ -1891,17 +1891,16 @@ nat44_in2out_reass_node_fn (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/in2out_ed.c b/src/plugins/nat/in2out_ed.c
index f9f8d776eb4..e32e1386d8d 100644
--- a/src/plugins/nat/in2out_ed.c
+++ b/src/plugins/nat/in2out_ed.c
@@ -2002,17 +2002,16 @@ nat44_ed_in2out_reass_node_fn_inline (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/nat44_classify.c b/src/plugins/nat/nat44_classify.c
index 0e9863c02ac..8608fc532e2 100644
--- a/src/plugins/nat/nat44_classify.c
+++ b/src/plugins/nat/nat44_classify.c
@@ -374,17 +374,16 @@ nat44_classify_node_fn_inline (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/nat64.c b/src/plugins/nat/nat64.c
index 86c65edfbee..8bcca2b33d3 100644
--- a/src/plugins/nat/nat64.c
+++ b/src/plugins/nat/nat64.c
@@ -1018,7 +1018,7 @@ nat64_compose_ip6 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index)
if (prefix)
{
- clib_memcpy (ip6, &p->prefix, sizeof (ip6_address_t));
+ clib_memcpy_fast (ip6, &p->prefix, sizeof (ip6_address_t));
switch (p->plen)
{
case 32:
@@ -1058,7 +1058,7 @@ nat64_compose_ip6 (ip6_address_t * ip6, ip4_address_t * ip4, u32 fib_index)
}
else
{
- clib_memcpy (ip6, well_known_prefix, sizeof (ip6_address_t));
+ clib_memcpy_fast (ip6, well_known_prefix, sizeof (ip6_address_t));
ip6->as_u32[3] = ip4->as_u32;
}
}
diff --git a/src/plugins/nat/nat64_in2out.c b/src/plugins/nat/nat64_in2out.c
index d19aab87983..0652f4481bc 100644
--- a/src/plugins/nat/nat64_in2out.c
+++ b/src/plugins/nat/nat64_in2out.c
@@ -1559,17 +1559,16 @@ nat64_in2out_reass_node_fn (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/nat64_out2in.c b/src/plugins/nat/nat64_out2in.c
index 79ff161b326..1c8df8a16db 100644
--- a/src/plugins/nat/nat64_out2in.c
+++ b/src/plugins/nat/nat64_out2in.c
@@ -842,17 +842,16 @@ nat64_out2in_reass_node_fn (vlib_main_t * vm, vlib_node_runtime_t * node,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/nat_inlines.h b/src/plugins/nat/nat_inlines.h
index 4bdb2cb66d9..c0f16721173 100644
--- a/src/plugins/nat/nat_inlines.h
+++ b/src/plugins/nat/nat_inlines.h
@@ -371,7 +371,7 @@ mss_clamping (snat_main_t * sm, tcp_header_t * tcp, ip_csum_t * sum)
*sum =
ip_csum_update (*sum, mss, sm->mss_value_net, ip4_header_t,
length);
- clib_memcpy (data + 2, &sm->mss_value_net, 2);
+ clib_memcpy_fast (data + 2, &sm->mss_value_net, 2);
}
return;
}
diff --git a/src/plugins/nat/nat_ipfix_logging.c b/src/plugins/nat/nat_ipfix_logging.c
index 8a3668e2759..042239fee85 100644
--- a/src/plugins/nat/nat_ipfix_logging.c
+++ b/src/plugins/nat/nat_ipfix_logging.c
@@ -674,28 +674,28 @@ snat_ipfix_logging_nat44_ses (u8 nat_event, u32 src_ip, u32 nat_src_ip,
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &src_ip, sizeof (src_ip));
+ clib_memcpy_fast (b0->data + offset, &src_ip, sizeof (src_ip));
offset += sizeof (src_ip);
- clib_memcpy (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
+ clib_memcpy_fast (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
offset += sizeof (nat_src_ip);
- clib_memcpy (b0->data + offset, &proto, sizeof (proto));
+ clib_memcpy_fast (b0->data + offset, &proto, sizeof (proto));
offset += sizeof (proto);
- clib_memcpy (b0->data + offset, &src_port, sizeof (src_port));
+ clib_memcpy_fast (b0->data + offset, &src_port, sizeof (src_port));
offset += sizeof (src_port);
- clib_memcpy (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
+ clib_memcpy_fast (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
offset += sizeof (nat_src_port);
- clib_memcpy (b0->data + offset, &vrf_id, sizeof (vrf_id));
+ clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);
b0->current_length += NAT44_SESSION_CREATE_LEN;
@@ -775,13 +775,13 @@ snat_ipfix_logging_addr_exhausted (u32 pool_id, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &pool_id, sizeof (pool_id));
+ clib_memcpy_fast (b0->data + offset, &pool_id, sizeof (pool_id));
offset += sizeof (pool_id);
b0->current_length += NAT_ADDRESSES_EXHAUTED_LEN;
@@ -862,19 +862,19 @@ snat_ipfix_logging_max_entries_per_usr (u32 limit, u32 src_ip, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &quota_event, sizeof (quota_event));
+ clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- clib_memcpy (b0->data + offset, &limit, sizeof (limit));
+ clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
- clib_memcpy (b0->data + offset, &src_ip, sizeof (src_ip));
+ clib_memcpy_fast (b0->data + offset, &src_ip, sizeof (src_ip));
offset += sizeof (src_ip);
b0->current_length += MAX_ENTRIES_PER_USER_LEN;
@@ -955,16 +955,16 @@ nat_ipfix_logging_max_ses (u32 limit, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &quota_event, sizeof (quota_event));
+ clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- clib_memcpy (b0->data + offset, &limit, sizeof (limit));
+ clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
b0->current_length += MAX_SESSIONS_LEN;
@@ -1045,16 +1045,16 @@ nat_ipfix_logging_max_bib (u32 limit, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &quota_event, sizeof (quota_event));
+ clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- clib_memcpy (b0->data + offset, &limit, sizeof (limit));
+ clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
b0->current_length += MAX_BIBS_LEN;
@@ -1135,19 +1135,19 @@ nat_ipfix_logging_max_frag_ip4 (u32 limit, u32 src, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &quota_event, sizeof (quota_event));
+ clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- clib_memcpy (b0->data + offset, &limit, sizeof (limit));
+ clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
- clib_memcpy (b0->data + offset, &src, sizeof (src));
+ clib_memcpy_fast (b0->data + offset, &src, sizeof (src));
offset += sizeof (src);
b0->current_length += MAX_FRAGMENTS_IP4_LEN;
@@ -1228,19 +1228,19 @@ nat_ipfix_logging_max_frag_ip6 (u32 limit, ip6_address_t * src, int do_flush)
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, &quota_event, sizeof (quota_event));
+ clib_memcpy_fast (b0->data + offset, &quota_event, sizeof (quota_event));
offset += sizeof (quota_event);
- clib_memcpy (b0->data + offset, &limit, sizeof (limit));
+ clib_memcpy_fast (b0->data + offset, &limit, sizeof (limit));
offset += sizeof (limit);
- clib_memcpy (b0->data + offset, src, sizeof (ip6_address_t));
+ clib_memcpy_fast (b0->data + offset, src, sizeof (ip6_address_t));
offset += sizeof (ip6_address_t);
b0->current_length += MAX_FRAGMENTS_IP6_LEN;
@@ -1321,28 +1321,28 @@ nat_ipfix_logging_nat64_bibe (u8 nat_event, ip6_address_t * src_ip,
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, src_ip, sizeof (ip6_address_t));
+ clib_memcpy_fast (b0->data + offset, src_ip, sizeof (ip6_address_t));
offset += sizeof (ip6_address_t);
- clib_memcpy (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
+ clib_memcpy_fast (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
offset += sizeof (nat_src_ip);
- clib_memcpy (b0->data + offset, &proto, sizeof (proto));
+ clib_memcpy_fast (b0->data + offset, &proto, sizeof (proto));
offset += sizeof (proto);
- clib_memcpy (b0->data + offset, &src_port, sizeof (src_port));
+ clib_memcpy_fast (b0->data + offset, &src_port, sizeof (src_port));
offset += sizeof (src_port);
- clib_memcpy (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
+ clib_memcpy_fast (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
offset += sizeof (nat_src_port);
- clib_memcpy (b0->data + offset, &vrf_id, sizeof (vrf_id));
+ clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);
b0->current_length += NAT64_BIB_LEN;
@@ -1425,40 +1425,40 @@ nat_ipfix_logging_nat64_ses (u8 nat_event, ip6_address_t * src_ip,
if (PREDICT_TRUE (do_flush == 0))
{
u64 time_stamp = clib_host_to_net_u64 (now);
- clib_memcpy (b0->data + offset, &time_stamp, sizeof (time_stamp));
+ clib_memcpy_fast (b0->data + offset, &time_stamp, sizeof (time_stamp));
offset += sizeof (time_stamp);
- clib_memcpy (b0->data + offset, &nat_event, sizeof (nat_event));
+ clib_memcpy_fast (b0->data + offset, &nat_event, sizeof (nat_event));
offset += sizeof (nat_event);
- clib_memcpy (b0->data + offset, src_ip, sizeof (ip6_address_t));
+ clib_memcpy_fast (b0->data + offset, src_ip, sizeof (ip6_address_t));
offset += sizeof (ip6_address_t);
- clib_memcpy (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
+ clib_memcpy_fast (b0->data + offset, &nat_src_ip, sizeof (nat_src_ip));
offset += sizeof (nat_src_ip);
- clib_memcpy (b0->data + offset, &proto, sizeof (proto));
+ clib_memcpy_fast (b0->data + offset, &proto, sizeof (proto));
offset += sizeof (proto);
- clib_memcpy (b0->data + offset, &src_port, sizeof (src_port));
+ clib_memcpy_fast (b0->data + offset, &src_port, sizeof (src_port));
offset += sizeof (src_port);
- clib_memcpy (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
+ clib_memcpy_fast (b0->data + offset, &nat_src_port, sizeof (nat_src_port));
offset += sizeof (nat_src_port);
- clib_memcpy (b0->data + offset, dst_ip, sizeof (ip6_address_t));
+ clib_memcpy_fast (b0->data + offset, dst_ip, sizeof (ip6_address_t));
offset += sizeof (ip6_address_t);
- clib_memcpy (b0->data + offset, &nat_dst_ip, sizeof (nat_dst_ip));
+ clib_memcpy_fast (b0->data + offset, &nat_dst_ip, sizeof (nat_dst_ip));
offset += sizeof (nat_dst_ip);
- clib_memcpy (b0->data + offset, &dst_port, sizeof (dst_port));
+ clib_memcpy_fast (b0->data + offset, &dst_port, sizeof (dst_port));
offset += sizeof (dst_port);
- clib_memcpy (b0->data + offset, &nat_dst_port, sizeof (nat_dst_port));
+ clib_memcpy_fast (b0->data + offset, &nat_dst_port, sizeof (nat_dst_port));
offset += sizeof (nat_dst_port);
- clib_memcpy (b0->data + offset, &vrf_id, sizeof (vrf_id));
+ clib_memcpy_fast (b0->data + offset, &vrf_id, sizeof (vrf_id));
offset += sizeof (vrf_id);
b0->current_length += NAT64_SES_LEN;
diff --git a/src/plugins/nat/out2in.c b/src/plugins/nat/out2in.c
index c4d1fbf6900..9cace08c565 100755
--- a/src/plugins/nat/out2in.c
+++ b/src/plugins/nat/out2in.c
@@ -1568,17 +1568,16 @@ nat44_out2in_reass_node_fn (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}
diff --git a/src/plugins/nat/out2in_ed.c b/src/plugins/nat/out2in_ed.c
index b2dbc513df6..55b34f5c2e8 100644
--- a/src/plugins/nat/out2in_ed.c
+++ b/src/plugins/nat/out2in_ed.c
@@ -1844,17 +1844,16 @@ nat44_ed_out2in_reass_node_fn (vlib_main_t * vm,
u32 len = vec_len (fragments_to_loopback);
if (len <= VLIB_FRAME_SIZE)
{
- clib_memcpy (from, fragments_to_loopback,
- sizeof (u32) * len);
+ clib_memcpy_fast (from, fragments_to_loopback,
+ sizeof (u32) * len);
n_left_from = len;
vec_reset_length (fragments_to_loopback);
}
else
{
- clib_memcpy (from,
- fragments_to_loopback + (len -
- VLIB_FRAME_SIZE),
- sizeof (u32) * VLIB_FRAME_SIZE);
+ clib_memcpy_fast (from, fragments_to_loopback +
+ (len - VLIB_FRAME_SIZE),
+ sizeof (u32) * VLIB_FRAME_SIZE);
n_left_from = VLIB_FRAME_SIZE;
_vec_len (fragments_to_loopback) = len - VLIB_FRAME_SIZE;
}