Skip to content

Commit

Permalink
net: sched: deprecate enqueue_root()
Browse files Browse the repository at this point in the history
Only left enqueue_root() user is netem, and it looks not necessary :

qdisc_skb_cb(skb)->pkt_len is preserved after one skb_clone()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric Dumazet authored and David S. Miller committed May 11, 2015
1 parent 3824246 commit b396cca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 8 deletions.
6 changes: 0 additions & 6 deletions include/net/sch_generic.h
Original file line number Diff line number Diff line change
Expand Up @@ -501,12 +501,6 @@ static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch)
return sch->enqueue(skb, sch);
}

static inline int qdisc_enqueue_root(struct sk_buff *skb, struct Qdisc *sch)
{
qdisc_skb_cb(skb)->pkt_len = skb->len;
return qdisc_enqueue(skb, sch) & NET_XMIT_MASK;
}

static inline bool qdisc_is_percpu_stats(const struct Qdisc *q)
{
return q->flags & TCQ_F_CPUSTATS;
Expand Down
4 changes: 2 additions & 2 deletions net/sched/sch_netem.c
Original file line number Diff line number Diff line change
Expand Up @@ -440,9 +440,9 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch)
if (count > 1 && (skb2 = skb_clone(skb, GFP_ATOMIC)) != NULL) {
struct Qdisc *rootq = qdisc_root(sch);
u32 dupsave = q->duplicate; /* prevent duplicating a dup... */
q->duplicate = 0;

qdisc_enqueue_root(skb2, rootq);
q->duplicate = 0;
rootq->enqueue(skb2, rootq);
q->duplicate = dupsave;
}

Expand Down

0 comments on commit b396cca

Please sign in to comment.