proc.c (b05005772f34497eb2b7415a651fe785cbe70e16) | proc.c (6f912042256c12b0927438122594f5379b364f5d) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * This file implements the various access functions for the 7 * PROC file system. It is mainly used for debugging and 8 * statistics. --- 35 unchanged lines hidden (view full) --- 44#include <net/sock.h> 45#include <net/raw.h> 46 47static int fold_prot_inuse(struct proto *proto) 48{ 49 int res = 0; 50 int cpu; 51 | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * This file implements the various access functions for the 7 * PROC file system. It is mainly used for debugging and 8 * statistics. --- 35 unchanged lines hidden (view full) --- 44#include <net/sock.h> 45#include <net/raw.h> 46 47static int fold_prot_inuse(struct proto *proto) 48{ 49 int res = 0; 50 int cpu; 51 |
52 for_each_cpu(cpu) | 52 for_each_possible_cpu(cpu) |
53 res += proto->stats[cpu].inuse; 54 55 return res; 56} 57 58/* 59 * Report socket allocation statistics [mea@utu.fi] 60 */ --- 25 unchanged lines hidden (view full) --- 86}; 87 88static unsigned long 89fold_field(void *mib[], int offt) 90{ 91 unsigned long res = 0; 92 int i; 93 | 53 res += proto->stats[cpu].inuse; 54 55 return res; 56} 57 58/* 59 * Report socket allocation statistics [mea@utu.fi] 60 */ --- 25 unchanged lines hidden (view full) --- 86}; 87 88static unsigned long 89fold_field(void *mib[], int offt) 90{ 91 unsigned long res = 0; 92 int i; 93 |
94 for_each_cpu(i) { | 94 for_each_possible_cpu(i) { |
95 res += *(((unsigned long *) per_cpu_ptr(mib[0], i)) + offt); 96 res += *(((unsigned long *) per_cpu_ptr(mib[1], i)) + offt); 97 } 98 return res; 99} 100 101/* snmp items */ 102static const struct snmp_mib snmp4_ipstats_list[] = { --- 276 unchanged lines hidden --- | 95 res += *(((unsigned long *) per_cpu_ptr(mib[0], i)) + offt); 96 res += *(((unsigned long *) per_cpu_ptr(mib[1], i)) + offt); 97 } 98 return res; 99} 100 101/* snmp items */ 102static const struct snmp_mib snmp4_ipstats_list[] = { --- 276 unchanged lines hidden --- |