[ovs-dev] [lacp bridge 3/4] bond: Create new 'stable_id' parameter.
Ben Pfaff
blp at nicira.com
Fri Apr 15 17:38:02 UTC 2011
On Thu, Apr 14, 2011 at 07:09:37PM -0700, Ethan Jackson wrote:
> For BM_STABLE bonds, instead of choosing the sort key in the
> qsort() comparator. This patch makes it a configuration setting of
> each slave. This will help rest LACP out of the bonding code
> further in future patches.
"rest"? Do you mean "wrest"? Or maybe just "pull".
The period between your first two sentences should be a comma, I
think: "...qsort() comparator, this patch...".
In bond_slave_register(), if the slave is enabled and stb_id changes,
then we need to set bond->stb_need_sort, I think, and probably
revalidate everything too?
I would personally find bond_stb_sort_cmp__() more readable as:
static int
bond_stb_sort_cmp__(const void *a_, const void *b_)
{
const struct bond_slave *const *ap = a_;
const struct bond_slave *const *bp = b_;
const struct bond_slave *a = *ap;
const struct bond_slave *b = *bp;
uint16_t a_id = a->stb_id;
uint16_t b_id = b->stb_id;
return a_id < b_id ? -1 : a_id > b_id;
}
Otherwise looks good, thank you!
More information about the dev
mailing list