Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Florian Obser
On 2022-07-22 14:27 +02, Claudio Jeker  wrote:
> On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote:
>> Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL
>> is used in many places.
>> 
>> OK?
>
> Is that a value that should be adjustable?

I don't think so, this is the amount of time that has to elapse until a
new random time for the reachability timer is calculated. This is like
three layers deep in nd6, this is not a knob that needs twiddling.

It's also not a knob that RFC 4861 specifies, let alone specifies as
twiddleable.

OK florian

>  
>> diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
>> index ff679bcb151..3decec947c4 100644
>> --- a/sys/netinet6/nd6.c
>> +++ b/sys/netinet6/nd6.c
>> @@ -88,8 +88,6 @@ TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6) nd6_list;
>>  struct  pool nd6_pool;  /* pool for llinfo_nd6 structures */
>>  int nd6_inuse;
>>  
>> -int nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL;
>> -
>>  void nd6_timer(void *);
>>  void nd6_slowtimo(void *);
>>  void nd6_expire(void *);
>> @@ -1318,7 +1316,7 @@ nd6_slowtimo(void *ignored_arg)
>>   * value gets recomputed at least once every few hours.
>>   * (RFC 2461, 6.3.4)
>>   */
>> -nd6if->recalctm = nd6_recalc_reachtm_interval;
>> +nd6if->recalctm = ND6_RECALC_REACHTM_INTERVAL;
>>  nd6if->reachable = 
>> ND_COMPUTE_RTIME(nd6if->basereachable);
>>  }
>>  }
>> 
>
> -- 
> :wq Claudio
>

-- 
I'm not entirely sure you are real.



Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Klemens Nanni
On Fri, Jul 22, 2022 at 02:27:38PM +0200, Claudio Jeker wrote:
> On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote:
> > Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL
> > is used in many places.
> > 
> > OK?
> 
> Is that a value that should be adjustable?

We can think about a sysctl, similar to nd6.c:nd6_maxnudhint aka.
net.inet6.icmp6.nd6_maxnudhint.

At the moment, this looks like dead weight in ND6 and less useless code
helps making progress.



Re: nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Claudio Jeker
On Fri, Jul 22, 2022 at 12:18:34PM +, Klemens Nanni wrote:
> Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL
> is used in many places.
> 
> OK?

Is that a value that should be adjustable?
 
> diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
> index ff679bcb151..3decec947c4 100644
> --- a/sys/netinet6/nd6.c
> +++ b/sys/netinet6/nd6.c
> @@ -88,8 +88,6 @@ TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6) nd6_list;
>  struct   pool nd6_pool;  /* pool for llinfo_nd6 structures */
>  int  nd6_inuse;
>  
> -int nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL;
> -
>  void nd6_timer(void *);
>  void nd6_slowtimo(void *);
>  void nd6_expire(void *);
> @@ -1318,7 +1316,7 @@ nd6_slowtimo(void *ignored_arg)
>* value gets recomputed at least once every few hours.
>* (RFC 2461, 6.3.4)
>*/
> - nd6if->recalctm = nd6_recalc_reachtm_interval;
> + nd6if->recalctm = ND6_RECALC_REACHTM_INTERVAL;
>   nd6if->reachable = 
> ND_COMPUTE_RTIME(nd6if->basereachable);
>   }
>   }
> 

-- 
:wq Claudio



nd6: Zap nd6_recalc_reachtm_interval indirection

2022-07-22 Thread Klemens Nanni
Only used once, so use the macro directly like ND6_SLOWTIMER_INTERVAL
is used in many places.

OK?

diff --git a/sys/netinet6/nd6.c b/sys/netinet6/nd6.c
index ff679bcb151..3decec947c4 100644
--- a/sys/netinet6/nd6.c
+++ b/sys/netinet6/nd6.c
@@ -88,8 +88,6 @@ TAILQ_HEAD(llinfo_nd6_head, llinfo_nd6) nd6_list;
 struct pool nd6_pool;  /* pool for llinfo_nd6 structures */
 intnd6_inuse;
 
-int nd6_recalc_reachtm_interval = ND6_RECALC_REACHTM_INTERVAL;
-
 void nd6_timer(void *);
 void nd6_slowtimo(void *);
 void nd6_expire(void *);
@@ -1318,7 +1316,7 @@ nd6_slowtimo(void *ignored_arg)
 * value gets recomputed at least once every few hours.
 * (RFC 2461, 6.3.4)
 */
-   nd6if->recalctm = nd6_recalc_reachtm_interval;
+   nd6if->recalctm = ND6_RECALC_REACHTM_INTERVAL;
nd6if->reachable = 
ND_COMPUTE_RTIME(nd6if->basereachable);
}
}