From: David Miller Subject: Re: [PATCHv2 net] bonding: discard lowest hash bit for 802.3ad layer3+4 Date: Wed, 08 Nov 2017 11:30:13 +0900 (KST) Message-ID: <20171108.113013.2184085922808970912.davem@davemloft.net> References: <1509930117-27775-1-git-send-email-liuhangbin@gmail.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, pabeni@redhat.com, edumazet@google.com To: liuhangbin@gmail.com Return-path: Received: from shards.monkeyblade.net ([184.105.139.130]:60728 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751717AbdKHCat (ORCPT ); Tue, 7 Nov 2017 21:30:49 -0500 In-Reply-To: <1509930117-27775-1-git-send-email-liuhangbin@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Hangbin Liu Date: Mon, 6 Nov 2017 09:01:57 +0800 > After commit 07f4c90062f8 ("tcp/dccp: try to not exhaust ip_local_port_range > in connect()"), we will try to use even ports for connect(). Then if an > application (seen clearly with iperf) opens multiple streams to the same > destination IP and port, each stream will be given an even source port. > > So the bonding driver's simple xmit_hash_policy based on layer3+4 addressing > will always hash all these streams to the same interface. And the total > throughput will limited to a single slave. > > Change the tcp code will impact the whole tcp behavior, only for bonding > usage. Paolo Abeni suggested fix this by changing the bonding code only, > which should be more reasonable, and less impact. > > Fix this by discarding the lowest hash bit because it contains little entropy. > After the fix we can re-balance between slaves. > > Signed-off-by: Paolo Abeni > Signed-off-by: Hangbin Liu Applied and queued up for -stable, thank you.