netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Robert Olsson <Robert.Olsson@data.slu.se>
To: "David S. Miller" <davem@davemloft.net>
Cc: Robert Olsson <Robert.Olsson@data.slu.se>, netdev@oss.sgi.com
Subject: Re: Move fib_alias out of fib_hash.c
Date: Wed, 29 Sep 2004 23:30:48 +0200	[thread overview]
Message-ID: <16731.10632.290408.265135@robur.slu.se> (raw)
In-Reply-To: <20040929125359.12a00ba7.davem@davemloft.net>


David S. Miller writes:

 > You cannot find the longest matching prefix and just use that.
 > 
 > Rather, you must iterate through all matching prefixes in the
 > table from longest to shortest, trying fib_semantic_match() on
 > each one until it says OK.

 You're right we have to match semantics then first after that return 
 longest prefix to comply w. current matching.


 > This makes using a new algorithm very non-trivial.

 Yes and will take resources compared to simple longest prefix.

 > Probably what you should do is keep an array on the function
 > stack, recording shorter prefix entries you see on your walk
 > down to the longest matching prefix.  Then you process the array
 > one entry at a time back to the root, trying fib_semantic_match()
 > on each one.

 We have backtracking as we search to leaves and as leaves does not 
 always has a matching prefix.  So we have to look into how semantics 
 match can be done here instead and backtrack until we got a semantics 
 match. Was about to test w. ipv6 to start with due to ipv4 complexity.
 Anyway ipv4 fib-code is cleaner now.

 Cheers.
						--ro
  

      parent reply	other threads:[~2004-09-29 21:30 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-29  4:47 Move fib_alias out of fib_hash.c David S. Miller
2004-09-29 15:20 ` Robert Olsson
2004-09-29 19:53   ` David S. Miller
2004-09-29 21:20     ` Steven Blake
2004-09-29 21:27       ` David S. Miller
2004-09-29 22:09         ` Andi Kleen
2004-09-29 22:24           ` Ben Greear
2004-09-30  8:08             ` Andi Kleen
2004-09-30 15:51               ` Ben Greear
2004-09-29 21:43       ` Robert Olsson
2004-09-29 21:30     ` Robert Olsson [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=16731.10632.290408.265135@robur.slu.se \
    --to=robert.olsson@data.slu.se \
    --cc=davem@davemloft.net \
    --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).