Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
acl-plugin: CLI to clear all sessions
[vpp.git]
/
src
/
vnet
/
mpls
/
mpls_output.c
diff --git
a/src/vnet/mpls/mpls_output.c
b/src/vnet/mpls/mpls_output.c
index
08018fd
..
241a783
100644
(file)
--- a/
src/vnet/mpls/mpls_output.c
+++ b/
src/vnet/mpls/mpls_output.c
@@
-64,12
+64,12
@@
mpls_output_inline (vlib_main_t * vm,
vlib_frame_t * from_frame,
int is_midchain)
{
vlib_frame_t * from_frame,
int is_midchain)
{
- u32 n_left_from, next_index, * from, * to_next,
cpu
_index;
+ u32 n_left_from, next_index, * from, * to_next,
thread
_index;
vlib_node_runtime_t * error_node;
u32 n_left_to_next;
mpls_main_t *mm;
vlib_node_runtime_t * error_node;
u32 n_left_to_next;
mpls_main_t *mm;
-
cpu_index = os_get_cpu_number
();
+
thread_index = vlib_get_thread_index
();
error_node = vlib_node_get_runtime (vm, mpls_output_node.index);
from = vlib_frame_vector_args (from_frame);
n_left_from = from_frame->n_vectors;
error_node = vlib_node_get_runtime (vm, mpls_output_node.index);
from = vlib_frame_vector_args (from_frame);
n_left_from = from_frame->n_vectors;
@@
-137,13
+137,13
@@
mpls_output_inline (vlib_main_t * vm,
/* Bump the adj counters for packet and bytes */
vlib_increment_combined_counter
(&adjacency_counters,
/* Bump the adj counters for packet and bytes */
vlib_increment_combined_counter
(&adjacency_counters,
-
cpu
_index,
+
thread
_index,
adj_index0,
1,
vlib_buffer_length_in_chain (vm, p0) + rw_len0);
vlib_increment_combined_counter
(&adjacency_counters,
adj_index0,
1,
vlib_buffer_length_in_chain (vm, p0) + rw_len0);
vlib_increment_combined_counter
(&adjacency_counters,
-
cpu
_index,
+
thread
_index,
adj_index1,
1,
vlib_buffer_length_in_chain (vm, p1) + rw_len1);
adj_index1,
1,
vlib_buffer_length_in_chain (vm, p1) + rw_len1);
@@
-206,6
+206,9
@@
mpls_output_inline (vlib_main_t * vm,
p0, sizeof (*tr));
tr->adj_index = vnet_buffer(p0)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p0)->ip.flow_hash;
p0, sizeof (*tr));
tr->adj_index = vnet_buffer(p0)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p0)->ip.flow_hash;
+ clib_memcpy (tr->packet_data,
+ vlib_buffer_get_current (p0),
+ sizeof (tr->packet_data));
}
if (PREDICT_FALSE(p1->flags & VLIB_BUFFER_IS_TRACED))
{
}
if (PREDICT_FALSE(p1->flags & VLIB_BUFFER_IS_TRACED))
{
@@
-213,6
+216,9
@@
mpls_output_inline (vlib_main_t * vm,
p1, sizeof (*tr));
tr->adj_index = vnet_buffer(p1)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p1)->ip.flow_hash;
p1, sizeof (*tr));
tr->adj_index = vnet_buffer(p1)->ip.adj_index[VLIB_TX];
tr->flow_hash = vnet_buffer(p1)->ip.flow_hash;
+ clib_memcpy (tr->packet_data,
+ vlib_buffer_get_current (p1),
+ sizeof (tr->packet_data));
}
vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
}
vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
@@
-245,7
+251,7
@@
mpls_output_inline (vlib_main_t * vm,
vlib_increment_combined_counter
(&adjacency_counters,
vlib_increment_combined_counter
(&adjacency_counters,
-
cpu
_index,
+
thread
_index,
adj_index0,
1,
vlib_buffer_length_in_chain (vm, p0) + rw_len0);
adj_index0,
1,
vlib_buffer_length_in_chain (vm, p0) + rw_len0);