Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Remove c-11 memcpy checks from perf-critical code
[vpp.git]
/
src
/
vnet
/
udp
/
udp.h
diff --git
a/src/vnet/udp/udp.h
b/src/vnet/udp/udp.h
index
3b6de6c
..
8b94a00
100644
(file)
--- 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;
*/
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);
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. */
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
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. */
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);
}
}
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 */
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;
/* 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. */
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));
new_l0 = clib_host_to_net_u16 (vlib_buffer_length_in_chain (vm, b0)
- sizeof (*ip0));