netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ben Greear <greearb@candelatech.com>
To: Rick Jones <rick.jones2@hp.com>
Cc: netdev@vger.kernel.org, Patrick McHardy <kaber@trash.net>
Subject: Re: ARP table question
Date: Mon, 17 Nov 2008 17:23:53 -0800	[thread overview]
Message-ID: <49221929.7060504@candelatech.com> (raw)
In-Reply-To: <4922119E.6030601@hp.com>

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@candelatech.com>
Candela Technologies Inc  http://www.candelatech.com


  reply	other threads:[~2008-11-18  1:23 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <491B1600.4080505@candelatech.com>
     [not found] ` <491B1841.9050404@candelatech.com>
2008-11-12 19:43   ` ARP table question Ben Greear
2008-11-12 22:10     ` Ben Greear
2008-11-17  3:16       ` David Miller
2008-11-17 18:17         ` Ben Greear
2008-11-18  0:33           ` Ben Greear
2008-11-18  0:51             ` Rick Jones
2008-11-18  1:23               ` Ben Greear [this message]
2008-11-18  1:39                 ` Rick Jones
2008-11-18  1:50                   ` Ben Greear
2008-11-20  8:33                     ` David Miller
2008-11-20 17:23                       ` Ben Greear
2008-11-20 17:33                         ` Benjamin LaHaise

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49221929.7060504@candelatech.com \
    --to=greearb@candelatech.com \
    --cc=kaber@trash.net \
    --cc=netdev@vger.kernel.org \
    --cc=rick.jones2@hp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).