netdev
[Top] [All Lists]

Move fib_alias out of fib_hash.c

To: "David S. Miller" <davem@xxxxxxxxxxxxx>
Subject: Move fib_alias out of fib_hash.c
From: Robert Olsson <Robert.Olsson@xxxxxxxxxxx>
Date: Wed, 29 Sep 2004 17:20:45 +0200
Cc: netdev@xxxxxxxxxxx, robert.olsson@xxxxxxxxxxx
In-reply-to: <20040928214722.11aef8e0.davem@xxxxxxxxxxxxx>
References: <20040928214722.11aef8e0.davem@xxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
David S. Miller writes:
 > 
 > Ok, this begins the movement of fib_alias object handling
 > out of fib_hash.c  The idea is to make fib_hash.c purely
 > a longest-matching-prefix lookup implementation.
 > 
 > Look at fn_hash_lookup() after these changes, and you'll
 > get an idea of how I want the whole fib_hash.c file to look
 > in the end.


Exactly,
  we can interface new lookups cleanly. For a trie something like:

static int
fn_trie_lookup(struct fib_table *tb, const struct flowi *flp, struct fib_result 
*res)
{
        struct trie *t = (struct trie *) tb->tb_data;
        struct list_head *fah=NULL;
        int err=1, plen, r;

        r = trie_pfx_get(t, flp->fl4_dst, &fah, &plen);

        if (r && fah) 
                err = fib_semantic_match(fah,
                                         flp, res,
                                         plen);
        return err;
}



Cheers.
                                                --ro

<Prev in Thread] Current Thread [Next in Thread>