netdev
[Top] [All Lists]

the logic behind rt_hash_code()

To: netdev@xxxxxxxxxxx
Subject: the logic behind rt_hash_code()
From: "Bin Ren" <bin_ren@xxxxxxxxxxxxx>
Date: Thu, 15 Aug 2002 23:56:05 -0600
Reply-to: bin_ren@xxxxxxxxxxxxx
Sender: owner-netdev@xxxxxxxxxxx
Hi, here I have a question:

When
we are trying to find out the IP routing info while sending a packet, that
time, first we try to find if there's any match in the routing Hash Bucket
by calling ip_route_output ( ) function. If not found, then we call
ip_rout_output_slow ( )
function which looks for the FIB table. Now in the first case where we
search in the rt_hash_buscket, we first find out a hash Number by calling
the function
rt_hash_code ( ). I don't understand the logic in finding out the hash
number. They are doing so many exoring, shifting operations to find the
hash Number. Does anyone know
the logic of finding the Hash function? Can U describe me that???

Thanks in advance.

Laudney Ren



<Prev in Thread] Current Thread [Next in Thread>
  • the logic behind rt_hash_code(), Bin Ren <=