Skip to content

Commit f48f70b

Browse files
committed
vswitchd: Fix broken load rebalancing with balance-tcp.
Load rebalancing was not working in balance-tcp mode due to mistaken balance-slb only assumptions leftover in the bridge code.
1 parent 028415b commit f48f70b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

vswitchd/bridge.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3073,7 +3073,7 @@ bridge_account_flow_ofhook_cb(const struct flow *flow, tag_type tags,
30733073
if (nl_attr_type(a) == ODP_ACTION_ATTR_OUTPUT) {
30743074
struct port *out_port = port_from_dp_ifidx(br, nl_attr_get_u32(a));
30753075
if (out_port && out_port->n_ifaces >= 2 &&
3076-
out_port->bond_mode == BM_SLB) {
3076+
out_port->bond_mode != BM_AB) {
30773077
uint16_t vlan = (flow->vlan_tci
30783078
? vlan_tci_to_vid(flow->vlan_tci)
30793079
: OFP_VLAN_NONE);
@@ -3098,7 +3098,7 @@ bridge_account_checkpoint_ofhook_cb(void *br_)
30983098
now = time_msec();
30993099
for (i = 0; i < br->n_ports; i++) {
31003100
struct port *port = br->ports[i];
3101-
if (port->n_ifaces > 1 && port->bond_mode == BM_SLB
3101+
if (port->n_ifaces > 1 && port->bond_mode != BM_AB
31023102
&& now >= port->bond_next_rebalance) {
31033103
port->bond_next_rebalance = now + port->bond_rebalance_interval;
31043104
bond_rebalance_port(port);
@@ -3441,7 +3441,7 @@ bond_shift_load(struct slave_balance *from, struct slave_balance *to,
34413441
struct port *port = from->iface->port;
34423442
uint64_t delta = hash->tx_bytes;
34433443

3444-
assert(port->bond_mode == BM_SLB);
3444+
assert(port->bond_mode != BM_AB);
34453445

34463446
VLOG_INFO("bond %s: shift %"PRIu64"kB of load (with hash %td) "
34473447
"from %s to %s (now carrying %"PRIu64"kB and "

0 commit comments

Comments
 (0)