]> 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 23:04:27 +0000 (10:04 +1100)
commitf458fe65bf0f042b88965a3e5cd78922f534ea23
tree976f594bcefae89e4b5e3c7eae278860888eada3
parent3c196fc32cd9c7be7641996facc6b1874b857360
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