net_sched: Add accessor function for packet length for qdiscs
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
committed by
David S. Miller
parent
5f86173bdf
commit
0abf77e55a
@@ -83,7 +83,7 @@ teql_enqueue(struct sk_buff *skb, struct Qdisc* sch)
|
||||
|
||||
if (q->q.qlen < dev->tx_queue_len) {
|
||||
__skb_queue_tail(&q->q, skb);
|
||||
sch->bstats.bytes += skb->len;
|
||||
sch->bstats.bytes += qdisc_pkt_len(skb);
|
||||
sch->bstats.packets++;
|
||||
return 0;
|
||||
}
|
||||
@@ -278,7 +278,6 @@ static int teql_master_xmit(struct sk_buff *skb, struct net_device *dev)
|
||||
struct Qdisc *start, *q;
|
||||
int busy;
|
||||
int nores;
|
||||
int len = skb->len;
|
||||
int subq = skb_get_queue_mapping(skb);
|
||||
struct sk_buff *skb_res = NULL;
|
||||
|
||||
@@ -313,7 +312,8 @@ restart:
|
||||
master->slaves = NEXT_SLAVE(q);
|
||||
netif_wake_queue(dev);
|
||||
master->stats.tx_packets++;
|
||||
master->stats.tx_bytes += len;
|
||||
master->stats.tx_bytes +=
|
||||
qdisc_pkt_len(skb);
|
||||
return 0;
|
||||
}
|
||||
netif_tx_unlock(slave);
|
||||
|
||||
Reference in New Issue
Block a user