Change-Id: I655f41878ca3595681d0255782b0faba01c9824b
Signed-off-by: Neale Ranns <nranns@cisco.com>
/**
* UCMP [unnormalised] weigth
*/
/**
* UCMP [unnormalised] weigth
*/
/**
* A path preference. 0 is the best.
* Only paths of the best preference, that are 'up', are considered
* for forwarding.
*/
/**
* A path preference. 0 is the best.
* Only paths of the best preference, that are 'up', are considered
* for forwarding.
*/
/**
* per-type union of the data required to resolve the path
/**
* per-type union of the data required to resolve the path
.frp_sw_if_index = ~0,
.frp_fib_index = 0,
.frp_weight = 1,
.frp_sw_if_index = ~0,
.frp_fib_index = 0,
.frp_weight = 1,
- .frp_preference = 1000,
.frp_flags = FIB_ROUTE_PATH_RESOLVE_VIA_HOST,
.frp_addr = pfx_1_1_1_3_s_32.fp_addr,
};
.frp_flags = FIB_ROUTE_PATH_RESOLVE_VIA_HOST,
.frp_addr = pfx_1_1_1_3_s_32.fp_addr,
};
/**
* [un]equal cost path weight
*/
/**
* [un]equal cost path weight
*/
/**
* A path preference. 0 is the best.
* Only paths of the best preference, that are 'up', are considered
* for forwarding.
*/
/**
* A path preference. 0 is the best.
* Only paths of the best preference, that are 'up', are considered
* for forwarding.
*/
/**
* flags on the path
*/
/**
* flags on the path
*/
- fp->weight = htonl (api_rpath->rpath.frp_weight);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
- fp->weight = htonl (api_rpath->rpath.frp_weight);
- fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
+ fp->sw_if_index = api_rpath->rpath.frp_sw_if_index;
copy_fib_next_hop (api_rpath, fp);
fp++;
}
copy_fib_next_hop (api_rpath, fp);
fp++;
}
typeonly manual_print manual_endian define fib_path2
{
u32 sw_if_index;
typeonly manual_print manual_endian define fib_path2
{
u32 sw_if_index;
+ u8 weight;
+ u8 preference;
u8 is_local;
u8 is_drop;
u8 is_unreach;
u8 is_local;
u8 is_drop;
u8 is_unreach;
{
memset (fp, 0, sizeof (*fp));
{
memset (fp, 0, sizeof (*fp));
- fp->weight = htonl (api_rpath->rpath.frp_weight);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
vec_foreach (api_rpath, api_rpaths)
{
memset (fp, 0, sizeof (*fp));
vec_foreach (api_rpath, api_rpaths)
{
memset (fp, 0, sizeof (*fp));
- fp->weight = htonl (api_rpath->rpath.frp_weight);
+ fp->weight = api_rpath->rpath.frp_weight;
+ fp->preference = api_rpath->rpath.frp_preference;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;
fp->sw_if_index = htonl (api_rpath->rpath.frp_sw_if_index);
copy_fib_next_hop (api_rpath, fp);
fp++;