mirror of
https://github.com/ipxe/ipxe
synced 2025-12-25 09:01:24 +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:
@@ -128,6 +128,17 @@ struct ll_protocol {
|
||||
const uint8_t *ll_broadcast;
|
||||
};
|
||||
|
||||
/**
|
||||
* Network device statistics
|
||||
*
|
||||
*/
|
||||
struct net_device_stats {
|
||||
/** Count of successfully completed transmissions */
|
||||
unsigned int tx_count;
|
||||
/** Count of successfully received packets */
|
||||
unsigned int rx_count;
|
||||
};
|
||||
|
||||
/**
|
||||
* A network device
|
||||
*
|
||||
@@ -215,6 +226,8 @@ struct net_device {
|
||||
struct list_head tx_queue;
|
||||
/** RX packet queue */
|
||||
struct list_head rx_queue;
|
||||
/** Device statistics */
|
||||
struct net_device_stats stats;
|
||||
|
||||
/** Driver private data */
|
||||
void *priv;
|
||||
|
||||
Reference in New Issue
Block a user