diff options
author | Dave Barach <dave@barachs.net> | 2018-11-13 16:34:13 -0500 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2018-11-14 15:54:01 +0000 |
commit | 178cf493d009995b28fdf220f04c98860ff79a9b (patch) | |
tree | 097c1be82b8f6fa9bc04b9b1e193158e2e4997eb /src/plugins/dpdk/device/node.c | |
parent | 6917b94f2146aa51195a6a2a1ccd8416a1d74bf3 (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/plugins/dpdk/device/node.c')
-rw-r--r-- | src/plugins/dpdk/device/node.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/plugins/dpdk/device/node.c b/src/plugins/dpdk/device/node.c index e28ad7f7108..6a3c1c936fc 100644 --- a/src/plugins/dpdk/device/node.c +++ b/src/plugins/dpdk/device/node.c @@ -304,7 +304,7 @@ dpdk_process_rx_burst (vlib_main_t * vm, dpdk_per_thread_data_t * ptd, while (n_left) { b[0] = vlib_buffer_from_rte_mbuf (mb[0]); - clib_memcpy (b[0], &ptd->buffer_template, 64); + clib_memcpy_fast (b[0], &ptd->buffer_template, 64); or_flags |= dpdk_ol_flags_extract (mb, flags, 1); flags += 1; @@ -549,12 +549,13 @@ dpdk_device_input (vlib_main_t * vm, dpdk_main_t * dm, dpdk_device_t * xd, t0->device_index = xd->device_index; t0->buffer_index = vlib_get_buffer_index (vm, b0); - clib_memcpy (&t0->mb, mb[0], sizeof t0->mb); - clib_memcpy (&t0->buffer, b0, sizeof b0[0] - sizeof b0->pre_data); - clib_memcpy (t0->buffer.pre_data, b0->data, - sizeof t0->buffer.pre_data); - clib_memcpy (&t0->data, mb[0]->buf_addr + mb[0]->data_off, - sizeof t0->data); + clib_memcpy_fast (&t0->mb, mb[0], sizeof t0->mb); + clib_memcpy_fast (&t0->buffer, b0, + sizeof b0[0] - sizeof b0->pre_data); + clib_memcpy_fast (t0->buffer.pre_data, b0->data, + sizeof t0->buffer.pre_data); + clib_memcpy_fast (&t0->data, mb[0]->buf_addr + mb[0]->data_off, + sizeof t0->data); n_trace--; n_left--; buffers++; |