aboutsummaryrefslogtreecommitdiffstats
path: root/include/net/sch_generic.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/net/sch_generic.h')
-rw-r--r--include/net/sch_generic.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index dad558bc06fa..67dc08eaaa45 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -427,6 +427,25 @@ static inline struct sk_buff *qdisc_dequeue_head(struct Qdisc *sch)
427 return __qdisc_dequeue_head(sch, &sch->q); 427 return __qdisc_dequeue_head(sch, &sch->q);
428} 428}
429 429
430static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch,
431 struct sk_buff_head *list)
432{
433 struct sk_buff *skb = __qdisc_dequeue_head(sch, list);
434
435 if (likely(skb != NULL)) {
436 unsigned int len = qdisc_pkt_len(skb);
437 kfree_skb(skb);
438 return len;
439 }
440
441 return 0;
442}
443
444static inline unsigned int qdisc_queue_drop_head(struct Qdisc *sch)
445{
446 return __qdisc_queue_drop_head(sch, &sch->q);
447}
448
430static inline struct sk_buff *__qdisc_dequeue_tail(struct Qdisc *sch, 449static inline struct sk_buff *__qdisc_dequeue_tail(struct Qdisc *sch,
431 struct sk_buff_head *list) 450 struct sk_buff_head *list)
432{ 451{