The mpath data structure has data that is only relevant
for the first mpath in the list. It is not being used
anywhere else. Let's document that a bit more.
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
* bgp_path_info_mpath_lb_update
*
* Update cumulative info related to link-bandwidth
+ *
+ * This is only set on the first mpath of the list
+ * as such we should UNSET the flags when removing
+ * to ensure nothing accidently happens
*/
static void bgp_path_info_mpath_lb_update(struct bgp_path_info *path, bool set,
bool all_paths_lb, uint64_t cum_bw)
/* When attached to best path, the number of selected multipaths */
uint16_t mp_count;
- /* Flags - relevant as noted. */
+ /* Flags - relevant as noted, attached to bestpath. */
uint16_t mp_flags;
#define BGP_MP_LB_PRESENT 0x1 /* Link-bandwidth present for >= 1 path */
#define BGP_MP_LB_ALL 0x2 /* Link-bandwidth present for all multipaths */
- /* Aggregated attribute for advertising multipath route */
+ /*
+ * Aggregated attribute for advertising multipath route,
+ * attached to bestpath
+ */
struct attr *mp_attr;
- /* Cumulative bandiwdth of all multipaths - attached to best path. */
+ /* Cumulative bandiwdth of all multipaths - attached to bestpath. */
uint64_t cum_bw;
};