From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH net-next] netns: get more entropy from net_hash_mix() Date: Sat, 23 Jun 2018 11:00:31 +0900 (KST) Message-ID: <20180623.110031.1772156487037263440.davem@davemloft.net> References: <20180622232747.145594-1-edumazet@google.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=iso-8859-2 Content-Transfer-Encoding: 8BIT Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com To: edumazet@google.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:34720 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933977AbeFWCAd (ORCPT ); Fri, 22 Jun 2018 22:00:33 -0400 In-Reply-To: <20180622232747.145594-1-edumazet@google.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Eric Dumazet Date: Fri, 22 Jun 2018 16:27:47 -0700 > struct net are effectively allocated from order-1 pages on x86, > with one object per slab, meaning that the 13 low order bits > of their addresses are zero. > > Once shifted by L1_CACHE_SHIFT, this leaves 7 zero-bits, > meaning that net_hash_mix() does not help spreading > objects on various hash tables. > > For example, TCP listen table has 32 buckets, meaning that > all netns use the same bucket for port 80 or port 443. > > Signed-off-by: Eric Dumazet > Reported-by: Maciej Żenczykowski Good catch, applied, thanks Eric.