]> git.karo-electronics.de Git - karo-tx-linux.git/commit
virtio: console: add port stats for bytes received, sent and discarded
authorAmit Shah <amit.shah@redhat.com>
Wed, 14 Sep 2011 07:36:46 +0000 (13:06 +0530)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 15 Sep 2011 00:38:14 +0000 (10:38 +1000)
commitaea7c0fb397cf15bf3b5ad081a6c23bc0f8fa135
tree74ffb08128b43805f5c111de57a213581409ef75
parentd3729a845608e0322c1518200da338045d4c75e9
virtio: console: add port stats for bytes received, sent and discarded

This commit adds port-specific stats for the number of bytes received,
sent and discarded.  They're exposed via the debugfs interface.  This
data can be used to check for data loss bugs (or disprove such claims).
It can also be used for accounting, if there's such a need.

The stats remain valid throughout the lifetime of the port.  Unplugging
a port will reset the stats.  The numbers are not reset across port
opens/closes.

Signed-off-by: Amit Shah <amit.shah@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/char/virtio_console.c