From: Patrick McHardy <kaber@trash.net>
To: Changli Gao <xiaosuo@gmail.com>
Cc: netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: use idr instead of list to speed up packet lookup by id
Date: Wed, 07 Apr 2010 15:40:20 +0200 [thread overview]
Message-ID: <4BBC8B44.30208@trash.net> (raw)
In-Reply-To: <y2m412e6f7f1004070630v14118231g13847965d7d44a54@mail.gmail.com>
Changli Gao wrote:
> On Wed, Apr 7, 2010 at 7:48 PM, Patrick McHardy <kaber@trash.net> wrote:
>> Changli Gao wrote:
>>
>> I'm interested in how this affects performance for the vast majority
>> of users, which process messages in order. A simple hash table looks
>> like a better choice here since we know the maximum number of entries
>> in advance and also could have the user specify the desired hash size.
>>
>
> If there aren't much packets queued, the packet ids will be around 0,
> and idr isn't much slower.
Processing packets in order doesn't necessarily mean that there aren't
many packets queued. Its just that the current scheme is pretty much
optimal for this case since the verdict will always refer to the first
entry in the list.
>> You probably shouldn't be making the entry visible before the message
>> is successfully built and sent.
>
> I wanted to keep the changeset small. But it seems wrong.
>
next prev parent reply other threads:[~2010-04-07 13:40 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-07 3:38 [PATCH] netfilter: use idr instead of list to speed up packet lookup by id Changli Gao
2010-04-07 11:48 ` Patrick McHardy
2010-04-07 12:25 ` Eric Dumazet
2010-04-07 13:03 ` Patrick McHardy
2010-04-07 13:42 ` Changli Gao
2010-04-07 13:30 ` Changli Gao
2010-04-07 13:40 ` Patrick McHardy [this message]
2010-04-07 14:07 ` Changli Gao
2010-04-07 14:16 ` Patrick McHardy
2010-04-07 14:33 ` Changli Gao
2010-04-07 14:41 ` Patrick McHardy
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=4BBC8B44.30208@trash.net \
--to=kaber@trash.net \
--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).