aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 16:25:30 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2011-01-14 16:25:30 -0500
commitd018b6f4f1539f3679fbdc2d02d58d09e76be84a (patch)
tree317b9e04d8e7a73a4d07c69a5cb5455ec34f47e5 /net/sched
parent18bce371ae09af6c20ee62c1092a4d1d0e84dd49 (diff)
parent0f73f2c5a3ebb957ee66718c903c17ed71a4fc2e (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/sched')
-rw-r--r--net/sched/sch_teql.c26
1 files changed, 21 insertions, 5 deletions
diff --git a/net/sched/sch_teql.c b/net/sched/sch_teql.c
index af9360d1f6eb..84ce48eadff4 100644
--- a/net/sched/sch_teql.c
+++ b/net/sched/sch_teql.c
@@ -59,6 +59,10 @@ struct teql_master
59 struct net_device *dev; 59 struct net_device *dev;
60 struct Qdisc *slaves; 60 struct Qdisc *slaves;
61 struct list_head master_list; 61 struct list_head master_list;
62 unsigned long tx_bytes;
63 unsigned long tx_packets;
64 unsigned long tx_errors;
65 unsigned long tx_dropped;
62}; 66};
63 67
64struct teql_sched_data 68struct teql_sched_data
@@ -274,7 +278,6 @@ static inline int teql_resolve(struct sk_buff *skb,
274static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev) 278static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
275{ 279{
276 struct teql_master *master = netdev_priv(dev); 280 struct teql_master *master = netdev_priv(dev);
277 struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
278 struct Qdisc *start, *q; 281 struct Qdisc *start, *q;
279 int busy; 282 int busy;
280 int nores; 283 int nores;
@@ -314,8 +317,8 @@ restart:
314 __netif_tx_unlock(slave_txq); 317 __netif_tx_unlock(slave_txq);
315 master->slaves = NEXT_SLAVE(q); 318 master->slaves = NEXT_SLAVE(q);
316 netif_wake_queue(dev); 319 netif_wake_queue(dev);
317 txq->tx_packets++; 320 master->tx_packets++;
318 txq->tx_bytes += length; 321 master->tx_bytes += length;
319 return NETDEV_TX_OK; 322 return NETDEV_TX_OK;
320 } 323 }
321 __netif_tx_unlock(slave_txq); 324 __netif_tx_unlock(slave_txq);
@@ -342,10 +345,10 @@ restart:
342 netif_stop_queue(dev); 345 netif_stop_queue(dev);
343 return NETDEV_TX_BUSY; 346 return NETDEV_TX_BUSY;
344 } 347 }
345 dev->stats.tx_errors++; 348 master->tx_errors++;
346 349
347drop: 350drop:
348 txq->tx_dropped++; 351 master->tx_dropped++;
349 dev_kfree_skb(skb); 352 dev_kfree_skb(skb);
350 return NETDEV_TX_OK; 353 return NETDEV_TX_OK;
351} 354}
@@ -398,6 +401,18 @@ static int teql_master_close(struct net_device *dev)
398 return 0; 401 return 0;
399} 402}
400 403
404static struct rtnl_link_stats64 *teql_master_stats64(struct net_device *dev,
405 struct rtnl_link_stats64 *stats)
406{
407 struct teql_master *m = netdev_priv(dev);
408
409 stats->tx_packets = m->tx_packets;
410 stats->tx_bytes = m->tx_bytes;
411 stats->tx_errors = m->tx_errors;
412 stats->tx_dropped = m->tx_dropped;
413 return stats;
414}
415
401static int teql_master_mtu(struct net_device *dev, int new_mtu) 416static int teql_master_mtu(struct net_device *dev, int new_mtu)
402{ 417{
403 struct teql_master *m = netdev_priv(dev); 418 struct teql_master *m = netdev_priv(dev);
@@ -422,6 +437,7 @@ static const struct net_device_ops teql_netdev_ops = {
422 .ndo_open = teql_master_open, 437 .ndo_open = teql_master_open,
423 .ndo_stop = teql_master_close, 438 .ndo_stop = teql_master_close,
424 .ndo_start_xmit = teql_master_xmit, 439 .ndo_start_xmit = teql_master_xmit,
440 .ndo_get_stats64 = teql_master_stats64,
425 .ndo_change_mtu = teql_master_mtu, 441 .ndo_change_mtu = teql_master_mtu,
426}; 442};
427 443