All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wang Jian <lark@linux.net.cn>
To: netfilter-devel@lists.netfilter.org
Subject: Re[2]: Iptables 1.3.1 still not very fast.
Date: Sat, 02 Apr 2005 14:06:12 +0800	[thread overview]
Message-ID: <20050402135425.0210.LARK@linux.net.cn> (raw)
In-Reply-To: <20050402054112.GA20287@oknodo.bof.de>

Hi Patrick Schaaf,

The best general practice here may be always using subnets. IP is IP/32,
iprange is IPs + Subnets + IPs then IP/32's + Subnets + IP/32's.

But best general practice is not best practice for special case. You not
dumb "add each address in the range" answer is a special case for small
set. 'set' match has ip hash to support this. If your sets are in the
same B class subnet, you'd better go this way for fastest lookup.

On Sat, 2 Apr 2005 07:41:12 +0200, Patrick Schaaf <bof@bof.de> wrote:

> > Maybe a dumb question. But how do you hash on a range?
> 
> Not a dumb question at all, but here's a dumb answer: you add each address
> in the range. This is wholly practical for small ranges, and half way
> practical for larger ranges which need to be configured only now and then.
> 
> Alternatively, in the context of ipset, you could implement a range or
> set-of-ranges subtype of ipset, using suitable data structures,
> which would be some kind of tree. For fully general set-of-ip-nets
> matching, the data structure would most likely resemble what's used
> in routing table implementations.
> 
> best regards
>   Partick



-- 
  lark

  reply	other threads:[~2005-04-02  6:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-01 21:52 Iptables 1.3.1 still not very fast Robert de Bath
2005-04-02  4:53 ` Wang Jian
2005-04-02  5:32   ` Peter Enderborg
2005-04-02  5:41     ` Patrick Schaaf
2005-04-02  6:06       ` Wang Jian [this message]
2005-04-02  5:49     ` Re[2]: " Wang Jian
2005-04-02  9:27   ` Robert de Bath
2005-04-03 21:11     ` Henrik Nordstrom
2005-04-02  9:10 ` Henrik Nordstrom
2005-04-02 10:11   ` Robert de Bath
2005-04-28 10:36 ` Harald Welte

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=20050402135425.0210.LARK@linux.net.cn \
    --to=lark@linux.net.cn \
    --cc=netfilter-devel@lists.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 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.