]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: bonding: Fix transmit load balancing in balance-alb mode
authorKosuke Tatsukawa <tatsu@ab.jp.nec.com>
Thu, 20 Jul 2017 05:20:40 +0000 (05:20 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2017 15:33:56 +0000 (08:33 -0700)
[ Upstream commit cbf5ecb305601d063dc94a57680dfbc3f96c188d ]

balance-alb mode used to have transmit dynamic load balancing feature
enabled by default.  However, transmit dynamic load balancing no longer
works in balance-alb after commit 8b426dc54cf4 ("bonding: remove
hardcoded value").

Both balance-tlb and balance-alb use the function bond_do_alb_xmit() to
send packets.  This function uses the parameter tlb_dynamic_lb.
tlb_dynamic_lb used to have the default value of 1 for balance-alb, but
now the value is set to 0 except in balance-tlb.

Re-enable transmit dyanmic load balancing by initializing tlb_dynamic_lb
for balance-alb similar to balance-tlb.

Fixes: 8b426dc54cf4 ("bonding: remove hardcoded value")
Signed-off-by: Kosuke Tatsukawa <tatsu@ab.jp.nec.com>
Acked-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/bonding/bond_main.c

index 8ab6bdbe16820dd3e56ec517838903bedda515de..619c6f8d814250278057b0e173a1902dda0c0a28 100644 (file)
@@ -4598,7 +4598,7 @@ static int bond_check_params(struct bond_params *params)
        }
        ad_user_port_key = valptr->value;
 
-       if (bond_mode == BOND_MODE_TLB) {
+       if ((bond_mode == BOND_MODE_TLB) || (bond_mode == BOND_MODE_ALB)) {
                bond_opt_initstr(&newval, "default");
                valptr = bond_opt_parse(bond_opt_get(BOND_OPT_TLB_DYNAMIC_LB),
                                        &newval);