netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail.com>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Patrick McHardy <kaber@trash.net>, netfilter-devel@vger.kernel.org
Subject: Re: [PATCH] netfilter: use idr instead of list to speed up packet lookup by id
Date: Wed, 7 Apr 2010 21:42:23 +0800	[thread overview]
Message-ID: <o2v412e6f7f1004070642u2a414b82w9262fce18f162b30@mail.gmail.com> (raw)
In-Reply-To: <1270643136.2091.1013.camel@edumazet-laptop>

On Wed, Apr 7, 2010 at 8:25 PM, Eric Dumazet <eric.dumazet@gmail.com> wrote:
>
> Yes, a hash table would be good, but cost 8 bytes per slot.
>
> Changli, did you tried RBL tree ? It might fit better both your needs
> and Patrick concerns...

I don't think rbtree is better than idr. rbtree's time complexity is
O(log2(n)), but idr is a kind of radix tree with O(1) time complexity.

-- 
Regards,
Changli Gao(xiaosuo@gmail.com)
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2010-04-07 13: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 [this message]
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

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=o2v412e6f7f1004070642u2a414b82w9262fce18f162b30@mail.gmail.com \
    --to=xiaosuo@gmail.com \
    --cc=eric.dumazet@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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).