Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
IP directed broadcast
[vpp.git]
/
src
/
vnet
/
mpls
/
mpls_tunnel.c
diff --git
a/src/vnet/mpls/mpls_tunnel.c
b/src/vnet/mpls/mpls_tunnel.c
index
8ed2c40
..
d3faeac
100644
(file)
--- a/
src/vnet/mpls/mpls_tunnel.c
+++ b/
src/vnet/mpls/mpls_tunnel.c
@@
-123,23
+123,20
@@
mpls_tunnel_collect_forwarding (fib_node_index_t pl_index,
path_ext = fib_path_ext_list_find_by_path_index(&ctx->mt->mt_path_exts,
path_index);
path_ext = fib_path_ext_list_find_by_path_index(&ctx->mt->mt_path_exts,
path_index);
- if (NULL != path_ext)
- {
- /*
- * found a matching extension. stack it to obtain the forwarding
- * info for this path.
- */
- ctx->next_hops = fib_path_ext_stack(path_ext,
- ctx->fct,
- ctx->fct,
- ctx->next_hops);
- }
- else
- ASSERT(0);
/*
/*
- *
else
- *
There should be a path-extenios associated with each path
+ *
we don't want IP TTL decrements for packets hitting the MPLS labels
+ *
we stack on, since the IP TTL decrement is done by the adj
*/
*/
+ path_ext->fpe_mpls_flags |= FIB_PATH_EXT_MPLS_FLAG_NO_IP_TTL_DECR;
+
+ /*
+ * found a matching extension. stack it to obtain the forwarding
+ * info for this path.
+ */
+ ctx->next_hops = fib_path_ext_stack(path_ext,
+ ctx->fct,
+ ctx->fct,
+ ctx->next_hops);
return (FIB_PATH_LIST_WALK_CONTINUE);
}
return (FIB_PATH_LIST_WALK_CONTINUE);
}
@@
-273,9
+270,8
@@
mpls_tunnel_stack (adj_index_t ai)
mpls_tunnel_mk_lb(mt,
adj->ia_link,
mpls_tunnel_mk_lb(mt,
adj->ia_link,
- (VNET_LINK_MPLS == adj_get_link_type(ai) ?
- FIB_FORW_CHAIN_TYPE_MPLS_NON_EOS:
- FIB_FORW_CHAIN_TYPE_MPLS_EOS),
+ fib_forw_chain_type_from_link_type(
+ adj_get_link_type(ai)),
&dpo);
adj_nbr_midchain_stack(ai, &dpo);
&dpo);
adj_nbr_midchain_stack(ai, &dpo);
@@
-403,6
+399,7
@@
mpls_tunnel_update_adj (vnet_main_t * vnm,
{
case IP_LOOKUP_NEXT_ARP:
case IP_LOOKUP_NEXT_GLEAN:
{
case IP_LOOKUP_NEXT_ARP:
case IP_LOOKUP_NEXT_GLEAN:
+ case IP_LOOKUP_NEXT_BCAST:
adj_nbr_midchain_update_rewrite(ai, mpls_tunnel_fixup,
NULL,
ADJ_FLAG_NONE,
adj_nbr_midchain_update_rewrite(ai, mpls_tunnel_fixup,
NULL,
ADJ_FLAG_NONE,
@@
-521,6
+518,11
@@
mpls_tunnel_tx (vlib_main_t * vm,
b0 = vlib_get_buffer(vm, bi0);
vnet_buffer(b0)->ip.adj_index[VLIB_TX] = mt->mt_l2_lb.dpoi_index;
b0 = vlib_get_buffer(vm, bi0);
vnet_buffer(b0)->ip.adj_index[VLIB_TX] = mt->mt_l2_lb.dpoi_index;
+ /* since we are coming out of the L2 world, where the vlib_buffer
+ * union is used for other things, make sure it is clean for
+ * MPLS from now on.
+ */
+ vnet_buffer(b0)->mpls.first = 0;
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{
if (PREDICT_FALSE(b0->flags & VLIB_BUFFER_IS_TRACED))
{
@@
-642,6
+644,9
@@
vnet_mpls_tunnel_create (u8 l2_only,
hi = vnet_get_hw_interface (vnm, mt->mt_hw_if_index);
}
hi = vnet_get_hw_interface (vnm, mt->mt_hw_if_index);
}
+ /* Standard default MPLS tunnel MTU. */
+ vnet_sw_interface_set_mtu (vnm, hi->sw_if_index, 9000);
+
/*
* Add the new tunnel to the tunnel DB - key:SW if index
*/
/*
* Add the new tunnel to the tunnel DB - key:SW if index
*/