]> 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>
Wed, 5 Oct 2011 01:01:26 +0000 (12:01 +1100)
commitfcae94320c768824133bd581c7e8a7de5e3abdaa
tree85e5c62dea63583afb155c937de05cfe362b9b21
parentc31be7a2ebcf3f734fc09c2d51406e8c2faf5321
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