patch-2.3.99-pre6 linux/net/ipv6/proc.c

Next file: linux/net/ipv6/raw.c
Previous file: linux/net/ipv6/af_inet6.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.99-pre5/linux/net/ipv6/proc.c linux/net/ipv6/proc.c
@@ -7,7 +7,7 @@
  *		PROC file system.  This is very similar to the IPv4 version,
  *		except it reports the sockets in the INET6 address family.
  *
- * Version:	$Id: proc.c,v 1.13 2000/01/09 02:19:55 davem Exp $
+ * Version:	$Id: proc.c,v 1.14 2000/04/16 01:11:37 davem Exp $
  *
  * Authors:	David S. Miller (davem@caip.rutgers.edu)
  *
@@ -32,7 +32,7 @@
 	int cpu;
 
 	for (cpu=0; cpu<smp_num_cpus; cpu++)
-		res += proto->stats[cpu].inuse;
+		res += proto->stats[cpu_logical_map(cpu)].inuse;
 
 	return res;
 }
@@ -138,8 +138,10 @@
 	unsigned long res = 0;
 	int i;
 
-	for (i=0; i<smp_num_cpus; i++)
-		res += ptr[i*size];
+	for (i=0; i<smp_num_cpus; i++) {
+		res += ptr[2*cpu_logical_map(i)*size];
+		res += ptr[(2*cpu_logical_map(i)+1)*size];
+	}
 
 	return res;
 }

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)