]> 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>
Tue, 1 Nov 2011 00:15:26 +0000 (11:15 +1100)
commit994a4fbaf3be14748e6a50ec087d17c772890cc6
treea5bee2e08be54982286a889233ed1bdbe3dede7f
parent2088a4a5bafa7c76c483bf1e190759436c236c5c
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