netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Changli Gao <xiaosuo@gmail.com>,
	Patrick McHardy <kaber@trash.net>,
	"David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
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	[thread overview]
Message-ID: <20100819161112.GA24357@Krystal> (raw)
In-Reply-To: <1282232786.2549.60.camel@edumazet-laptop>

* Eric Dumazet (eric.dumazet@gmail.com) wrote:
> Le jeudi 19 août 2010 à 23:35 +0800, Changli Gao a écrit :
> 
> > 
> > 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.
> > 
> 
> Yes, we wanted to initialize these random data as late as possible, that
> 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


-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com

  reply	other threads:[~2010-08-19 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-19 14:33 [PATCH v2] netfilter: save the hash of the tuple in the original direction for latter use Changli Gao
2010-08-19 15:21 ` Mathieu Desnoyers
2010-08-19 15:35   ` Changli Gao
2010-08-19 15:41     ` yao zhao
2010-08-19 15:46     ` Eric Dumazet
2010-08-19 16:11       ` Mathieu Desnoyers [this message]
2010-08-19 23:10         ` Changli Gao
2010-08-20 13:43           ` Mathieu Desnoyers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100819161112.GA24357@Krystal \
    --to=mathieu.desnoyers@polymtl.ca \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).