Skip to content

Commit

Permalink
sched: replace __skb_dequeue with __qdisc_dequeue_head
Browse files Browse the repository at this point in the history
After previous patch these functions are identical.
Replace __skb_dequeue in qdiscs with __qdisc_dequeue_head.

Next patch will then make __qdisc_dequeue_head handle
single-linked list instead of strcut sk_buff_head argument.

Doesn't change generated code.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Florian Westphal authored and David S. Miller committed Sep 19, 2016
1 parent ec32336 commit ed760cb
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions net/sched/sch_codel.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ struct codel_sched_data {
static struct sk_buff *dequeue_func(struct codel_vars *vars, void *ctx)
{
struct Qdisc *sch = ctx;
struct sk_buff *skb = __skb_dequeue(&sch->q);
struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);

if (skb)
sch->qstats.backlog -= qdisc_pkt_len(skb);
Expand Down Expand Up @@ -172,7 +172,7 @@ static int codel_change(struct Qdisc *sch, struct nlattr *opt)

qlen = sch->q.qlen;
while (sch->q.qlen > sch->limit) {
struct sk_buff *skb = __skb_dequeue(&sch->q);
struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);

dropped += qdisc_pkt_len(skb);
qdisc_qstats_backlog_dec(sch, skb);
Expand Down
2 changes: 1 addition & 1 deletion net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ static struct sk_buff *netem_dequeue(struct Qdisc *sch)
struct rb_node *p;

tfifo_dequeue:
skb = __skb_dequeue(&sch->q);
skb = __qdisc_dequeue_head(&sch->q);
if (skb) {
qdisc_qstats_backlog_dec(sch, skb);
deliver:
Expand Down
2 changes: 1 addition & 1 deletion net/sched/sch_pie.c
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ static int pie_change(struct Qdisc *sch, struct nlattr *opt)
/* Drop excess packets if new limit is lower */
qlen = sch->q.qlen;
while (sch->q.qlen > sch->limit) {
struct sk_buff *skb = __skb_dequeue(&sch->q);
struct sk_buff *skb = __qdisc_dequeue_head(&sch->q);

dropped += qdisc_pkt_len(skb);
qdisc_qstats_backlog_dec(sch, skb);
Expand Down

0 comments on commit ed760cb

Please sign in to comment.