On Mon, Feb 04, 2013 at 07:13:35PM -0800, Ethan Jackson wrote: > Stable bond mode, along with autopath, were trying to implement > functionality close to what we get from the bundle action. > Unfortunately, they are quite clunky, and generally less useful > than bundle, so they're being removed. > > Signed-off-by: Ethan Jackson <et...@nicira.com>
The comment on the function now called choose_hash_slave() seems rather shrill. I don't think the performance is an issue. choose_hash_slave() is now just trying to choose a random slave, right? Then we can use a simpler algorithm that doesn't need any extra input: /* Randomly chooses and returns an enabled slave. Returns NULL if no slave is * enabled. */ static struct bond_slave * choose_random_slave(const struct bond *bond) { struct bond_slave *best, *slave; int n; n = 0; best = NULL; HMAP_FOR_EACH (slave, hmap_node, &bond->slaves) { if (slave->enabled && !random_range(++n)) { best = slave; } } return best; } Thanks, Ben. _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev