diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 16:25:30 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-01-14 16:25:30 -0500 |
commit | d018b6f4f1539f3679fbdc2d02d58d09e76be84a (patch) | |
tree | 317b9e04d8e7a73a4d07c69a5cb5455ec34f47e5 /net/core | |
parent | 18bce371ae09af6c20ee62c1092a4d1d0e84dd49 (diff) | |
parent | 0f73f2c5a3ebb957ee66718c903c17ed71a4fc2e (diff) |
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
...
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/dev.c | 29 | ||||
-rw-r--r-- | net/core/skbuff.c | 2 |
2 files changed, 2 insertions, 29 deletions
diff --git a/net/core/dev.c b/net/core/dev.c index 06d0e7b25385..54277df0f735 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -5523,34 +5523,6 @@ void netdev_run_todo(void) | |||
5523 | } | 5523 | } |
5524 | } | 5524 | } |
5525 | 5525 | ||
5526 | /** | ||
5527 | * dev_txq_stats_fold - fold tx_queues stats | ||
5528 | * @dev: device to get statistics from | ||
5529 | * @stats: struct rtnl_link_stats64 to hold results | ||
5530 | */ | ||
5531 | void dev_txq_stats_fold(const struct net_device *dev, | ||
5532 | struct rtnl_link_stats64 *stats) | ||
5533 | { | ||
5534 | u64 tx_bytes = 0, tx_packets = 0, tx_dropped = 0; | ||
5535 | unsigned int i; | ||
5536 | struct netdev_queue *txq; | ||
5537 | |||
5538 | for (i = 0; i < dev->num_tx_queues; i++) { | ||
5539 | txq = netdev_get_tx_queue(dev, i); | ||
5540 | spin_lock_bh(&txq->_xmit_lock); | ||
5541 | tx_bytes += txq->tx_bytes; | ||
5542 | tx_packets += txq->tx_packets; | ||
5543 | tx_dropped += txq->tx_dropped; | ||
5544 | spin_unlock_bh(&txq->_xmit_lock); | ||
5545 | } | ||
5546 | if (tx_bytes || tx_packets || tx_dropped) { | ||
5547 | stats->tx_bytes = tx_bytes; | ||
5548 | stats->tx_packets = tx_packets; | ||
5549 | stats->tx_dropped = tx_dropped; | ||
5550 | } | ||
5551 | } | ||
5552 | EXPORT_SYMBOL(dev_txq_stats_fold); | ||
5553 | |||
5554 | /* Convert net_device_stats to rtnl_link_stats64. They have the same | 5526 | /* Convert net_device_stats to rtnl_link_stats64. They have the same |
5555 | * fields in the same order, with only the type differing. | 5527 | * fields in the same order, with only the type differing. |
5556 | */ | 5528 | */ |
@@ -5594,7 +5566,6 @@ struct rtnl_link_stats64 *dev_get_stats(struct net_device *dev, | |||
5594 | netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev)); | 5566 | netdev_stats_to_stats64(storage, ops->ndo_get_stats(dev)); |
5595 | } else { | 5567 | } else { |
5596 | netdev_stats_to_stats64(storage, &dev->stats); | 5568 | netdev_stats_to_stats64(storage, &dev->stats); |
5597 | dev_txq_stats_fold(dev, storage); | ||
5598 | } | 5569 | } |
5599 | storage->rx_dropped += atomic_long_read(&dev->rx_dropped); | 5570 | storage->rx_dropped += atomic_long_read(&dev->rx_dropped); |
5600 | return storage; | 5571 | return storage; |
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 19d6c21220fd..d31bb36ae0dc 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -380,6 +380,8 @@ static void skb_release_head_state(struct sk_buff *skb) | |||
380 | } | 380 | } |
381 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) | 381 | #if defined(CONFIG_NF_CONNTRACK) || defined(CONFIG_NF_CONNTRACK_MODULE) |
382 | nf_conntrack_put(skb->nfct); | 382 | nf_conntrack_put(skb->nfct); |
383 | #endif | ||
384 | #ifdef NET_SKBUFF_NF_DEFRAG_NEEDED | ||
383 | nf_conntrack_put_reasm(skb->nfct_reasm); | 385 | nf_conntrack_put_reasm(skb->nfct_reasm); |
384 | #endif | 386 | #endif |
385 | #ifdef CONFIG_BRIDGE_NETFILTER | 387 | #ifdef CONFIG_BRIDGE_NETFILTER |