From 9a7f9feaf5f2a9e4ff717c3eee6428f9754b3833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roger=20Pau=20Monn=C3=A9?= Date: Mon, 19 Oct 2015 14:22:57 +0000 Subject: [PATCH] xen-netfront: clean up netfront stats structure Rename it with netfront_ prefix and purge a bunch of unused fields. Submitted by: Wei Liu Reviewed by: royger Differential Revision: https://reviews.freebsd.org/D3889 Sponsored by: Citrix Systems R&D --- sys/dev/xen/netfront/netfront.c | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/sys/dev/xen/netfront/netfront.c b/sys/dev/xen/netfront/netfront.c index 5ad8004dd0ab..4eef5698efd1 100644 --- a/sys/dev/xen/netfront/netfront.c +++ b/sys/dev/xen/netfront/netfront.c @@ -191,7 +191,7 @@ struct xn_chain_data { struct mbuf *xn_rx_chain[NET_RX_RING_SIZE+1]; }; -struct net_device_stats +struct netfront_stats { u_long rx_packets; /* total packets received */ u_long tx_packets; /* total packets transmitted */ @@ -199,29 +199,6 @@ struct net_device_stats u_long tx_bytes; /* total bytes transmitted */ u_long rx_errors; /* bad packets received */ u_long tx_errors; /* packet transmit problems */ - u_long rx_dropped; /* no space in linux buffers */ - u_long tx_dropped; /* no space available in linux */ - u_long multicast; /* multicast packets received */ - u_long collisions; - - /* detailed rx_errors: */ - u_long rx_length_errors; - u_long rx_over_errors; /* receiver ring buff overflow */ - u_long rx_crc_errors; /* recved pkt with crc error */ - u_long rx_frame_errors; /* recv'd frame alignment error */ - u_long rx_fifo_errors; /* recv'r fifo overrun */ - u_long rx_missed_errors; /* receiver missed packet */ - - /* detailed tx_errors */ - u_long tx_aborted_errors; - u_long tx_carrier_errors; - u_long tx_fifo_errors; - u_long tx_heartbeat_errors; - u_long tx_window_errors; - - /* for cslip etc */ - u_long rx_compressed; - u_long tx_compressed; }; struct netfront_info { @@ -230,7 +207,7 @@ struct netfront_info { struct lro_ctrl xn_lro; #endif - struct net_device_stats stats; + struct netfront_stats stats; u_int tx_full; netif_tx_front_ring_t tx;