summaryrefslogtreecommitdiff
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-12-07 20:58:19 +0300
committerDavid S. Miller <davem@davemloft.net>2017-12-08 21:32:26 +0300
commitc5ad119fb6c09b0297446be05bd66602fa564758 (patch)
treeb5d6e4718a50dc050bad72c2d641dd5535e26acf /net/sched/sch_api.c
parent4a86a4cf68b4996a656d8c666617e8d839f8f839 (diff)
downloadlinux-c5ad119fb6c09b0297446be05bd66602fa564758.tar.xz
net: sched: pfifo_fast use skb_array
This converts the pfifo_fast qdisc to use the skb_array data structure and set the lockless qdisc bit. pfifo_fast is the first qdisc to support the lockless bit that can be a child of a qdisc requiring locking. So we add logic to clear the lock bit on initialization in these cases when the qdisc graft operation occurs. This also removes the logic used to pick the next band to dequeue from and instead just checks a per priority array for packets from top priority to lowest. This might need to be a bit more clever but seems to work for now. Signed-off-by: John Fastabend <john.fastabend@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r--net/sched/sch_api.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c
index c669bb3b89b2..a904276b657d 100644
--- a/net/sched/sch_api.c
+++ b/net/sched/sch_api.c
@@ -955,6 +955,11 @@ skip:
} else {
const struct Qdisc_class_ops *cops = parent->ops->cl_ops;
+ /* Only support running class lockless if parent is lockless */
+ if (new && (new->flags & TCQ_F_NOLOCK) &&
+ parent && !(parent->flags & TCQ_F_NOLOCK))
+ new->flags &= ~TCQ_F_NOLOCK;
+
err = -EOPNOTSUPP;
if (cops && cops->graft) {
unsigned long cl = cops->find(parent, classid);