diff mbox series

ipv6: Not to probe neighbourless routes

Message ID 1566896907-5121-1-git-send-email-wang.yi59@zte.com.cn
State Rejected
Delegated to: David Miller
Headers show
Series ipv6: Not to probe neighbourless routes | expand

Commit Message

Yi Wang Aug. 27, 2019, 9:08 a.m. UTC
From: Cheng Lin <cheng.lin130@zte.com.cn>

Originally, Router Reachability Probing require a neighbour entry
existed. Commit 2152caea7196 ("ipv6: Do not depend on rt->n in
rt6_probe().") removed the requirement for a neighbour entry. And
commit f547fac624be ("ipv6: rate-limit probes for neighbourless
routes") adds rate-limiting for neighbourless routes.

And, the Neighbor Discovery for IP version 6 (IPv6)(rfc4861) says,
"
7.2.5.  Receipt of Neighbor Advertisements

When a valid Neighbor Advertisement is received (either solicited or
unsolicited), the Neighbor Cache is searched for the target's entry.
If no entry exists, the advertisement SHOULD be silently discarded.
There is no need to create an entry if none exists, since the
recipient has apparently not initiated any communication with the
target.
".

In rt6_probe(), just a Neighbor Solicitation message are transmited.
When receiving a Neighbor Advertisement, the node does nothing in a
Neighborless condition.

Not sure it's needed to create a neighbor entry in Router
Reachability Probing. And the Original way may be the right way.

This patch recover the requirement for a neighbour entry.

Signed-off-by: Cheng Lin <cheng.lin130@zte.com.cn>
---
 include/net/ip6_fib.h | 5 -----
 net/ipv6/route.c      | 5 +----
 2 files changed, 1 insertion(+), 9 deletions(-)

Comments

Eric Dumazet Aug. 27, 2019, 3:22 p.m. UTC | #1
On 8/27/19 11:08 AM, Yi Wang wrote:
> From: Cheng Lin <cheng.lin130@zte.com.cn>
> 
> Originally, Router Reachability Probing require a neighbour entry
> existed. Commit 2152caea7196 ("ipv6: Do not depend on rt->n in
> rt6_probe().") removed the requirement for a neighbour entry. And
> commit f547fac624be ("ipv6: rate-limit probes for neighbourless
> routes") adds rate-limiting for neighbourless routes.
> 
> And, the Neighbor Discovery for IP version 6 (IPv6)(rfc4861) says,
> "
> 7.2.5.  Receipt of Neighbor Advertisements
> 
> When a valid Neighbor Advertisement is received (either solicited or
> unsolicited), the Neighbor Cache is searched for the target's entry.
> If no entry exists, the advertisement SHOULD be silently discarded.
> There is no need to create an entry if none exists, since the
> recipient has apparently not initiated any communication with the
> target.
> ".
> 
> In rt6_probe(), just a Neighbor Solicitation message are transmited.
> When receiving a Neighbor Advertisement, the node does nothing in a
> Neighborless condition.
> 
> Not sure it's needed to create a neighbor entry in Router
> Reachability Probing. And the Original way may be the right way.
> 
> This patch recover the requirement for a neighbour entry.
> 
> Signed-off-by: Cheng Lin <cheng.lin130@zte.com.cn>
> ---
>  include/net/ip6_fib.h | 5 -----
>  net/ipv6/route.c      | 5 +----
>  2 files changed, 1 insertion(+), 9 deletions(-)
> 
> diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
> index 4b5656c..8c2e022 100644
> --- a/include/net/ip6_fib.h
> +++ b/include/net/ip6_fib.h
> @@ -124,11 +124,6 @@ struct rt6_exception {
>  
>  struct fib6_nh {
>  	struct fib_nh_common	nh_common;
> -
> -#ifdef CONFIG_IPV6_ROUTER_PREF
> -	unsigned long		last_probe;
> -#endif
> -
>  	struct rt6_info * __percpu *rt6i_pcpu;
>  	struct rt6_exception_bucket __rcu *rt6i_exception_bucket;
>  };
> diff --git a/net/ipv6/route.c b/net/ipv6/route.c
> index fd059e0..c4bcffc 100644
> --- a/net/ipv6/route.c
> +++ b/net/ipv6/route.c
> @@ -639,12 +639,12 @@ static void rt6_probe(struct fib6_nh *fib6_nh)
>  	nh_gw = &fib6_nh->fib_nh_gw6;
>  	dev = fib6_nh->fib_nh_dev;
>  	rcu_read_lock_bh();
> -	idev = __in6_dev_get(dev);
>  	neigh = __ipv6_neigh_lookup_noref(dev, nh_gw);
>  	if (neigh) {
>  		if (neigh->nud_state & NUD_VALID)
>  			goto out;
>  
> +		idev = __in6_dev_get(dev);
>  		write_lock(&neigh->lock);
>  		if (!(neigh->nud_state & NUD_VALID) &&
>  		    time_after(jiffies,
> @@ -654,9 +654,6 @@ static void rt6_probe(struct fib6_nh *fib6_nh)
>  				__neigh_set_probe_once(neigh);
>  		}
>  		write_unlock(&neigh->lock);
> -	} else if (time_after(jiffies, fib6_nh->last_probe +
> -				       idev->cnf.rtr_probe_interval)) {
> -		work = kmalloc(sizeof(*work), GFP_ATOMIC);
>  	}
>  
>  	if (work) {
> 

Have you really compiled this patch ?
David Miller Aug. 27, 2019, 8:49 p.m. UTC | #2
Nothing says "low quality patch submission" like:

net/ipv6/route.c: In function ‘rt6_probe’:
net/ipv6/route.c:660:10: error: ‘struct fib6_nh’ has no member named ‘last_probe’
   fib6_nh->last_probe = jiffies;

"I did not even try to compile this"
David Miller Aug. 29, 2019, 11:37 p.m. UTC | #3
So yeah, this is one instance where the kbuild test robot's report is
making more rather than less work for us.

We identified the build problem within hours of this patch being
posted and the updated version was posted more than 24 hours ago.

The kbuild robot should really have a way to either:

1) Report build problems faster, humans find the obvious cases like
   this one within a day or less.

2) Notice that a new version of the patch was posted or that a human
   responded to the patch pointing out the build problem.

Otherwise we get postings like this which is just more noise to
delete.

Thanks.
Philip Li Aug. 30, 2019, 1 a.m. UTC | #4
On Thu, Aug 29, 2019 at 04:37:42PM -0700, David Miller wrote:
> 
> So yeah, this is one instance where the kbuild test robot's report is
> making more rather than less work for us.
sorry for the inconvenience caused. We monitor the lkml, and as you
point out, we will continuously improve to provide faster response.

> 
> We identified the build problem within hours of this patch being
> posted and the updated version was posted more than 24 hours ago.
> 
> The kbuild robot should really have a way to either:
> 
> 1) Report build problems faster, humans find the obvious cases like
>    this one within a day or less.
thanks, we will continue working on this to speed up

> 
> 2) Notice that a new version of the patch was posted or that a human
>    responded to the patch pointing out the build problem.
thanks, we will enhance the patch testing to consider these ideas.

> 
> Otherwise we get postings like this which is just more noise to
> delete.
> 
> Thanks.
> _______________________________________________
> kbuild-all mailing list
> kbuild-all@lists.01.org
> https://lists.01.org/mailman/listinfo/kbuild-all
diff mbox series

Patch

diff --git a/include/net/ip6_fib.h b/include/net/ip6_fib.h
index 4b5656c..8c2e022 100644
--- a/include/net/ip6_fib.h
+++ b/include/net/ip6_fib.h
@@ -124,11 +124,6 @@  struct rt6_exception {
 
 struct fib6_nh {
 	struct fib_nh_common	nh_common;
-
-#ifdef CONFIG_IPV6_ROUTER_PREF
-	unsigned long		last_probe;
-#endif
-
 	struct rt6_info * __percpu *rt6i_pcpu;
 	struct rt6_exception_bucket __rcu *rt6i_exception_bucket;
 };
diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index fd059e0..c4bcffc 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -639,12 +639,12 @@  static void rt6_probe(struct fib6_nh *fib6_nh)
 	nh_gw = &fib6_nh->fib_nh_gw6;
 	dev = fib6_nh->fib_nh_dev;
 	rcu_read_lock_bh();
-	idev = __in6_dev_get(dev);
 	neigh = __ipv6_neigh_lookup_noref(dev, nh_gw);
 	if (neigh) {
 		if (neigh->nud_state & NUD_VALID)
 			goto out;
 
+		idev = __in6_dev_get(dev);
 		write_lock(&neigh->lock);
 		if (!(neigh->nud_state & NUD_VALID) &&
 		    time_after(jiffies,
@@ -654,9 +654,6 @@  static void rt6_probe(struct fib6_nh *fib6_nh)
 				__neigh_set_probe_once(neigh);
 		}
 		write_unlock(&neigh->lock);
-	} else if (time_after(jiffies, fib6_nh->last_probe +
-				       idev->cnf.rtr_probe_interval)) {
-		work = kmalloc(sizeof(*work), GFP_ATOMIC);
 	}
 
 	if (work) {