Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754703AbdGTFdN convert rfc822-to-8bit (ORCPT ); Thu, 20 Jul 2017 01:33:13 -0400 Received: from tyo161.gate.nec.co.jp ([114.179.232.161]:57976 "EHLO tyo161.gate.nec.co.jp" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751889AbdGTFdM (ORCPT ); Thu, 20 Jul 2017 01:33:12 -0400 X-Greylist: delayed 710 seconds by postgrey-1.27 at vger.kernel.org; Thu, 20 Jul 2017 01:33:11 EDT From: Kosuke Tatsukawa To: Jay Vosburgh , Veaceslav Falico , Andy Gospodarek CC: "netdev@vger.kernel.org" , "linux-kernel@vger.kernel.org" Subject: [PATCH] net: bonding: Fix transmit load balancing in balance-alb mode Thread-Topic: [PATCH] net: bonding: Fix transmit load balancing in balance-alb mode Thread-Index: AdMBF+0l1/nJQJTNQECs98FSIUAPjQ== Date: Thu, 20 Jul 2017 05:20:40 +0000 Message-ID: <17EC94B0A072C34B8DCF0D30AD16044A0296FEF5@BPXM09GP.gisp.nec.co.jp> Accept-Language: ja-JP, en-US Content-Language: ja-JP X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.34.125.78] Content-Type: text/plain; charset="iso-2022-jp" Content-Transfer-Encoding: 8BIT MIME-Version: 1.0 X-TM-AS-MML: disable Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1313 Lines: 32 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. Signed-off-by: Kosuke Tatsukawa Cc: stable@vger.kernel.org --- drivers/net/bonding/bond_main.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c index 14ff622..181839d 100644 --- a/drivers/net/bonding/bond_main.c +++ b/drivers/net/bonding/bond_main.c @@ -4596,7 +4596,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);