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. This is very similar to the IPv4 version, 8 * except it reports the sockets in the INET6 address family. --- 24 unchanged lines hidden (view full) --- 33#ifdef CONFIG_PROC_FS 34static struct proc_dir_entry *proc_net_devsnmp6; 35 36static int fold_prot_inuse(struct proto *proto) 37{ 38 int res = 0; 39 int cpu; 40 | 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. This is very similar to the IPv4 version, 8 * except it reports the sockets in the INET6 address family. --- 24 unchanged lines hidden (view full) --- 33#ifdef CONFIG_PROC_FS 34static struct proc_dir_entry *proc_net_devsnmp6; 35 36static int fold_prot_inuse(struct proto *proto) 37{ 38 int res = 0; 39 int cpu; 40 |
41 for_each_cpu(cpu) | 41 for_each_possible_cpu(cpu) |
42 res += proto->stats[cpu].inuse; 43 44 return res; 45} 46 47static int sockstat6_seq_show(struct seq_file *seq, void *v) 48{ 49 seq_printf(seq, "TCP6: inuse %d\n", --- 85 unchanged lines hidden (view full) --- 135}; 136 137static unsigned long 138fold_field(void *mib[], int offt) 139{ 140 unsigned long res = 0; 141 int i; 142 | 42 res += proto->stats[cpu].inuse; 43 44 return res; 45} 46 47static int sockstat6_seq_show(struct seq_file *seq, void *v) 48{ 49 seq_printf(seq, "TCP6: inuse %d\n", --- 85 unchanged lines hidden (view full) --- 135}; 136 137static unsigned long 138fold_field(void *mib[], int offt) 139{ 140 unsigned long res = 0; 141 int i; 142 |
143 for_each_cpu(i) { | 143 for_each_possible_cpu(i) { |
144 res += *(((unsigned long *)per_cpu_ptr(mib[0], i)) + offt); 145 res += *(((unsigned long *)per_cpu_ptr(mib[1], i)) + offt); 146 } 147 return res; 148} 149 150static inline void 151snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist) --- 150 unchanged lines hidden --- | 144 res += *(((unsigned long *)per_cpu_ptr(mib[0], i)) + offt); 145 res += *(((unsigned long *)per_cpu_ptr(mib[1], i)) + offt); 146 } 147 return res; 148} 149 150static inline void 151snmp6_seq_show_item(struct seq_file *seq, void **mib, struct snmp_mib *itemlist) --- 150 unchanged lines hidden --- |