netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: Kuzin Andrey <kuzinandrey@yandex.ru>, netfilter-devel@vger.kernel.org
Subject: Re: size calculation wasted cpu time
Date: Mon, 16 Mar 2009 15:14:12 +0100	[thread overview]
Message-ID: <49BE5EB4.8050504@trash.net> (raw)
In-Reply-To: <49BE5CD5.5000808@netfilter.org>

Pablo Neira Ayuso wrote:
> Kuzin Andrey wrote:
>> In /net/netfilter/nfnetlink_queue.c every call of nfqnl_build_packet_message()
>> make series of call nla_total_size() for 'size' calculations.
>> I think 'size' is constant value for kernel build and may be define static
>> variable for this ?
> 
> We can calculate this during the module initialization, brave to cook a
> patch for it?

The compiler should realize its constant and perform the calculation
at calculation time.

  reply	other threads:[~2009-03-16 14:14 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-16 13:02 size calculation wasted cpu time Kuzin Andrey
2009-03-16 14:06 ` Pablo Neira Ayuso
2009-03-16 14:14   ` Patrick McHardy [this message]
2009-07-24 18:55 ` Jan Engelhardt
2009-07-25  5:10   ` Re[2]: " Kuzin Andrey
2009-07-25 23:41     ` Henrik Nordstrom

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=49BE5EB4.8050504@trash.net \
    --to=kaber@trash.net \
    --cc=kuzinandrey@yandex.ru \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    /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).