summaryrefslogtreecommitdiffstats
path: root/src/vnet/mpls/mpls_lookup.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2020-10-08 10:06:32 +0000
committerDamjan Marion <dmarion@me.com>2020-10-14 17:34:52 +0000
commit444e800f42565ffb123209f8694751607dc34596 (patch)
tree0d207eaca8e6490a68dd6d48676639c9239f8c67 /src/vnet/mpls/mpls_lookup.c
parent238d3844b210ff09d9092dd3f5d78cde8b7de1aa (diff)
mpls: no per-MPLS-tunnel tx node
Type: improvement do not add a per-MPLS tunnel tx node. per-tunnl nodes limit the number of tunnels that can be created to the number o fnodes that can be created (64k). improve the tx node. Signed-off-by: Neale Ranns <nranns@cisco.com> Change-Id: I6016f05e809c6c64a0b098a101b28c9dd47824b3
Diffstat (limited to 'src/vnet/mpls/mpls_lookup.c')
-rw-r--r--src/vnet/mpls/mpls_lookup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/vnet/mpls/mpls_lookup.c b/src/vnet/mpls/mpls_lookup.c
index c0804405db3..07c5cc47198 100644
--- a/src/vnet/mpls/mpls_lookup.c
+++ b/src/vnet/mpls/mpls_lookup.c
@@ -615,6 +615,14 @@ VLIB_NODE_FN (mpls_load_balance_node) (vlib_main_t * vm,
tr->lb_index = lbi0;
tr->hash = hc0;
}
+ if (PREDICT_FALSE(p1->flags & VLIB_BUFFER_IS_TRACED))
+ {
+ mpls_load_balance_trace_t *tr = vlib_add_trace (vm, node,
+ p1, sizeof (*tr));
+ tr->next_index = next1;
+ tr->lb_index = lbi1;
+ tr->hash = hc1;
+ }
vlib_validate_buffer_enqueue_x2 (vm, node, next,
to_next, n_left_to_next,
@@ -664,6 +672,15 @@ VLIB_NODE_FN (mpls_load_balance_node) (vlib_main_t * vm,
next0 = dpo0->dpoi_next_node;
vnet_buffer (p0)->ip.adj_index[VLIB_TX] = dpo0->dpoi_index;
+ if (PREDICT_FALSE(p0->flags & VLIB_BUFFER_IS_TRACED))
+ {
+ mpls_load_balance_trace_t *tr = vlib_add_trace (vm, node,
+ p0, sizeof (*tr));
+ tr->next_index = next0;
+ tr->lb_index = lbi0;
+ tr->hash = hc0;
+ }
+
vlib_increment_combined_counter
(cm, thread_index, lbi0, 1,
vlib_buffer_length_in_chain (vm, p0));