diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:39:37 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-12-30 20:39:37 -0500 |
commit | 5ed1836814d908f45cafde0e79cb85314ab9d41d (patch) | |
tree | 53db7ccf23c78d105b63adf4ee40a07068f0f856 /net/xfrm/xfrm_proc.c | |
parent | ab70537c32a3245325b48774664da588904e47f2 (diff) | |
parent | eb4dea5853046727bfbb579f0c9a8cae7369f7c6 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6:
net: Fix percpu counters deadlock
cpumask: prepare for iterators to only go to nr_cpu_ids/nr_cpumask_bits: net
drivers/net/usb: use USB API functions rather than constants
cls_cgroup: clean up Kconfig
cls_cgroup: clean up for cgroup part
cls_cgroup: fix an oops when removing a cgroup
EtherExpress16: fix printing timed out status
mlx4_en: Added "set_ringparam" Ethtool interface implementation
mlx4_en: Always allocate RX ring for each interrupt vector
mlx4_en: Verify number of RX rings doesn't exceed MAX_RX_RINGS
IPVS: Make "no destination available" message more consistent between schedulers
net: KS8695: removed duplicated #include
tun: Fix SIOCSIFHWADDR error.
smsc911x: compile fix re netif_rx signature changes
netns: foreach_netdev_safe is insufficient in default_device_exit
net: make xfrm_statistics_seq_show use generic snmp_fold_field
net: Fix more NAPI interface netdev argument drop fallout.
net: Fix unused variable warnings in pasemi_mac.c and spider_net.c
Diffstat (limited to 'net/xfrm/xfrm_proc.c')
-rw-r--r-- | net/xfrm/xfrm_proc.c | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/net/xfrm/xfrm_proc.c b/net/xfrm/xfrm_proc.c index 284eaef1dbf2..a2adb51849a9 100644 --- a/net/xfrm/xfrm_proc.c +++ b/net/xfrm/xfrm_proc.c | |||
@@ -44,27 +44,14 @@ static struct snmp_mib xfrm_mib_list[] = { | |||
44 | SNMP_MIB_SENTINEL | 44 | SNMP_MIB_SENTINEL |
45 | }; | 45 | }; |
46 | 46 | ||
47 | static unsigned long | ||
48 | fold_field(void *mib[], int offt) | ||
49 | { | ||
50 | unsigned long res = 0; | ||
51 | int i; | ||
52 | |||
53 | for_each_possible_cpu(i) { | ||
54 | res += *(((unsigned long *)per_cpu_ptr(mib[0], i)) + offt); | ||
55 | res += *(((unsigned long *)per_cpu_ptr(mib[1], i)) + offt); | ||
56 | } | ||
57 | return res; | ||
58 | } | ||
59 | |||
60 | static int xfrm_statistics_seq_show(struct seq_file *seq, void *v) | 47 | static int xfrm_statistics_seq_show(struct seq_file *seq, void *v) |
61 | { | 48 | { |
62 | struct net *net = seq->private; | 49 | struct net *net = seq->private; |
63 | int i; | 50 | int i; |
64 | for (i=0; xfrm_mib_list[i].name; i++) | 51 | for (i=0; xfrm_mib_list[i].name; i++) |
65 | seq_printf(seq, "%-24s\t%lu\n", xfrm_mib_list[i].name, | 52 | seq_printf(seq, "%-24s\t%lu\n", xfrm_mib_list[i].name, |
66 | fold_field((void **)net->mib.xfrm_statistics, | 53 | snmp_fold_field((void **)net->mib.xfrm_statistics, |
67 | xfrm_mib_list[i].entry)); | 54 | xfrm_mib_list[i].entry)); |
68 | return 0; | 55 | return 0; |
69 | } | 56 | } |
70 | 57 | ||