Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 214479
b: refs/heads/master
c: fb621ba
h: refs/heads/master
i:
  214477: b29cfd4
  214475: 363d260
  214471: 45fb246
  214463: fc850d6
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Sep 10, 2010
1 parent da7ec40 commit 01a8281
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 23 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 49d61e2390c92bd226fc395a6165eb5a65ae4de6
refs/heads/master: fb621bac21fc315af9f66a754b7abe26ded3f260
1 change: 0 additions & 1 deletion trunk/drivers/net/ixgbevf/ixgbevf.h
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,6 @@ struct ixgbevf_adapter {
/* OS defined structs */
struct net_device *netdev;
struct pci_dev *pdev;
struct net_device_stats net_stats;

/* structs defined in ixgbe_vf.h */
struct ixgbe_hw hw;
Expand Down
26 changes: 5 additions & 21 deletions trunk/drivers/net/ixgbevf/ixgbevf_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ static bool ixgbevf_clean_tx_irq(struct ixgbevf_adapter *adapter,
tx_ring->total_bytes += total_bytes;
tx_ring->total_packets += total_packets;

adapter->net_stats.tx_bytes += total_bytes;
adapter->net_stats.tx_packets += total_packets;
netdev->stats.tx_bytes += total_bytes;
netdev->stats.tx_packets += total_packets;

return (count < tx_ring->work_limit);
}
Expand Down Expand Up @@ -639,8 +639,8 @@ static bool ixgbevf_clean_rx_irq(struct ixgbevf_q_vector *q_vector,

rx_ring->total_packets += total_rx_packets;
rx_ring->total_bytes += total_rx_bytes;
adapter->net_stats.rx_bytes += total_rx_bytes;
adapter->net_stats.rx_packets += total_rx_packets;
adapter->netdev->stats.rx_bytes += total_rx_bytes;
adapter->netdev->stats.rx_packets += total_rx_packets;

return cleaned;
}
Expand Down Expand Up @@ -2297,7 +2297,7 @@ void ixgbevf_update_stats(struct ixgbevf_adapter *adapter)
adapter->stats.vfmprc);

/* Fill out the OS statistics structure */
adapter->net_stats.multicast = adapter->stats.vfmprc -
adapter->netdev->stats.multicast = adapter->stats.vfmprc -
adapter->stats.base_vfmprc;
}

Expand Down Expand Up @@ -3180,21 +3180,6 @@ static int ixgbevf_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
return NETDEV_TX_OK;
}

/**
* ixgbevf_get_stats - Get System Network Statistics
* @netdev: network interface device structure
*
* Returns the address of the device statistics structure.
* The statistics are actually updated from the timer callback.
**/
static struct net_device_stats *ixgbevf_get_stats(struct net_device *netdev)
{
struct ixgbevf_adapter *adapter = netdev_priv(netdev);

/* only return the current stats */
return &adapter->net_stats;
}

/**
* ixgbevf_set_mac - Change the Ethernet Address of the NIC
* @netdev: network interface device structure
Expand Down Expand Up @@ -3272,7 +3257,6 @@ static const struct net_device_ops ixgbe_netdev_ops = {
.ndo_open = &ixgbevf_open,
.ndo_stop = &ixgbevf_close,
.ndo_start_xmit = &ixgbevf_xmit_frame,
.ndo_get_stats = &ixgbevf_get_stats,
.ndo_set_rx_mode = &ixgbevf_set_rx_mode,
.ndo_set_multicast_list = &ixgbevf_set_rx_mode,
.ndo_validate_addr = eth_validate_addr,
Expand Down

0 comments on commit 01a8281

Please sign in to comment.