Reg: Route Cache hash key in Linux Network Code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
Hi All,
                    Can anybody explain me the following hash ket generation used in route cache lookup (route.c). I am not able to correlate on what basis from saddr, daddr and ip tos this hash key is generated to minimize bucket collisions. Again the rt_hash_rnd and rt_hash_mask are values decided at system init time from number of physical pages.
 
 static unsigned int rt_hash_code(u32 daddr, u32 saddr, u8 tos)
214 {
215         return ( jhash_3words(daddr, saddr, (u32) tos, rt_hash_rnd)
216                 & rt_hash_mask);
217 }
218
 
                      Any clarification on this pieceof code would be of great help.
 
Thanks in advance,
Pranjal

[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux