Remove c-11 memcpy checks from perf-critical code
[vpp.git] / src / plugins / nat / in2out_ed.c
index 8db53c0..e32e138 100644 (file)
@@ -1960,11 +1960,8 @@ nat44_ed_in2out_reass_node_fn_inline (vlib_main_t * vm,
            }
 
          /* Hairpinning */
-         if (PREDICT_TRUE (proto0 != SNAT_PROTOCOL_ICMP))
-           nat44_reass_hairpinning (sm, b0, ip0, s0->out2in.port,
-                                    s0->ext_host_port, proto0, 1);
-         else
-           snat_icmp_hairpinning (sm, b0, ip0, icmp0, 1);
+         nat44_reass_hairpinning (sm, b0, ip0, s0->out2in.port,
+                                  s0->ext_host_port, proto0, 1);
 
          /* Accounting */
          nat44_session_update_counters (s0, now,
@@ -2005,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;
                }