X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=lib%2Fbond.c;h=5be1bae3e2bce820a852f41e19cdd5e8787e81d8;hb=69fc54f47bbc35e81bfe2e38e57f5dcfd9858df4;hp=a9278db84291de0668197ab3833475c9071df34a;hpb=bbc13389e0385d24a6ba1c56b15baabdc5ef7b19;p=sliver-openvswitch.git diff --git a/lib/bond.c b/lib/bond.c index a9278db84..5be1bae3e 100644 --- a/lib/bond.c +++ b/lib/bond.c @@ -661,11 +661,14 @@ bond_choose_output_slave(struct bond *bond, const struct flow *flow, struct flow_wildcards *wc, uint16_t vlan) { struct bond_slave *slave; + void *aux; ovs_rwlock_rdlock(&rwlock); slave = choose_output_slave(bond, flow, wc, vlan); + aux = slave ? slave->aux : NULL; ovs_rwlock_unlock(&rwlock); - return slave; + + return aux; } /* Rebalancing. */ @@ -752,6 +755,7 @@ bond_shift_load(struct bond_entry *hash, struct bond_slave *to) to->tx_bytes += delta; /* Arrange for flows to be revalidated. */ + hash->slave = to; bond->bond_revalidate = true; }