Re: [5/6]: Dynamic neigh hash table growth
From: Krishna Kumar <hidden>
Date: 2004-09-24 20:11:58
From: Krishna Kumar <hidden>
Date: 2004-09-24 20:11:58
In neigh_hash_grow(), next need not be set to NULL. thx, - KK
+ for (i = 0; i < old_entries; i++) {
+ struct neighbour *n, *next;
+
+ next = NULL;
+ for (n = old_hash[i]; n; n = next) {
+ unsigned int hash_val = tbl->hash(n->primary_key, n->dev);
+
+ hash_val &= new_hash_mask;
+ next = n->next;
+
+ n->next = new_hash[hash_val];
+ new_hash[hash_val] = n;
+ }
+ }