[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <49221929.7060504@candelatech.com>
Date: Mon, 17 Nov 2008 17:23:53 -0800
From: Ben Greear <greearb@...delatech.com>
To: Rick Jones <rick.jones2@...com>
CC: netdev@...r.kernel.org, Patrick McHardy <kaber@...sh.net>
Subject: Re: ARP table question
Rick Jones wrote:
>> +static unsigned long neigh_rand_retry(struct neighbour* neigh) {
>> + if (neigh->parms->retrans_rand_backoff) {
>> + return net_random() % neigh->parms->retrans_rand_backoff;
>> + }
>> + return 0;
>> +}
>> +
>> /* Called when a timer expires for a neighbour entry. */
>
> I thought that mod was something we tried to avoid? Could you instead
> use something that isn't random but perhaps varies among all the
> requests? Say some of the low-order bits of the IP being resolved?
This is only called when we are going to retransmit an ARP, which shouldn't
be in any sort of hot path, so I figured MOD was fine.
The net_random is a very cheap method (last I checked), as well.
So, I think that part is OK as it is, but I'm open to
persuasion :)
Thanks,
Ben
--
Ben Greear <greearb@...delatech.com>
Candela Technologies Inc http://www.candelatech.com
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists