diff options
author | Jussi Kivilinna <jussi.kivilinna@mbnet.fi> | 2008-07-20 00:08:27 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-07-20 00:08:27 -0700 |
commit | 0abf77e55a2459aa9905be4b226e4729d5b4f0cb (patch) | |
tree | 0224961150c0c2c65b5ad407b1af8cf84266e919 /net/sched/sch_tbf.c | |
parent | 5f86173bdf15981ca49d0434f638b68f70a35644 (diff) | |
download | linux-3.10-0abf77e55a2459aa9905be4b226e4729d5b4f0cb.tar.gz linux-3.10-0abf77e55a2459aa9905be4b226e4729d5b4f0cb.tar.bz2 linux-3.10-0abf77e55a2459aa9905be4b226e4729d5b4f0cb.zip |
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>
Diffstat (limited to 'net/sched/sch_tbf.c')
-rw-r--r-- | net/sched/sch_tbf.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 7d705b86dae..b296672f763 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c @@ -123,7 +123,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) struct tbf_sched_data *q = qdisc_priv(sch); int ret; - if (skb->len > q->max_size) { + if (qdisc_pkt_len(skb) > q->max_size) { sch->qstats.drops++; #ifdef CONFIG_NET_CLS_ACT if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) @@ -140,7 +140,7 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) } sch->q.qlen++; - sch->bstats.bytes += skb->len; + sch->bstats.bytes += qdisc_pkt_len(skb); sch->bstats.packets++; return 0; } @@ -181,7 +181,7 @@ static struct sk_buff *tbf_dequeue(struct Qdisc* sch) psched_time_t now; long toks; long ptoks = 0; - unsigned int len = skb->len; + unsigned int len = qdisc_pkt_len(skb); now = psched_get_time(); toks = psched_tdiff_bounded(now, q->t_c, q->buffer); |