The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: gurligebis@gentoo.org
Cc: romieu@fr.zoreil.com, shemminger@vyatta.com,
	bhutchings@solarflare.com, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, rl@hellgate.ch
Subject: Re: [PATCH 1/1] via-rhine: Fix hanging with high CPU load on low-end broads.
Date: Thu, 29 Dec 2011 18:48:42 -0500 (EST)	[thread overview]
Message-ID: <20111229.184842.664528940770120593.davem@davemloft.net> (raw)
In-Reply-To: <CACPM=kVfsXgFhKheevTS1pm7kCoezKO3M+102O=PRbXzxebxxg@mail.gmail.com>

From: Bjarke Istrup Pedersen <gurligebis@gentoo.org>
Date: Fri, 30 Dec 2011 00:37:17 +0100

> Hmm, it seems like this problem isn't related to the driver, but
> related to the current HEAD of net-next :)

Please try this patch.

diff --git a/net/ipv6/route.c b/net/ipv6/route.c
index 30de9e7..4a62c47 100644
--- a/net/ipv6/route.c
+++ b/net/ipv6/route.c
@@ -129,11 +129,14 @@ static struct neighbour *ip6_neigh_lookup(const struct dst_entry *dst, const voi
 	return neigh_create(&nd_tbl, daddr, dst->dev);
 }
 
-static int rt6_bind_neighbour(struct rt6_info *rt)
+static int rt6_bind_neighbour(struct rt6_info *rt, struct net_device *dev)
 {
-	struct neighbour *n = ip6_neigh_lookup(&rt->dst, &rt->rt6i_gateway);
-	if (IS_ERR(n))
-		return PTR_ERR(n);
+	struct neighbour *n = __ipv6_neigh_lookup(&nd_tbl, dev, &rt->rt6i_gateway);
+	if (!n) {
+		n = neigh_create(&nd_tbl, &rt->rt6i_gateway, dev);
+		if (IS_ERR(n))
+			return PTR_ERR(n);
+	}
 	dst_set_neighbour(&rt->dst, n);
 
 	return 0;
@@ -746,7 +749,7 @@ static struct rt6_info *rt6_alloc_cow(const struct rt6_info *ort,
 #endif
 
 	retry:
-		if (rt6_bind_neighbour(rt)) {
+		if (rt6_bind_neighbour(rt, rt->dst.dev)) {
 			struct net *net = dev_net(rt->dst.dev);
 			int saved_rt_min_interval =
 				net->ipv6.sysctl.ip6_rt_gc_min_interval;
@@ -1397,7 +1400,7 @@ int ip6_route_add(struct fib6_config *cfg)
 		rt->rt6i_prefsrc.plen = 0;
 
 	if (cfg->fc_flags & (RTF_GATEWAY | RTF_NONEXTHOP)) {
-		err = rt6_bind_neighbour(rt);
+		err = rt6_bind_neighbour(rt, dev);
 		if (err)
 			goto out;
 	}
@@ -2084,7 +2087,7 @@ struct rt6_info *addrconf_dst_alloc(struct inet6_dev *idev,
 		rt->rt6i_flags |= RTF_ANYCAST;
 	else
 		rt->rt6i_flags |= RTF_LOCAL;
-	err = rt6_bind_neighbour(rt);
+	err = rt6_bind_neighbour(rt, rt->dst.dev);
 	if (err) {
 		dst_free(&rt->dst);
 		return ERR_PTR(err);

  reply	other threads:[~2011-12-29 23:49 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-28 12:28 [PATCH 1/1] via-rhine: Fix hanging with high CPU load on low-end broads Bjarke Istrup Pedersen
2011-12-28 14:37 ` Ben Hutchings
2011-12-28 15:14   ` Bjarke Istrup Pedersen
2011-12-28 17:13     ` Ben Hutchings
2011-12-28 17:30       ` Bjarke Istrup Pedersen
2011-12-28 18:17         ` Stephen Hemminger
2011-12-28 18:34           ` David Miller
2011-12-28 19:16             ` Bjarke Istrup Pedersen
2011-12-29 15:39               ` Francois Romieu
2011-12-29 18:39                 ` Francois Romieu
2011-12-29 22:00                   ` Bjarke Istrup Pedersen
2011-12-29 22:05                   ` David Miller
2011-12-29 23:19                     ` Bjarke Istrup Pedersen
2011-12-29 23:37                       ` Bjarke Istrup Pedersen
2011-12-29 23:48                         ` David Miller [this message]
2011-12-30  1:18                           ` Bjarke Istrup Pedersen
2011-12-29 23:53                         ` Francois Romieu
2011-12-30  1:21                           ` Bjarke Istrup Pedersen
2011-12-30 11:48                           ` Bjarke Istrup Pedersen
2011-12-30 12:56                             ` Francois Romieu
2011-12-30 13:51                               ` Bjarke Istrup Pedersen
2011-12-30 18:03                                 ` Francois Romieu
2011-12-30 18:45                                   ` Bjarke Istrup Pedersen
2011-12-30 20:38                                   ` Bjarke Istrup Pedersen
2011-12-30 21:50                                     ` Francois Romieu
2011-12-30 22:08                                       ` Bjarke Istrup Pedersen
2011-12-30 22:08                                         ` Francois Romieu
2011-12-30 22:13                                       ` Bjarke Istrup Pedersen
2011-12-30 22:19                                         ` Francois Romieu
2011-12-30 22:41                                           ` Bjarke Istrup Pedersen
2011-12-31  1:37                                             ` Bjarke Istrup Pedersen
2011-12-31 12:17                                               ` Francois Romieu
2012-01-01 12:09                                                 ` Bjarke Istrup Pedersen
2012-01-01 21:15                                                 ` Bjarke Istrup Pedersen
2012-01-03 19:20                                                 ` Bjarke Istrup Pedersen
2012-01-03 22:32                                                   ` Francois Romieu
2012-01-04  7:59                                                     ` Bjarke Istrup Pedersen
2012-01-05 12:01                                                       ` Bjarke Istrup Pedersen
2012-01-05 16:20                                                         ` Francois Romieu
2012-01-05 16:46                                                           ` Bjarke Istrup Pedersen
2012-01-05 17:12                                                         ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111229.184842.664528940770120593.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=bhutchings@solarflare.com \
    --cc=gurligebis@gentoo.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rl@hellgate.ch \
    --cc=romieu@fr.zoreil.com \
    --cc=shemminger@vyatta.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox