All of lore.kernel.org
 help / color / mirror / Atom feed
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:16:42 +0200	[thread overview]
Message-ID: <4BBC93CA.4000207@trash.net> (raw)
In-Reply-To: <m2k412e6f7f1004070707sd456c5d1v567f9dca021397a2@mail.gmail.com>

Changli Gao wrote:
> On Wed, Apr 7, 2010 at 9:40 PM, Patrick McHardy <kaber@trash.net> wrote:
>> 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.
>>
> 
> How about keeping the old behavior by default, and replace the single
> list with idr when an unorder vedict is received.

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.


  reply	other threads:[~2010-04-07 14:16 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 [this message]
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=4BBC93CA.4000207@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.