aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_sfq.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_sfq.c')
-rw-r--r--net/sched/sch_sfq.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/net/sched/sch_sfq.c b/net/sched/sch_sfq.c
index fe1508ef0d3d..198b83d42ba8 100644
--- a/net/sched/sch_sfq.c
+++ b/net/sched/sch_sfq.c
@@ -391,8 +391,19 @@ sfq_requeue(struct sk_buff *skb, struct Qdisc *sch)
391 return NET_XMIT_CN; 391 return NET_XMIT_CN;
392} 392}
393 393
394static struct sk_buff *
395sfq_peek(struct Qdisc *sch)
396{
397 struct sfq_sched_data *q = qdisc_priv(sch);
398 sfq_index a;
394 399
400 /* No active slots */
401 if (q->tail == SFQ_DEPTH)
402 return NULL;
395 403
404 a = q->next[q->tail];
405 return skb_peek(&q->qs[a]);
406}
396 407
397static struct sk_buff * 408static struct sk_buff *
398sfq_dequeue(struct Qdisc *sch) 409sfq_dequeue(struct Qdisc *sch)
@@ -624,6 +635,7 @@ static struct Qdisc_ops sfq_qdisc_ops __read_mostly = {
624 .priv_size = sizeof(struct sfq_sched_data), 635 .priv_size = sizeof(struct sfq_sched_data),
625 .enqueue = sfq_enqueue, 636 .enqueue = sfq_enqueue,
626 .dequeue = sfq_dequeue, 637 .dequeue = sfq_dequeue,
638 .peek = sfq_peek,
627 .requeue = sfq_requeue, 639 .requeue = sfq_requeue,
628 .drop = sfq_drop, 640 .drop = sfq_drop,
629 .init = sfq_init, 641 .init = sfq_init,