aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/udp/udp.h
diff options
context:
space:
mode:
authorDave Barach <dave@barachs.net>2018-11-13 16:34:13 -0500
committerFlorin Coras <florin.coras@gmail.com>2018-11-14 15:54:01 +0000
commit178cf493d009995b28fdf220f04c98860ff79a9b (patch)
tree097c1be82b8f6fa9bc04b9b1e193158e2e4997eb /src/vnet/udp/udp.h
parent6917b94f2146aa51195a6a2a1ccd8416a1d74bf3 (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/vnet/udp/udp.h')
-rw-r--r--src/vnet/udp/udp.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/vnet/udp/udp.h b/src/vnet/udp/udp.h
index 3b6de6ca271..8b94a0088f6 100644
--- a/src/vnet/udp/udp.h
+++ b/src/vnet/udp/udp.h
@@ -228,7 +228,7 @@ udp_connection_clone_safe (u32 connection_index, u32 thread_index)
*/
udp_pool_add_peeker (thread_index);
old_c = udp_main.connections[thread_index] + connection_index;
- clib_memcpy (new_c, old_c, sizeof (*new_c));
+ clib_memcpy_fast (new_c, old_c, sizeof (*new_c));
udp_pool_remove_peeker (thread_index);
new_c->c_thread_index = current_thread_index;
new_c->c_c_index = udp_connection_index (new_c);
@@ -343,7 +343,7 @@ ip_udp_encap_one (vlib_main_t * vm, vlib_buffer_t * b0, u8 * ec0, word ec_len,
ip0 = vlib_buffer_get_current (b0);
/* Apply the encap string. */
- clib_memcpy (ip0, ec0, ec_len);
+ clib_memcpy_fast (ip0, ec0, ec_len);
ip_udp_fixup_one (vm, b0, 1);
}
else
@@ -353,7 +353,7 @@ ip_udp_encap_one (vlib_main_t * vm, vlib_buffer_t * b0, u8 * ec0, word ec_len,
ip0 = vlib_buffer_get_current (b0);
/* Apply the encap string. */
- clib_memcpy (ip0, ec0, ec_len);
+ clib_memcpy_fast (ip0, ec0, ec_len);
ip_udp_fixup_one (vm, b0, 0);
}
}
@@ -380,8 +380,8 @@ ip_udp_encap_two (vlib_main_t * vm, vlib_buffer_t * b0, vlib_buffer_t * b1,
ip1 = vlib_buffer_get_current (b1);
/* Apply the encap string */
- clib_memcpy (ip0, ec0, ec_len);
- clib_memcpy (ip1, ec1, ec_len);
+ clib_memcpy_fast (ip0, ec0, ec_len);
+ clib_memcpy_fast (ip1, ec1, ec_len);
/* fix the <bleep>ing outer-IP checksum */
sum0 = ip0->checksum;
@@ -424,8 +424,8 @@ ip_udp_encap_two (vlib_main_t * vm, vlib_buffer_t * b0, vlib_buffer_t * b1,
ip1 = vlib_buffer_get_current (b1);
/* Apply the encap string. */
- clib_memcpy (ip0, ec0, ec_len);
- clib_memcpy (ip1, ec1, ec_len);
+ clib_memcpy_fast (ip0, ec0, ec_len);
+ clib_memcpy_fast (ip1, ec1, ec_len);
new_l0 = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0)
- sizeof (*ip0));