aboutsummaryrefslogtreecommitdiffstats
path: root/net/sched/sch_hfsc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/sched/sch_hfsc.c')
-rw-r--r--net/sched/sch_hfsc.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/net/sched/sch_hfsc.c b/net/sched/sch_hfsc.c
index c1e77da8cd09..ddfc40887848 100644
--- a/net/sched/sch_hfsc.c
+++ b/net/sched/sch_hfsc.c
@@ -880,28 +880,20 @@ set_passive(struct hfsc_class *cl)
880 */ 880 */
881} 881}
882 882
883/*
884 * hack to get length of first packet in queue.
885 */
886static unsigned int 883static unsigned int
887qdisc_peek_len(struct Qdisc *sch) 884qdisc_peek_len(struct Qdisc *sch)
888{ 885{
889 struct sk_buff *skb; 886 struct sk_buff *skb;
890 unsigned int len; 887 unsigned int len;
891 888
892 skb = sch->dequeue(sch); 889 skb = sch->ops->peek(sch);
893 if (skb == NULL) { 890 if (skb == NULL) {
894 if (net_ratelimit()) 891 if (net_ratelimit())
895 printk("qdisc_peek_len: non work-conserving qdisc ?\n"); 892 printk("qdisc_peek_len: non work-conserving qdisc ?\n");
896 return 0; 893 return 0;
897 } 894 }
898 len = qdisc_pkt_len(skb); 895 len = qdisc_pkt_len(skb);
899 if (unlikely(sch->ops->requeue(skb, sch) != NET_XMIT_SUCCESS)) { 896
900 if (net_ratelimit())
901 printk("qdisc_peek_len: failed to requeue\n");
902 qdisc_tree_decrease_qlen(sch, 1);
903 return 0;
904 }
905 return len; 897 return len;
906} 898}
907 899