]> git.baikalelectronics.ru Git - kernel.git/commit
net: sched: remove remaining uses for qdisc_qlen in xmit path
authorJohn Fastabend <john.fastabend@gmail.com>
Thu, 7 Dec 2017 17:54:47 +0000 (09:54 -0800)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Dec 2017 18:32:25 +0000 (13:32 -0500)
commit10ace9f099e6785495335f491090865041307fd2
tree30cf667a3752f64da2af6d1c8511d6c2c025b9c6
parent9b9fbba49a4bcf25abe71f7096cd3f424ad9eff2
net: sched: remove remaining uses for qdisc_qlen in xmit path

sch_direct_xmit() uses qdisc_qlen as a return value but all call sites
of the routine only check if it is zero or not. Simplify the logic so
that we don't need to return an actual queue length value.

This introduces a case now where sch_direct_xmit would have returned
a qlen of zero but now it returns true. However in this case all
call sites of sch_direct_xmit will implement a dequeue() and get
a null skb and abort. This trades tracking qlen in the hotpath for
an extra dequeue operation. Overall this seems to be good for
performance.

Signed-off-by: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/pkt_sched.h
net/sched/sch_generic.c