From 271d38c464d5d4591bc37fb66189c6fbc2a6a5be Mon Sep 17 00:00:00 2001 From: Sepherosa Ziehau Date: Thu, 23 Aug 2012 11:04:19 +0800 Subject: [PATCH] route: Routing table is replicated to all CPUs, not # of CPUs on power of 2 DragonFly-bug: http://bugs.dragonflybsd.org/issues/2355 --- sys/net/if.c | 2 +- sys/netinet/in_rmx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/if.c b/sys/net/if.c index cc830a9576..f02d2fc863 100644 --- a/sys/net/if.c +++ b/sys/net/if.c @@ -746,7 +746,7 @@ if_detach(struct ifnet *ifp) * to this interface...oh well... */ origcpu = mycpuid; - for (cpu = 0; cpu < ncpus2; cpu++) { + for (cpu = 0; cpu < ncpus; cpu++) { lwkt_migratecpu(cpu); for (i = 1; i <= AF_MAX; i++) { if ((rnh = rt_tables[cpu][i]) == NULL) diff --git a/sys/netinet/in_rmx.c b/sys/netinet/in_rmx.c index 635a4dcba4..c3edc01a57 100644 --- a/sys/netinet/in_rmx.c +++ b/sys/netinet/in_rmx.c @@ -444,7 +444,7 @@ in_ifadown(struct ifaddr *ifa, int delete) * doing this the inconsistancy could trigger a panic. */ origcpu = mycpuid; - for (cpu = 0; cpu < ncpus2; cpu++) { + for (cpu = 0; cpu < ncpus; cpu++) { lwkt_migratecpu(cpu); arg.rnh = rnh = rt_tables[cpu][AF_INET]; -- 2.41.0