Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ixgbevf: remove private net_device_stats

Use the net_device provided net_device_stats structure.

Remove ixgbevf_get_stats() now its not needed.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Eric Dumazet and committed by
David S. Miller
fb621bac 49d61e23

+5 -22
-1
drivers/net/ixgbevf/ixgbevf.h
··· 243 243 /* OS defined structs */ 244 244 struct net_device *netdev; 245 245 struct pci_dev *pdev; 246 - struct net_device_stats net_stats; 247 246 248 247 /* structs defined in ixgbe_vf.h */ 249 248 struct ixgbe_hw hw;
+5 -21
drivers/net/ixgbevf/ixgbevf_main.c
··· 308 308 tx_ring->total_bytes += total_bytes; 309 309 tx_ring->total_packets += total_packets; 310 310 311 - adapter->net_stats.tx_bytes += total_bytes; 312 - adapter->net_stats.tx_packets += total_packets; 311 + netdev->stats.tx_bytes += total_bytes; 312 + netdev->stats.tx_packets += total_packets; 313 313 314 314 return (count < tx_ring->work_limit); 315 315 } ··· 639 639 640 640 rx_ring->total_packets += total_rx_packets; 641 641 rx_ring->total_bytes += total_rx_bytes; 642 - adapter->net_stats.rx_bytes += total_rx_bytes; 643 - adapter->net_stats.rx_packets += total_rx_packets; 642 + adapter->netdev->stats.rx_bytes += total_rx_bytes; 643 + adapter->netdev->stats.rx_packets += total_rx_packets; 644 644 645 645 return cleaned; 646 646 } ··· 2297 2297 adapter->stats.vfmprc); 2298 2298 2299 2299 /* Fill out the OS statistics structure */ 2300 - adapter->net_stats.multicast = adapter->stats.vfmprc - 2300 + adapter->netdev->stats.multicast = adapter->stats.vfmprc - 2301 2301 adapter->stats.base_vfmprc; 2302 2302 } 2303 2303 ··· 3181 3181 } 3182 3182 3183 3183 /** 3184 - * ixgbevf_get_stats - Get System Network Statistics 3185 - * @netdev: network interface device structure 3186 - * 3187 - * Returns the address of the device statistics structure. 3188 - * The statistics are actually updated from the timer callback. 3189 - **/ 3190 - static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev) 3191 - { 3192 - struct ixgbevf_adapter *adapter = netdev_priv(netdev); 3193 - 3194 - /* only return the current stats */ 3195 - return &adapter->net_stats; 3196 - } 3197 - 3198 - /** 3199 3184 * ixgbevf_set_mac - Change the Ethernet Address of the NIC 3200 3185 * @netdev: network interface device structure 3201 3186 * @p: pointer to an address structure ··· 3257 3272 .ndo_open = &ixgbevf_open, 3258 3273 .ndo_stop = &ixgbevf_close, 3259 3274 .ndo_start_xmit = &ixgbevf_xmit_frame, 3260 - .ndo_get_stats = &ixgbevf_get_stats, 3261 3275 .ndo_set_rx_mode = &ixgbevf_set_rx_mode, 3262 3276 .ndo_set_multicast_list = &ixgbevf_set_rx_mode, 3263 3277 .ndo_validate_addr = eth_validate_addr,