net_sched: sch_codel: defer skb freeing in codel_change()
authorEric Dumazet <edumazet@google.com>
Tue, 14 Jun 2016 03:21:52 +0000 (20:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 15 Jun 2016 21:08:35 +0000 (14:08 -0700)
codel_change() can use rtnl_qdisc_drop()
to defer expensive skb freeing after locks are released.

codel_reset() already has support for deferred skb freeing
because it uses qdisc_reset_queue()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/sch_codel.c

index dddf3bb65a328a2de51a5eb9f6f2945b68cc9d11..c5bc424e3b3c26bd5c29aac6dc2e93f9e4edb8e1 100644 (file)
@@ -174,7 +174,7 @@ static int codel_change(struct Qdisc *sch, struct nlattr *opt)
 
                dropped += qdisc_pkt_len(skb);
                qdisc_qstats_backlog_dec(sch, skb);
-               qdisc_drop(skb, sch);
+               rtnl_qdisc_drop(skb, sch);
        }
        qdisc_tree_reduce_backlog(sch, qlen - sch->q.qlen, dropped);