aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_api.c
diff options
context:
space:
mode:
authorJohn Fastabend <john.fastabend@gmail.com>2017-12-07 09:58:19 -0800
committerDavid S. Miller <davem@davemloft.net>2017-12-08 13:32:26 -0500
commitc5ad119fb6c09b0297446be05bd66602fa564758 (patch)
treeb5d6e4718a50dc050bad72c2d641dd5535e26acf /net/sched/sch_api.c
parentnet: skb_array: expose peek API (diff)
downloadlinux-dev-c5ad119fb6c09b0297446be05bd66602fa564758.tar.xz
linux-dev-c5ad119fb6c09b0297446be05bd66602fa564758.zip
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);