From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Desnoyers Subject: Re: [PATCH v2] netfilter: save the hash of the tuple in the original direction for latter use Date: Thu, 19 Aug 2010 12:11:12 -0400 Message-ID: <20100819161112.GA24357@Krystal> References: <1282228389-3029-1-git-send-email-xiaosuo@gmail.com> <20100819152149.GA19744@Krystal> <1282232786.2549.60.camel@edumazet-laptop> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: Changli Gao , Patrick McHardy , "David S. Miller" , netfilter-devel@vger.kernel.org, netdev@vger.kernel.org To: Eric Dumazet Return-path: Content-Disposition: inline In-Reply-To: <1282232786.2549.60.camel@edumazet-laptop> Sender: netdev-owner@vger.kernel.org List-Id: netfilter-devel.vger.kernel.org * Eric Dumazet (eric.dumazet@gmail.com) wrote: > Le jeudi 19 ao=FBt 2010 =E0 23:35 +0800, Changli Gao a =E9crit : >=20 > >=20 > > In fact, I don't know the reason clearly. This code is derived from > > the older one. Maybe there isn't enough entropy when initializing. > >=20 >=20 > Yes, we wanted to initialize these random data as late as possible, t= hat > is when the first entry is added in conntrack hash. Ah, I see. But I think the static variable should stay declared outside of the function scope, with a nice comment explaining why it's not initialized at init-time. Hiding global state in function code is usually frowned upon. Thanks, Mathieu --=20 Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com