aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/fib
diff options
context:
space:
mode:
authorVijayabhaskar Katamreddy <vkatamre@cisco.com>2018-10-05 11:24:56 -0700
committerVijayabhaskar Katamreddy <vkatamre@cisco.com>2018-10-08 14:43:21 +0000
commitcef5db0acdd076c33ed891c359b15086713aaafa (patch)
treeb6ae546c0ddd862735ce4d012f073bcf1fdaa4ae /src/vnet/fib
parentc210cb50e815725e4bb949357c9f6e2fb4032ece (diff)
Adding Multipath support for exclusive DPO based fib path entries via rpath
Change-Id: I3c84daf046dbad972b36e48fa2548bbe20c7b338 Signed-off-by: Vijayabhaskar Katamreddy <vkatamre@cisco.com>
Diffstat (limited to 'src/vnet/fib')
-rw-r--r--src/vnet/fib/fib_path.c13
-rw-r--r--src/vnet/fib/fib_types.h5
2 files changed, 16 insertions, 2 deletions
diff --git a/src/vnet/fib/fib_path.c b/src/vnet/fib/fib_path.c
index 88dddbcaeea..4c93f732b72 100644
--- a/src/vnet/fib/fib_path.c
+++ b/src/vnet/fib/fib_path.c
@@ -1323,6 +1323,11 @@ fib_path_create (fib_node_index_t pl_index,
path->fp_type = FIB_PATH_TYPE_DVR;
path->dvr.fp_interface = rpath->frp_sw_if_index;
}
+ else if (rpath->frp_flags & FIB_ROUTE_PATH_EXCLUSIVE)
+ {
+ path->fp_type = FIB_PATH_TYPE_EXCLUSIVE;
+ dpo_copy(&path->exclusive.fp_ex_dpo, &rpath->dpo);
+ }
else if (~0 != rpath->frp_sw_if_index)
{
if (ip46_address_is_zero(&rpath->frp_addr))
@@ -1574,9 +1579,11 @@ fib_path_cmp_i (const fib_path_t *path1,
case FIB_PATH_TYPE_DVR:
res = (path1->dvr.fp_interface - path2->dvr.fp_interface);
break;
+ case FIB_PATH_TYPE_EXCLUSIVE:
+ res = dpo_cmp(&path1->exclusive.fp_ex_dpo, &path2->exclusive.fp_ex_dpo);
+ break;
case FIB_PATH_TYPE_SPECIAL:
case FIB_PATH_TYPE_RECEIVE:
- case FIB_PATH_TYPE_EXCLUSIVE:
res = 0;
break;
}
@@ -1711,9 +1718,11 @@ fib_path_cmp_w_route_path (fib_node_index_t path_index,
case FIB_PATH_TYPE_DVR:
res = (path->dvr.fp_interface - rpath->frp_sw_if_index);
break;
+ case FIB_PATH_TYPE_EXCLUSIVE:
+ res = dpo_cmp(&path->exclusive.fp_ex_dpo, &rpath->dpo);
+ break;
case FIB_PATH_TYPE_SPECIAL:
case FIB_PATH_TYPE_RECEIVE:
- case FIB_PATH_TYPE_EXCLUSIVE:
res = 0;
break;
}
diff --git a/src/vnet/fib/fib_types.h b/src/vnet/fib/fib_types.h
index cd6ef7efac8..714a1d9e9a8 100644
--- a/src/vnet/fib/fib_types.h
+++ b/src/vnet/fib/fib_types.h
@@ -523,6 +523,11 @@ typedef struct fib_route_path_t_ {
* The outgoing MPLS label Stack. NULL implies no label.
*/
fib_mpls_label_t *frp_label_stack;
+
+ /**
+ * Exclusive DPO
+ */
+ dpo_id_t dpo;
};
/**
* A path that resolves via a BIER Table.