diff options
author | Florian Westphal <fw@strlen.de> | 2016-09-18 00:57:31 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-19 01:47:18 -0400 |
commit | 97d0678f913369af0dc8b510a682a641654ab743 (patch) | |
tree | d88ecc69e4ae92f7f1d2ff39e79c32c61b067d8d /net/sched/sch_netem.c | |
parent | 1486587b2fcda08dee7eab23784d504eed772c45 (diff) | |
download | linux-97d0678f913369af0dc8b510a682a641654ab743.tar.bz2 |
sched: don't use skb queue helpers
A followup change will replace the sk_buff_head in the qdisc
struct with a slightly different list.
Use of the sk_buff_head helpers will thus cause compiler
warnings.
Open-code these accesses in an extra change to ease review.
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_netem.c')
-rw-r--r-- | net/sched/sch_netem.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/sched/sch_netem.c b/net/sched/sch_netem.c index aaaf02175338..1832d7732dbc 100644 --- a/net/sched/sch_netem.c +++ b/net/sched/sch_netem.c @@ -502,7 +502,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch, 1<<(prandom_u32() % 8); } - if (unlikely(skb_queue_len(&sch->q) >= sch->limit)) + if (unlikely(sch->q.qlen >= sch->limit)) return qdisc_drop(skb, sch, to_free); qdisc_qstats_backlog_inc(sch, skb); @@ -522,7 +522,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch, if (q->rate) { struct sk_buff *last; - if (!skb_queue_empty(&sch->q)) + if (sch->q.qlen) last = skb_peek_tail(&sch->q); else last = netem_rb_to_skb(rb_last(&q->t_root)); |