[ovs-dev] [tags 2/3] bond: Stop using tags.

Ben Pfaff blp at nicira.com
Fri Aug 2 17:33:24 UTC 2013


On Thu, Aug 01, 2013 at 07:08:33PM -0700, Ethan Jackson wrote:
> This patch transitions bonding away from using tags as required by
> future patches.
> 
> Signed-off-by: Ethan Jackson <ethan at nicira.com>

I am not sure whether the new call to bond_entry_reset() in
bond_slave_register() is really necessary because tags were removed
(bond_entry_reset() doesn't cause revalidation, for example), or whether
it is a bug fix or, arguably, a refinement of existing behavior to
ensure that all traffic is redistributed across all the slaves.  If it's
the latter, then it deserves a commit of its own to call out the
improvement.

Same for the new call to bond_entry_reset() in bond_slave_unregister(),
except that there we can also delete the later code:
    if (bond->hash) {
        struct bond_entry *e;
        for (e = bond->hash; e <= &bond->hash[BOND_MASK]; e++) {
            if (e->slave == slave) {
                e->slave = NULL;
            }
        }
    }
because bond_entry_reset() just cleared all the slaves to NULL.

The existing code paths that set ofproto->backer->need_revalidate don't
bother to check whether it's nonzero first, but the new ones added here
in patch 1 and 2 do.  It's not really important which way we do it, but
it's simpler not to check and the existing code doesn't check, so I'd
rather that new code doesn't too.  (If you think it's important, then we
could use a bitmask and therefore track multiple reasons.)

With those comments,
Acked-by: Ben Pfaff <blp at nicira.com>

Thanks,

Ben.



More information about the dev mailing list