Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38559
b: refs/heads/master
c: c5e2946
h: refs/heads/master
i:
  38557: 546499a
  38555: c597b96
  38551: 0f5b3a2
  38543: 7304426
  38527: 12f6d91
v: v3
  • Loading branch information
Julian Anastasov authored and David S. Miller committed Oct 4, 2006
1 parent 4ac128b commit 65347f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1e0c14f49d6b393179f423abbac47f85618d3d46
refs/heads/master: c5e29460f5f9eb189cab5d9fdaa137e64f7734b6
12 changes: 6 additions & 6 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,12 +344,12 @@ struct neighbour *neigh_lookup(struct neigh_table *tbl, const void *pkey,
{
struct neighbour *n;
int key_len = tbl->key_len;
u32 hash_val = tbl->hash(pkey, dev) & tbl->hash_mask;
u32 hash_val = tbl->hash(pkey, dev);

NEIGH_CACHE_STAT_INC(tbl, lookups);

read_lock_bh(&tbl->lock);
for (n = tbl->hash_buckets[hash_val]; n; n = n->next) {
for (n = tbl->hash_buckets[hash_val & tbl->hash_mask]; n; n = n->next) {
if (dev == n->dev && !memcmp(n->primary_key, pkey, key_len)) {
neigh_hold(n);
NEIGH_CACHE_STAT_INC(tbl, hits);
Expand All @@ -364,12 +364,12 @@ struct neighbour *neigh_lookup_nodev(struct neigh_table *tbl, const void *pkey)
{
struct neighbour *n;
int key_len = tbl->key_len;
u32 hash_val = tbl->hash(pkey, NULL) & tbl->hash_mask;
u32 hash_val = tbl->hash(pkey, NULL);

NEIGH_CACHE_STAT_INC(tbl, lookups);

read_lock_bh(&tbl->lock);
for (n = tbl->hash_buckets[hash_val]; n; n = n->next) {
for (n = tbl->hash_buckets[hash_val & tbl->hash_mask]; n; n = n->next) {
if (!memcmp(n->primary_key, pkey, key_len)) {
neigh_hold(n);
NEIGH_CACHE_STAT_INC(tbl, hits);
Expand Down Expand Up @@ -1998,12 +1998,12 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
int rc, h, s_h = cb->args[1];
int idx, s_idx = idx = cb->args[2];

read_lock_bh(&tbl->lock);
for (h = 0; h <= tbl->hash_mask; h++) {
if (h < s_h)
continue;
if (h > s_h)
s_idx = 0;
read_lock_bh(&tbl->lock);
for (n = tbl->hash_buckets[h], idx = 0; n; n = n->next, idx++) {
if (idx < s_idx)
continue;
Expand All @@ -2016,8 +2016,8 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
goto out;
}
}
read_unlock_bh(&tbl->lock);
}
read_unlock_bh(&tbl->lock);
rc = skb->len;
out:
cb->args[1] = h;
Expand Down

0 comments on commit 65347f0

Please sign in to comment.