diff options
author | Dmitry Torokhov <dtor@insightbb.com> | 2006-09-19 01:56:44 -0400 |
---|---|---|
committer | Dmitry Torokhov <dtor@insightbb.com> | 2006-09-19 01:56:44 -0400 |
commit | 0612ec48762bf8712db1925b2e67246d2237ebab (patch) | |
tree | 01b0d69c9c9915015c0f23ad4263646dd5413e99 /drivers/s390/net/qeth_proc.c | |
parent | 4263cf0fac28122c8381b6f4f9441a43cd93c81f (diff) | |
parent | 47a5c6fa0e204a2b63309c648bb2fde36836c826 (diff) | |
download | op-kernel-dev-0612ec48762bf8712db1925b2e67246d2237ebab.zip op-kernel-dev-0612ec48762bf8712db1925b2e67246d2237ebab.tar.gz |
Merge rsync://rsync.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/s390/net/qeth_proc.c')
-rw-r--r-- | drivers/s390/net/qeth_proc.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/s390/net/qeth_proc.c b/drivers/s390/net/qeth_proc.c index 66f2da1..faa768e 100644 --- a/drivers/s390/net/qeth_proc.c +++ b/drivers/s390/net/qeth_proc.c @@ -173,7 +173,6 @@ static struct file_operations qeth_procfile_fops = { #define QETH_PERF_PROCFILE_NAME "qeth_perf" static struct proc_dir_entry *qeth_perf_procfile; -#ifdef CONFIG_QETH_PERF_STATS static int qeth_perf_procfile_seq_show(struct seq_file *s, void *it) { @@ -192,14 +191,21 @@ qeth_perf_procfile_seq_show(struct seq_file *s, void *it) CARD_DDEV_ID(card), QETH_CARD_IFNAME(card) ); + if (!card->options.performance_stats) + seq_printf(s, "Performance statistics are deactivated.\n"); seq_printf(s, " Skb's/buffers received : %lu/%u\n" " Skb's/buffers sent : %lu/%u\n\n", - card->stats.rx_packets, card->perf_stats.bufs_rec, - card->stats.tx_packets, card->perf_stats.bufs_sent + card->stats.rx_packets - + card->perf_stats.initial_rx_packets, + card->perf_stats.bufs_rec, + card->stats.tx_packets - + card->perf_stats.initial_tx_packets, + card->perf_stats.bufs_sent ); seq_printf(s, " Skb's/buffers sent without packing : %lu/%u\n" " Skb's/buffers sent with packing : %u/%u\n\n", - card->stats.tx_packets - card->perf_stats.skbs_sent_pack, + card->stats.tx_packets - card->perf_stats.initial_tx_packets + - card->perf_stats.skbs_sent_pack, card->perf_stats.bufs_sent - card->perf_stats.bufs_sent_pack, card->perf_stats.skbs_sent_pack, card->perf_stats.bufs_sent_pack @@ -275,11 +281,6 @@ static struct file_operations qeth_perf_procfile_fops = { .release = seq_release, }; -#define qeth_perf_procfile_created qeth_perf_procfile -#else -#define qeth_perf_procfile_created 1 -#endif /* CONFIG_QETH_PERF_STATS */ - int __init qeth_create_procfs_entries(void) { @@ -288,15 +289,13 @@ qeth_create_procfs_entries(void) if (qeth_procfile) qeth_procfile->proc_fops = &qeth_procfile_fops; -#ifdef CONFIG_QETH_PERF_STATS qeth_perf_procfile = create_proc_entry(QETH_PERF_PROCFILE_NAME, S_IFREG | 0444, NULL); if (qeth_perf_procfile) qeth_perf_procfile->proc_fops = &qeth_perf_procfile_fops; -#endif /* CONFIG_QETH_PERF_STATS */ if (qeth_procfile && - qeth_perf_procfile_created) + qeth_perf_procfile) return 0; else return -ENOMEM; |