mirror of
https://github.com/ipxe/ipxe
synced 2025-12-29 02:52:36 +03:00
Add trivial net device statistics (TX and RX packet count), reported
via UNDI API and also by ifstat command; may be useful for debugging.
This commit is contained in:
@@ -61,7 +61,8 @@ void ifclose ( struct net_device *netdev ) {
|
||||
* @v netdev Network device
|
||||
*/
|
||||
void ifstat ( struct net_device *netdev ) {
|
||||
printf ( "%s: %s on %s (%s)\n",
|
||||
printf ( "%s: %s on %s (%s) TX:%d RX:%d\n",
|
||||
netdev->name, netdev_hwaddr ( netdev ), netdev->dev->name,
|
||||
( ( netdev->state & NETDEV_OPEN ) ? "open" : "closed" ) );
|
||||
( ( netdev->state & NETDEV_OPEN ) ? "open" : "closed" ),
|
||||
netdev->stats.tx_count, netdev->stats.rx_count );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user