From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: Jens Rosenboom <me@jayr.de>
Cc: Linux Network Developers <netdev@vger.kernel.org>,
YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [RFC] net/core: Delay neighbor only if it has been used after confirmed
Date: Wed, 02 Sep 2009 21:22:51 +0900 [thread overview]
Message-ID: <4A9E639B.20907@linux-ipv6.org> (raw)
In-Reply-To: <1251883079.5813.18.camel@fnki-nb00130>
Hello.
Jens Rosenboom wrote:
> When doing some IPv6 testing with the router advertising a small (e.g. 5
> seconds) reachable time, I noticed that after the traffic has stopped,
> hosts continue to exchange ND packets every 10 seconds. This is due to
> neigh_timer_handler() only checking neigh->used and puts a neighbor into
> NUD_DELAY state even if neigh->confirmed may be >= neigh->used.
Well, as you can see in neigh_periodic_timer():
| if (time_before(n->used, n->confirmed))
| n->used = n->confirmed;
time_after_eq(n->used, n->confirmed) should be taken valid;
confirmed <= used <= now <= jiffies
> The following patch for net-next-2.6 fixes this behaviour for my IPv6
> setup, however I would like to hear some opinion on whether this might
> have some negative influence on other protocols that use this code.
>
> I also think that it would make more sense to compute the time for the
> delay timer starting from neigh->used instead of using now (second part
> of the patch).
okay, but I would rather have this in another patch.
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index 5bc4ad5..ca20162 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -820,12 +820,13 @@ static void neigh_timer_handler(unsigned long arg)
> NEIGH_PRINTK2("neigh %p is still alive.\n", neigh);
> next = neigh->confirmed + neigh->parms->reachable_time;
> } else if (time_before_eq(now,
> - neigh->used + neigh->parms->delay_probe_time)) {
> + neigh->used + neigh->parms->delay_probe_time) &&
> + time_after(neigh->confirmed, neigh->used)) {
> NEIGH_PRINTK2("neigh %p is delayed.\n", neigh);
> neigh->nud_state = NUD_DELAY;
I think your change should be
| time_after(neigh->used, neigh->confirmed)
or
| time_before(neigh->confirmed, neigh->used)
("_eq" is removed because there is a little chance
that the neighbor had been confirmed just before it was
used. It is not interesting for us at this moment.)
No?
And, this "if" for REACHABLE->DELAY may be completely needless.
Timer in REACHABLE is only for state transition for toward REACHABLE
or STALE.
--yoshfuji
next prev parent reply other threads:[~2009-09-02 12:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 9:17 [RFC] net/core: Delay neighbor only if it has been used after confirmed Jens Rosenboom
2009-09-02 12:22 ` YOSHIFUJI Hideaki [this message]
2009-09-02 13:03 ` Jens Rosenboom
2009-09-10 16:21 ` Jens Rosenboom
2009-09-15 10:07 ` Jens Rosenboom
2009-09-15 10:13 ` David Miller
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=4A9E639B.20907@linux-ipv6.org \
--to=yoshfuji@linux-ipv6.org \
--cc=me@jayr.de \
--cc=netdev@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.