requeues once dequeued packet. It is used for non-standard or
just buggy devices, which can defer output even if netif_queue_stopped()=0.
+ ---peek
+
+ like dequeue but without removing a packet from the queue
+
---reset
returns qdisc to initial state: purge all buffers, clear all
qops->enqueue = noop_qdisc_ops.enqueue;
if (qops->requeue == NULL)
qops->requeue = noop_qdisc_ops.requeue;
+ if (qops->peek == NULL) {
+ if (qops->dequeue == NULL) {
+ qops->peek = noop_qdisc_ops.peek;
+ } else {
+ rc = -EINVAL;
+ goto out;
+ }
+ }
if (qops->dequeue == NULL)
qops->dequeue = noop_qdisc_ops.dequeue;
.priv_size = 0,
.enqueue = noop_enqueue,
.dequeue = noop_dequeue,
+ .peek = noop_dequeue,
.requeue = noop_requeue,
.owner = THIS_MODULE,
};
.priv_size = 0,
.enqueue = noop_enqueue,
.dequeue = noop_dequeue,
+ .peek = noop_dequeue,
.requeue = noop_requeue,
.owner = THIS_MODULE,
};
return NULL;
}
+static struct sk_buff *pfifo_fast_peek(struct Qdisc* qdisc)
+{
+ int prio;
+ struct sk_buff_head *list = qdisc_priv(qdisc);
+
+ for (prio = 0; prio < PFIFO_FAST_BANDS; prio++) {
+ if (!skb_queue_empty(list + prio))
+ return skb_peek(list + prio);
+ }
+
+ return NULL;
+}
+
static int pfifo_fast_requeue(struct sk_buff *skb, struct Qdisc* qdisc)
{
qdisc->q.qlen++;
.priv_size = PFIFO_FAST_BANDS * sizeof(struct sk_buff_head),
.enqueue = pfifo_fast_enqueue,
.dequeue = pfifo_fast_dequeue,
+ .peek = pfifo_fast_peek,
.requeue = pfifo_fast_requeue,
.init = pfifo_fast_init,
.reset = pfifo_fast_reset,