* [PATCH v2] ipv6: Not to probe neighbourless routes
@ 2019-08-28 2:19 Yi Wang
2019-08-28 3:13 ` David Miller
2019-08-28 19:55 ` David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Yi Wang @ 2019-08-28 2:19 UTC (permalink / raw)
To: davem
Cc: kuznet, yoshfuji, netdev, linux-kernel, xue.zhihong, wang.yi59,
wang.liang82, Cheng Lin
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 | 6 +-----
2 files changed, 1 insertion(+), 10 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..1839dd7 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,13 +654,9 @@ 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) {
- fib6_nh->last_probe = jiffies;
INIT_WORK(&work->work, rt6_probe_deferred);
work->target = *nh_gw;
dev_hold(dev);
--
1.8.3.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ipv6: Not to probe neighbourless routes
2019-08-28 2:19 [PATCH v2] ipv6: Not to probe neighbourless routes Yi Wang
@ 2019-08-28 3:13 ` David Miller
[not found] ` <201908281650080034915@zte.com.cn>
2019-08-28 19:55 ` David Miller
1 sibling, 1 reply; 4+ messages in thread
From: David Miller @ 2019-08-28 3:13 UTC (permalink / raw)
To: wang.yi59
Cc: kuznet, yoshfuji, netdev, linux-kernel, xue.zhihong,
wang.liang82, cheng.lin130
Because you didn't even compile test the previous patch, I want to
know how you did functional testing on this version on current kernel
versions?
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ipv6: Not to probe neighbourless routes
[not found] ` <201908281650080034915@zte.com.cn>
@ 2019-08-28 19:55 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2019-08-28 19:55 UTC (permalink / raw)
To: wang.yi59
Cc: kuznet, yoshfuji, netdev, linux-kernel, xue.zhihong,
wang.liang82, cheng.lin130
From: <wang.yi59@zte.com.cn>
Date: Wed, 28 Aug 2019 16:50:08 +0800 (CST)
> We used an older version of the kernel, and found that configuring default
> route led to a lot of NS messages, which affected the real business.
>
> Although commit f547fac624be adds rate-limiting, there are still some
> unreasonable things.
>
> We have tested this change on CentOS 7.6 (3.10.0-957), whose rt6_probe()
> implementation is similar to the latest code. When remaking patch based on
> linux-5.3-rc5, a line of code was missed out with a mistack.
Therefore, you are not testing this patch on current kernels, so you are
sending a patch which is completely untested.
This is not appropriate nor accceptable.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH v2] ipv6: Not to probe neighbourless routes
2019-08-28 2:19 [PATCH v2] ipv6: Not to probe neighbourless routes Yi Wang
2019-08-28 3:13 ` David Miller
@ 2019-08-28 19:55 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2019-08-28 19:55 UTC (permalink / raw)
To: wang.yi59
Cc: kuznet, yoshfuji, netdev, linux-kernel, xue.zhihong,
wang.liang82, cheng.lin130
I am tossing this patch.
Resubmit it when you test it properly on current kernels.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-08-28 19:55 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28 2:19 [PATCH v2] ipv6: Not to probe neighbourless routes Yi Wang
2019-08-28 3:13 ` David Miller
[not found] ` <201908281650080034915@zte.com.cn>
2019-08-28 19:55 ` David Miller
2019-08-28 19:55 ` David Miller
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).