Revision 04632fd7 nest/neighbor.c

View differences:

nest/neighbor.c
45 45
#include "lib/resource.h"
46 46

  
47 47
#define NEIGH_HASH_SIZE 256
48
#define NEIGH_HASH_OFFSET 24
48 49

  
49 50
static slab *neigh_slab;
50 51
static list sticky_neigh_list, neigh_hash_table[NEIGH_HASH_SIZE];
......
52 53
static inline uint
53 54
neigh_hash(struct proto *p, ip_addr *a)
54 55
{
55
  return (p->hash_key ^ ipa_hash(*a)) & (NEIGH_HASH_SIZE-1);
56
  return (p->hash_key ^ ipa_hash(*a)) >> NEIGH_HASH_OFFSET;
56 57
}
57 58

  
58 59
static int

Also available in: Unified diff