diff mbox

[RFC] net/core: Delay neighbor only if it has been used after confirmed

Message ID 1252599707.5980.13.camel@fnki-nb00130
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Jens Rosenboom Sept. 10, 2009, 4:21 p.m. UTC
On Wed, 2009-09-02 at 21:22 +0900, YOSHIFUJI Hideaki wrote:
[...]
> And, this "if" for REACHABLE->DELAY may be completely needless.
> Timer in REACHABLE is only for state transition for toward REACHABLE
> or STALE.

I did some testing with the following patch, which works fine for me, so
I propose this one now instead of my previous one. I still have no real
idea about the non-IPv6 implications of this, though.

---



--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

Jens Rosenboom Sept. 15, 2009, 10:07 a.m. UTC | #1
On Thu, 2009-09-10 at 18:21 +0200, Jens Rosenboom wrote:
> On Wed, 2009-09-02 at 21:22 +0900, YOSHIFUJI Hideaki wrote:
> [...]
> > And, this "if" for REACHABLE->DELAY may be completely needless.
> > Timer in REACHABLE is only for state transition for toward REACHABLE
> > or STALE.
> 
> I did some testing with the following patch, which works fine for me, so
> I propose this one now instead of my previous one. I still have no real
> idea about the non-IPv6 implications of this, though.
> 
> ---
> 
> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
> index e587e68..f61926f 100644
> --- a/net/core/neighbour.c
> +++ b/net/core/neighbour.c
> @@ -819,13 +819,6 @@ static void neigh_timer_handler(unsigned long arg)
>  				   neigh->confirmed + neigh->parms->reachable_time)) {
>  			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_PRINTK2("neigh %p is delayed.\n", neigh);
> -			neigh->nud_state = NUD_DELAY;
> -			neigh->updated = jiffies;
> -			neigh_suspect(neigh);
> -			next = now + neigh->parms->delay_probe_time;
>  		} else {
>  			NEIGH_PRINTK2("neigh %p is suspected.\n", neigh);
>  			neigh->nud_state = NUD_STALE;
> 

Hi David, what are your thoughts on this one? There is IMHO a real bug
to fix, namely sending tons of repeated neighbor solicitations when
there is no actual traffic to be sent, so this should qualify to go into
2.6.32. Do you want to wait for further comments or should I submit this
for net-2.6 so it can get some testing?


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
David Miller Sept. 15, 2009, 10:13 a.m. UTC | #2
From: Jens Rosenboom <jens@mcbone.net>
Date: Tue, 15 Sep 2009 12:07:26 +0200

> On Thu, 2009-09-10 at 18:21 +0200, Jens Rosenboom wrote:
>> On Wed, 2009-09-02 at 21:22 +0900, YOSHIFUJI Hideaki wrote:
>> [...]
>> > And, this "if" for REACHABLE->DELAY may be completely needless.
>> > Timer in REACHABLE is only for state transition for toward REACHABLE
>> > or STALE.
>> 
>> I did some testing with the following patch, which works fine for me, so
>> I propose this one now instead of my previous one. I still have no real
>> idea about the non-IPv6 implications of this, though.
>> 
>> ---
>> 
>> diff --git a/net/core/neighbour.c b/net/core/neighbour.c
>> index e587e68..f61926f 100644
>> --- a/net/core/neighbour.c
>> +++ b/net/core/neighbour.c
>> @@ -819,13 +819,6 @@ static void neigh_timer_handler(unsigned long arg)
>>  				   neigh->confirmed + neigh->parms->reachable_time)) {
>>  			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_PRINTK2("neigh %p is delayed.\n", neigh);
>> -			neigh->nud_state = NUD_DELAY;
>> -			neigh->updated = jiffies;
>> -			neigh_suspect(neigh);
>> -			next = now + neigh->parms->delay_probe_time;
>>  		} else {
>>  			NEIGH_PRINTK2("neigh %p is suspected.\n", neigh);
>>  			neigh->nud_state = NUD_STALE;
>> 
> 
> Hi David, what are your thoughts on this one? There is IMHO a real bug
> to fix, namely sending tons of repeated neighbor solicitations when
> there is no actual traffic to be sent, so this should qualify to go into
> 2.6.32. Do you want to wait for further comments or should I submit this
> for net-2.6 so it can get some testing?

I'm waiting for Yoshifuji's feedback to your latest patch.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index e587e68..f61926f 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -819,13 +819,6 @@  static void neigh_timer_handler(unsigned long arg)
 				   neigh->confirmed + neigh->parms->reachable_time)) {
 			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_PRINTK2("neigh %p is delayed.\n", neigh);
-			neigh->nud_state = NUD_DELAY;
-			neigh->updated = jiffies;
-			neigh_suspect(neigh);
-			next = now + neigh->parms->delay_probe_time;
 		} else {
 			NEIGH_PRINTK2("neigh %p is suspected.\n", neigh);
 			neigh->nud_state = NUD_STALE;