Message ID | 1377714286-51816-1-git-send-email-tim.gardner@canonical.com |
---|---|
State | Superseded, archived |
Delegated to: | David Miller |
Headers | show |
On 08/28/2013 12:51 PM, Joe Perches wrote: > On Wed, 2013-08-28 at 12:24 -0600, Tim Gardner wrote: >> Drop a couple of ifdef/endif pairs by moving the ifdef >> surrounding neigh_app_ns() to the interior of neigh_app_ns(). > [] >> This is an admittedly trivial change. I stumbled on it while trying to figure >> out why Ubuntu doesn't have CONFIG_ARPD enabled. > > I'd be more inclined to make neigh_app_ns static inline > in the .h file and remove the EXPORT_SYMBOL > I thought about that as well, but then you'd have to extern __neigh_notify(), which is currently a static function and large enough to not really be suitable for inlining. Seems like unnecessary churn to me. rtg
Tim Gardner <tim.gardner@canonical.com> writes: > Drop a couple of ifdef/endif pairs by moving the ifdef > surrounding neigh_app_ns() to the interior of neigh_app_ns(). Can we please just remove the CONFIG_ARPD option entirely. There really is no savings to keeping this option configurable and the option only removes a netlink notification. > Cc: "David S. Miller" <davem@davemloft.net> > Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> > Cc: James Morris <jmorris@namei.org> > Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> > Cc: Patrick McHardy <kaber@trash.net> > Cc: "Eric W. Biederman" <ebiederm@xmission.com> > Cc: Gao feng <gaofeng@cn.fujitsu.com> > Cc: Joe Perches <joe@perches.com> > Signed-off-by: Tim Gardner <tim.gardner@canonical.com> > --- > > This is an admittedly trivial change. I stumbled on it while trying to figure > out why Ubuntu doesn't have CONFIG_ARPD enabled. > > net/core/neighbour.c | 4 ++-- > net/ipv4/arp.c | 2 -- > net/ipv6/ndisc.c | 2 -- > 3 files changed, 2 insertions(+), 6 deletions(-) > > diff --git a/net/core/neighbour.c b/net/core/neighbour.c > index 60533db..049dd9e 100644 > --- a/net/core/neighbour.c > +++ b/net/core/neighbour.c > @@ -2759,13 +2759,13 @@ errout: > rtnl_set_sk_err(net, RTNLGRP_NEIGH, err); > } > > -#ifdef CONFIG_ARPD > void neigh_app_ns(struct neighbour *n) > { > +#ifdef CONFIG_ARPD > __neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST); > +#endif /* CONFIG_ARPD */ > } > EXPORT_SYMBOL(neigh_app_ns); > -#endif /* CONFIG_ARPD */ > > #ifdef CONFIG_SYSCTL > static int zero; > diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c > index 4429b01..7808093 100644 > --- a/net/ipv4/arp.c > +++ b/net/ipv4/arp.c > @@ -368,9 +368,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) > } else { > probes -= neigh->parms->app_probes; > if (probes < 0) { > -#ifdef CONFIG_ARPD > neigh_app_ns(neigh); > -#endif > return; > } > } > diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c > index 04d31c2..d5693ad 100644 > --- a/net/ipv6/ndisc.c > +++ b/net/ipv6/ndisc.c > @@ -663,9 +663,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) > } > ndisc_send_ns(dev, neigh, target, target, saddr); > } else if ((probes -= neigh->parms->app_probes) < 0) { > -#ifdef CONFIG_ARPD > neigh_app_ns(neigh); > -#endif > } else { > addrconf_addr_solict_mult(target, &mcaddr); > ndisc_send_ns(dev, NULL, target, &mcaddr, saddr); -- 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 --git a/net/core/neighbour.c b/net/core/neighbour.c index 60533db..049dd9e 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c @@ -2759,13 +2759,13 @@ errout: rtnl_set_sk_err(net, RTNLGRP_NEIGH, err); } -#ifdef CONFIG_ARPD void neigh_app_ns(struct neighbour *n) { +#ifdef CONFIG_ARPD __neigh_notify(n, RTM_GETNEIGH, NLM_F_REQUEST); +#endif /* CONFIG_ARPD */ } EXPORT_SYMBOL(neigh_app_ns); -#endif /* CONFIG_ARPD */ #ifdef CONFIG_SYSCTL static int zero; diff --git a/net/ipv4/arp.c b/net/ipv4/arp.c index 4429b01..7808093 100644 --- a/net/ipv4/arp.c +++ b/net/ipv4/arp.c @@ -368,9 +368,7 @@ static void arp_solicit(struct neighbour *neigh, struct sk_buff *skb) } else { probes -= neigh->parms->app_probes; if (probes < 0) { -#ifdef CONFIG_ARPD neigh_app_ns(neigh); -#endif return; } } diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index 04d31c2..d5693ad 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c @@ -663,9 +663,7 @@ static void ndisc_solicit(struct neighbour *neigh, struct sk_buff *skb) } ndisc_send_ns(dev, neigh, target, target, saddr); } else if ((probes -= neigh->parms->app_probes) < 0) { -#ifdef CONFIG_ARPD neigh_app_ns(neigh); -#endif } else { addrconf_addr_solict_mult(target, &mcaddr); ndisc_send_ns(dev, NULL, target, &mcaddr, saddr);
Drop a couple of ifdef/endif pairs by moving the ifdef surrounding neigh_app_ns() to the interior of neigh_app_ns(). Cc: "David S. Miller" <davem@davemloft.net> Cc: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru> Cc: James Morris <jmorris@namei.org> Cc: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org> Cc: Patrick McHardy <kaber@trash.net> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Gao feng <gaofeng@cn.fujitsu.com> Cc: Joe Perches <joe@perches.com> Signed-off-by: Tim Gardner <tim.gardner@canonical.com> --- This is an admittedly trivial change. I stumbled on it while trying to figure out why Ubuntu doesn't have CONFIG_ARPD enabled. net/core/neighbour.c | 4 ++-- net/ipv4/arp.c | 2 -- net/ipv6/ndisc.c | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-)