| To: | davem@xxxxxxxxxxxxx (David S. Miller) |
|---|---|
| Subject: | Re: [5/6]: Dynamic neigh hash table growth |
| From: | Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx> |
| Date: | Mon, 27 Sep 2004 21:33:34 +1000 |
| Cc: | laforge@xxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <20040923225127.10b0ef68.davem@xxxxxxxxxxxxx> |
| Organization: | Core |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | tin/1.7.4-20040225 ("Benbecula") (UNIX) (Linux/2.4.27-hx-1-686-smp (i686)) |
David S. Miller <davem@xxxxxxxxxxxxx> wrote:
>
> +static void neigh_hash_grow(struct neigh_table *tbl, unsigned long
> new_entries)
> +{
> + struct neighbour **new_hash, **old_hash;
> + unsigned int i, new_hash_mask, old_entries;
> +
> + BUG_ON(new_entries & (new_entries - 1));
> + new_hash = neigh_hash_alloc(new_entries);
Perhaps it'd be better to bound it based on MAX_ORDER rather than waiting
for neigh_hash_alloc() to fail?
Cheers,
--
Visit Openswan at http://www.openswan.org/
Email: Herbert Xu ~{PmV>HI~} <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 2.6] natsemi.c NAPI, Robert Olsson |
|---|---|
| Next by Date: | Re: [6/6]: jenkins hash for neigh, Herbert Xu |
| Previous by Thread: | Re: [5/6]: Dynamic neigh hash table growth, David S. Miller |
| Next by Thread: | Re: [5/6]: Dynamic neigh hash table growth, David S. Miller |
| Indexes: | [Date] [Thread] [Top] [All Lists] |