diff options
author | John Fastabend <john.fastabend@gmail.com> | 2017-12-07 20:54:47 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-12-08 21:32:25 +0300 |
commit | 29b86cdac00a82f88b81c16659e64cc624550216 (patch) | |
tree | 30cf667a3752f64da2af6d1c8511d6c2c025b9c6 /include/net/pkt_sched.h | |
parent | 6b3ba9146fe64b9bebb6346c9dcfe3b4851de2d7 (diff) | |
download | linux-29b86cdac00a82f88b81c16659e64cc624550216.tar.xz |
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>
Diffstat (limited to 'include/net/pkt_sched.h')
-rw-r--r-- | include/net/pkt_sched.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/net/pkt_sched.h b/include/net/pkt_sched.h index 4eea7198898e..240469228851 100644 --- a/include/net/pkt_sched.h +++ b/include/net/pkt_sched.h @@ -105,9 +105,9 @@ struct qdisc_rate_table *qdisc_get_rtab(struct tc_ratespec *r, void qdisc_put_rtab(struct qdisc_rate_table *tab); void qdisc_put_stab(struct qdisc_size_table *tab); void qdisc_warn_nonwc(const char *txt, struct Qdisc *qdisc); -int sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, - struct net_device *dev, struct netdev_queue *txq, - spinlock_t *root_lock, bool validate); +bool sch_direct_xmit(struct sk_buff *skb, struct Qdisc *q, + struct net_device *dev, struct netdev_queue *txq, + spinlock_t *root_lock, bool validate); void __qdisc_run(struct Qdisc *q); |