diff options
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index b16ad2972c6b..e5646614e88d 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -102,6 +102,10 @@ static int tclass_notify(struct sk_buff *oskb, struct nlmsghdr *n, | |||
102 | requeues once dequeued packet. It is used for non-standard or | 102 | requeues once dequeued packet. It is used for non-standard or |
103 | just buggy devices, which can defer output even if netif_queue_stopped()=0. | 103 | just buggy devices, which can defer output even if netif_queue_stopped()=0. |
104 | 104 | ||
105 | ---peek | ||
106 | |||
107 | like dequeue but without removing a packet from the queue | ||
108 | |||
105 | ---reset | 109 | ---reset |
106 | 110 | ||
107 | returns qdisc to initial state: purge all buffers, clear all | 111 | returns qdisc to initial state: purge all buffers, clear all |
@@ -149,6 +153,14 @@ int register_qdisc(struct Qdisc_ops *qops) | |||
149 | qops->enqueue = noop_qdisc_ops.enqueue; | 153 | qops->enqueue = noop_qdisc_ops.enqueue; |
150 | if (qops->requeue == NULL) | 154 | if (qops->requeue == NULL) |
151 | qops->requeue = noop_qdisc_ops.requeue; | 155 | qops->requeue = noop_qdisc_ops.requeue; |
156 | if (qops->peek == NULL) { | ||
157 | if (qops->dequeue == NULL) { | ||
158 | qops->peek = noop_qdisc_ops.peek; | ||
159 | } else { | ||
160 | rc = -EINVAL; | ||
161 | goto out; | ||
162 | } | ||
163 | } | ||
152 | if (qops->dequeue == NULL) | 164 | if (qops->dequeue == NULL) |
153 | qops->dequeue = noop_qdisc_ops.dequeue; | 165 | qops->dequeue = noop_qdisc_ops.dequeue; |
154 | 166 | ||