Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (47 commits) GRETH: resolve SMP issues and other problems GRETH: handle frame error interrupts GRETH: avoid writing bad speed/duplex when setting transfer mode GRETH: fixed skb buffer memory leak on frame errors GRETH: GBit transmit descriptor handling optimization GRETH: fix opening/closing GRETH: added raw AMBA vendor/device number to match against. cassini: Fix build bustage on x86. e1000e: consistent use of Rx/Tx vs. RX/TX/rx/tx in comments/logs e1000e: update Copyright for 2011 e1000: Avoid unhandled IRQ r8169: keep firmware in memory. netdev: tilepro: Use is_unicast_ether_addr helper etherdevice.h: Add is_unicast_ether_addr function ks8695net: Use default implementation of ethtool_ops::get_link ks8695net: Disable non-working ethtool operations USB CDC NCM: Don't deref NULL in cdc_ncm_rx_fixup() and don't use uninitialized variable. vxge: Remember to release firmware after upgrading firmware netdev: bfin_mac: Remove is_multicast_ether_addr use in netdev_for_each_mc_addr ipsec: update MAX_AH_AUTH_LEN to support sha512 ...
This commit is contained in:
@@ -5523,34 +5523,6 @@ void netdev_run_todo(void)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* dev_txq_stats_fold - fold tx_queues stats
|
||||
* @dev: device to get statistics from
|
||||
* @stats: struct rtnl_link_stats64 to hold results
|
||||
*/
|
||||
void dev_txq_stats_fold(const struct net_device *dev,
|
||||
struct rtnl_link_stats64 *stats)
|
||||
{
|
||||
u64 tx_bytes = 0, tx_packets = 0, tx_dropped = 0;
|
||||
unsigned int i;
|
||||
struct netdev_queue *txq;
|
||||
|
||||
for (i = 0; i < dev->num_tx_queues; i++) {
|
||||
txq = netdev_get_tx_queue(dev, i);
|
||||
spin_lock_bh(&txq->_xmit_lock);
|
||||
tx_bytes += txq->tx_bytes;
|
||||
tx_packets += txq->tx_packets;
|
||||
tx_dropped += txq->tx_dropped;
|
||||
spin_unlock_bh(&txq->_xmit_lock);
|
||||
}
|
||||
if (tx_bytes || tx_packets || tx_dropped) {
|
||||
stats->tx_bytes = tx_bytes;
|
||||
stats->tx_packets = tx_packets;
|
||||
stats->tx_dropped = tx_dropped;
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL(dev_txq_stats_fold);
|
||||
|
||||
/* Convert net_device_stats to rtnl_link_stats64. They have the same
|
||||
* fields in the same order, with only the type differing.
|
||||
*/
|
||||
@@ -5594,7 +5566,6 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev,
|
||||
netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev));
|
||||
} else {
|
||||
netdev_stats_to_stats64(storage, &dev->stats);
|
||||
dev_txq_stats_fold(dev, storage);
|
||||
}
|
||||
storage->rx_dropped += atomic_long_read(&dev->rx_dropped);
|
||||
return storage;
|
||||
|
Reference in New Issue
Block a user