X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fexamples%2Fsample-plugin%2Fsample%2Fnode.c;h=1f0a2e9775bb56130a30b123e51eb0b445171f5b;hb=178cf493d009995b28fdf220f04c98860ff79a9b;hp=009968b6099c8d5298bb6e376d95ba05b93b0c91;hpb=6917b94f2146aa51195a6a2a1ccd8416a1d74bf3;p=vpp.git diff --git a/src/examples/sample-plugin/sample/node.c b/src/examples/sample-plugin/sample/node.c index 009968b6099..1f0a2e9775b 100644 --- a/src/examples/sample-plugin/sample/node.c +++ b/src/examples/sample-plugin/sample/node.c @@ -183,10 +183,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_add_trace (vm, node, b0, sizeof (*t)); t->sw_if_index = sw_if_index0; t->next_index = next0; - clib_memcpy (t->new_src_mac, en0->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en0->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); } if (b1->flags & VLIB_BUFFER_IS_TRACED) @@ -195,10 +195,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_add_trace (vm, node, b1, sizeof (*t)); t->sw_if_index = sw_if_index1; t->next_index = next1; - clib_memcpy (t->new_src_mac, en1->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en1->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en1->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en1->dst_address, + sizeof (t->new_dst_mac)); } } @@ -256,10 +256,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, sample_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); t->sw_if_index = sw_if_index0; t->next_index = next0; - clib_memcpy (t->new_src_mac, en0->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en0->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); } pkts_swapped += 1; @@ -367,10 +367,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_add_trace (vm, node, b0, sizeof (*t)); t->sw_if_index = sw_if_index0; t->next_index = next0; - clib_memcpy (t->new_src_mac, en0->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en0->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); } if (b1->flags & VLIB_BUFFER_IS_TRACED) @@ -379,10 +379,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_add_trace (vm, node, b1, sizeof (*t)); t->sw_if_index = sw_if_index1; t->next_index = next1; - clib_memcpy (t->new_src_mac, en1->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en1->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en1->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en1->dst_address, + sizeof (t->new_dst_mac)); } } @@ -432,10 +432,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, sample_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t)); t->sw_if_index = sw_if_index0; t->next_index = next0; - clib_memcpy (t->new_src_mac, en0->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en0->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en0->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en0->dst_address, + sizeof (t->new_dst_mac)); } pkts_swapped += 1; @@ -585,10 +585,10 @@ VLIB_NODE_FN (sample_node) (vlib_main_t * vm, vlib_node_runtime_t * node, t->sw_if_index = vnet_buffer (b[0])->sw_if_index[VLIB_TX]; t->next_index = SAMPLE_NEXT_INTERFACE_OUTPUT; en = vlib_buffer_get_current (b[0]); - clib_memcpy (t->new_src_mac, en->src_address, - sizeof (t->new_src_mac)); - clib_memcpy (t->new_dst_mac, en->dst_address, - sizeof (t->new_dst_mac)); + clib_memcpy_fast (t->new_src_mac, en->src_address, + sizeof (t->new_src_mac)); + clib_memcpy_fast (t->new_dst_mac, en->dst_address, + sizeof (t->new_dst_mac)); b++; } else