aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib/fib_path.c
diff options
context:
space:
mode:
authorNeale Ranns <nranns@cisco.com>2019-07-19 11:44:53 +0000
committerDamjan Marion <dmarion@me.com>2019-07-24 14:42:27 +0000
commit1dbcf30b7d9691e9223c71c5fa594e7831e4ea32 (patch)
treed722f71afdac2ef8e86be5501e5fd89fc41e6364 /src/vnet/fib/fib_path.c
parent1e5ca9b918dfe988eb0247ec35fc188bfabb4dcb (diff)
fib: Support the POP of a Psuedo Wire Control Word
Type: feature Change-Id: Ib24547a7c4c73ceb5383d1ca8f14ec40e6a90f01 Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet/fib/fib_path.c')
-rw-r--r--src/vnet/fib/fib_path.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index eebba1b1548..ed7bc0262fc 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -26,6 +26,7 @@
#include <vnet/dpo/dvr_dpo.h>
#include <vnet/dpo/ip_null_dpo.h>
#include <vnet/dpo/classify_dpo.h>
+#include <vnet/dpo/pw_cw.h>
#include <vnet/adj/adj.h>
#include <vnet/adj/adj_mcast.h>
@@ -1233,6 +1234,8 @@ fib_path_route_flags_to_cfg_flags (const fib_route_path_t *rpath)
{
fib_path_cfg_flags_t cfg_flags = FIB_PATH_CFG_FLAG_NONE;
+ if (rpath->frp_flags & FIB_ROUTE_PATH_POP_PW_CW)
+ cfg_flags |= FIB_PATH_CFG_FLAG_POP_PW_CW;
if (rpath->frp_flags & FIB_ROUTE_PATH_RESOLVE_VIA_HOST)
cfg_flags |= FIB_PATH_CFG_FLAG_RESOLVE_HOST;
if (rpath->frp_flags & FIB_ROUTE_PATH_RESOLVE_VIA_ATTACHED)
@@ -2381,6 +2384,16 @@ fib_path_stack_mpls_disp (fib_node_index_t path_index,
case FIB_PATH_TYPE_DVR:
break;
}
+
+ if (path->fp_cfg_flags & FIB_PATH_CFG_FLAG_POP_PW_CW)
+ {
+ dpo_id_t tmp = DPO_INVALID;
+
+ dpo_copy(&tmp, dpo);
+
+ pw_cw_dpo_create(&tmp, dpo);
+ dpo_reset(&tmp);
+ }
}
void