|
|
@@ -59,6 +59,10 @@ struct teql_master
|
|
|
struct net_device *dev;
|
|
|
struct Qdisc *slaves;
|
|
|
struct list_head master_list;
|
|
|
+ unsigned long tx_bytes;
|
|
|
+ unsigned long tx_packets;
|
|
|
+ unsigned long tx_errors;
|
|
|
+ unsigned long tx_dropped;
|
|
|
};
|
|
|
|
|
|
struct teql_sched_data
|
|
|
@@ -274,7 +278,6 @@ static inline int teql_resolve(struct sk_buff *skb,
|
|
|
static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
{
|
|
|
struct teql_master *master = netdev_priv(dev);
|
|
|
- struct netdev_queue *txq = netdev_get_tx_queue(dev, 0);
|
|
|
struct Qdisc *start, *q;
|
|
|
int busy;
|
|
|
int nores;
|
|
|
@@ -314,8 +317,8 @@ static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
__netif_tx_unlock(slave_txq);
|
|
|
master->slaves = NEXT_SLAVE(q);
|
|
|
netif_wake_queue(dev);
|
|
|
- txq->tx_packets++;
|
|
|
- txq->tx_bytes += length;
|
|
|
+ master->tx_packets++;
|
|
|
+ master->tx_bytes += length;
|
|
|
return NETDEV_TX_OK;
|
|
|
}
|
|
|
__netif_tx_unlock(slave_txq);
|
|
|
@@ -342,10 +345,10 @@ static netdev_tx_t teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
|
|
|
netif_stop_queue(dev);
|
|
|
return NETDEV_TX_BUSY;
|
|
|
}
|
|
|
- dev->stats.tx_errors++;
|
|
|
+ master->tx_errors++;
|
|
|
|
|
|
drop:
|
|
|
- txq->tx_dropped++;
|
|
|
+ master->tx_dropped++;
|
|
|
dev_kfree_skb(skb);
|
|
|
return NETDEV_TX_OK;
|
|
|
}
|
|
|
@@ -398,6 +401,18 @@ static int teql_master_close(struct net_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
+static struct rtnl_link_stats64 *teql_master_stats64(struct net_device *dev,
|
|
|
+ struct rtnl_link_stats64 *stats)
|
|
|
+{
|
|
|
+ struct teql_master *m = netdev_priv(dev);
|
|
|
+
|
|
|
+ stats->tx_packets = m->tx_packets;
|
|
|
+ stats->tx_bytes = m->tx_bytes;
|
|
|
+ stats->tx_errors = m->tx_errors;
|
|
|
+ stats->tx_dropped = m->tx_dropped;
|
|
|
+ return stats;
|
|
|
+}
|
|
|
+
|
|
|
static int teql_master_mtu(struct net_device *dev, int new_mtu)
|
|
|
{
|
|
|
struct teql_master *m = netdev_priv(dev);
|
|
|
@@ -422,6 +437,7 @@ static const struct net_device_ops teql_netdev_ops = {
|
|
|
.ndo_open = teql_master_open,
|
|
|
.ndo_stop = teql_master_close,
|
|
|
.ndo_start_xmit = teql_master_xmit,
|
|
|
+ .ndo_get_stats64 = teql_master_stats64,
|
|
|
.ndo_change_mtu = teql_master_mtu,
|
|
|
};
|
|
|
|