netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Bellion and Thomas Heinz <nf@hipac.org>
To: "David S. Miller" <davem@redhat.com>
Cc: hadi@cyberus.ca, linux-net@vger.kernel.org, netdev@oss.sgi.com
Subject: Re: [RFC] High Performance Packet Classifiction for tc framework
Date: Tue, 12 Aug 2003 16:56:33 +0200	[thread overview]
Message-ID: <3F390021.5040705@hipac.org> (raw)
In-Reply-To: <20030811224050.59bc36fe.davem@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 1446 bytes --]

Hi David

You wrote:
> The ipv4 FIB hash tables tackle exactly this problem.  The resulting
> worse cast complexity is O(n_bits_in_prefix_mask).
> 
> The problem you've described is exactly the same as trying to use
> hashing for routing tables.

Yes, that's true for the 1-dimensional case. You refer to the
following algorithm, don't you?

    min_prio := infinity
    match_rule := nil
    for all list_entries e: { // at most w+1 entries where w is the bit
                              // width of the keys
        rule = lookup(hash(e), packet)  // let's assume O(1) here
        if (prio(rule) < min_prio) {
		min_prio = prio(rule)
                 match_rule = rule
        }
    }
    return match_rule

This algorithm has running time O(w).
[In fact it's O(number of different prefix lengths) which is O(w)
  in the worst case.]

But what about the d-dimensional case? If you extend this
approach to handle rules with d prefix based matches you end
up in a running time of:  O(w^d)
                          (assuming w to be the max. bit width)

This is definitely not desirable.


Regards,

+-----------------------+----------------------+
|   Michael Bellion     |     Thomas Heinz     |
| <mbellion@hipac.org>  |  <creatix@hipac.org> |
+-----------------------+----------------------+
|    High Performance Packet Classification    |
|       nf-hipac: http://www.hipac.org/        |
+----------------------------------------------+

[-- Attachment #2: Type: application/pgp-signature, Size: 251 bytes --]

      parent reply	other threads:[~2003-08-12 14:56 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-14  8:45 [RFC] High Performance Packet Classifiction for tc framework Michael Bellion and Thomas Heinz
2003-07-16  5:02 ` jamal
2003-07-17 13:13   ` Michael Bellion and Thomas Heinz
2003-08-03 18:14     ` jamal
2003-08-04 13:17       ` Michael Bellion and Thomas Heinz
2003-08-04 15:51         ` jamal
2003-08-05 22:21           ` Michael Bellion and Thomas Heinz
2003-08-07 19:58             ` jamal
2003-08-07 20:05               ` David S. Miller
2003-08-08 21:51                 ` jamal
2003-08-09  0:01                   ` David S. Miller
2003-08-11 22:39               ` Michael Bellion and Thomas Heinz
2003-08-12  2:57                 ` jamal
2003-08-12 14:56                   ` Michael Bellion and Thomas Heinz
2003-08-12 15:41                     ` jamal
2003-08-12  5:40                 ` David S. Miller
2003-08-12 14:29                   ` Jamie Lokier
2003-08-12 15:39                     ` Michael Bellion and Thomas Heinz
2003-08-15 14:28                       ` Jamie Lokier
2003-08-13 17:28                     ` Ralph Doncaster
2003-08-13 19:17                       ` Jamie Lokier
2003-08-13 21:10                         ` Ralph Doncaster
2003-08-13 23:21                           ` Jamie Lokier
2003-08-12 14:56                   ` Michael Bellion and Thomas Heinz [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=3F390021.5040705@hipac.org \
    --to=nf@hipac.org \
    --cc=davem@redhat.com \
    --cc=hadi@cyberus.ca \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@oss.sgi.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).