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 16:41:36 +0200 [thread overview]
Message-ID: <4BBC99A0.1010408@trash.net> (raw)
In-Reply-To: <y2u412e6f7f1004070733i3635487bh81cfac3e6a64474f@mail.gmail.com>
Changli Gao wrote:
> On Wed, Apr 7, 2010 at 10:16 PM, Patrick McHardy <kaber@trash.net> wrote:
>> You only know that during runtime, so this will get more complicated
>> than necessary. Why not simply use a hash table with a size specified
>> by userspace in the queue creation command? The default behaviour
>> would be a size of 1, which is equivalent to the currently used single
>> list.
>>
>
> We'd better not expose too many internal implementation details to
> userspace. If we do so, we can't change its implementation easily
> later. And letting user choose the size of hash table is much like the
> orginal epoll(2) design, there will be security consern, such as too
> much memory usage.
Userspace queueing is limited to root, so there's no concern about
memory usage. Regarding implementation details: alternatively add
a flag to specify out of order handling and size the hash table
based on the maximum number of queue entries.
prev parent reply other threads:[~2010-04-07 14:42 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
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 [this message]
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=4BBC99A0.1010408@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.