diff options
author | Neale Ranns <nranns@cisco.com> | 2019-05-22 13:26:39 +0000 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2019-06-05 11:33:12 +0000 |
commit | 59fa121f8953f7b07f0cc02149ca28182f959f42 (patch) | |
tree | 51249a3bf2da047a791b7446af09f15df91118a6 /src/vnet | |
parent | e6be702362299566990678f505512b1b74b49112 (diff) |
L3 cross connect
- all packets input on interface X are load-balanced over the set of
paths provided.
Change-Id: Ic27cb88c4cd5d6d3462570632daff7a43d5a652d
Signed-off-by: Neale Ranns <nranns@cisco.com>
Diffstat (limited to 'src/vnet')
-rw-r--r-- | src/vnet/fib/fib_path_list.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/vnet/fib/fib_path_list.c b/src/vnet/fib/fib_path_list.c index f1d54430d66..47170adf864 100644 --- a/src/vnet/fib/fib_path_list.c +++ b/src/vnet/fib/fib_path_list.c @@ -25,6 +25,7 @@ #include <vnet/fib/fib_walk.h> #include <vnet/fib/fib_urpf_list.h> #include <vnet/fib/fib_path_ext.h> +#include <vnet/fib/fib_table.h> /** * The magic number of child entries that make a path-list popular. @@ -364,10 +365,12 @@ fib_path_list_mk_lb (fib_path_list_t *path_list, dpo_id_t *dpo, fib_path_list_fwd_flags_t flags) { - load_balance_path_t *nhs; fib_node_index_t *path_index; + load_balance_path_t *nhs; + dpo_proto_t dproto; nhs = NULL; + dproto = fib_forw_chain_type_to_dpo_proto(fct); /* * We gather the DPOs from resolved paths. @@ -388,10 +391,11 @@ fib_path_list_mk_lb (fib_path_list_t *path_list, */ dpo_set(dpo, DPO_LOAD_BALANCE, - fib_forw_chain_type_to_dpo_proto(fct), + dproto, load_balance_create(vec_len(nhs), - fib_forw_chain_type_to_dpo_proto(fct), - 0 /* FIXME FLOW HASH */)); + dproto, + fib_table_get_default_flow_hash_config( + dpo_proto_to_fib(dproto)))); load_balance_multipath_update(dpo, nhs, fib_path_list_fwd_flags_2_load_balance(flags)); |