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 d4907b584b38..493e311bbe93 100644
--- a/include/net/sch_generic.h
+++ b/include/net/sch_generic.h
@@ -824,6 +824,16 @@ static inline void __qdisc_drop(struct sk_buff *skb, struct sk_buff **to_free)
824 *to_free = skb; 824 *to_free = skb;
825} 825}
826 826
827static inline void __qdisc_drop_all(struct sk_buff *skb,
828 struct sk_buff **to_free)
829{
830 if (skb->prev)
831 skb->prev->next = *to_free;
832 else
833 skb->next = *to_free;
834 *to_free = skb;
835}
836
827static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch, 837static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch,
828 struct qdisc_skb_head *qh, 838 struct qdisc_skb_head *qh,
829 struct sk_buff **to_free) 839 struct sk_buff **to_free)
@@ -956,6 +966,15 @@ static inline int qdisc_drop(struct sk_buff *skb, struct Qdisc *sch,
956 return NET_XMIT_DROP; 966 return NET_XMIT_DROP;
957} 967}
958 968
969static inline int qdisc_drop_all(struct sk_buff *skb, struct Qdisc *sch,
970 struct sk_buff **to_free)
971{
972 __qdisc_drop_all(skb, to_free);
973 qdisc_qstats_drop(sch);
974
975 return NET_XMIT_DROP;
976}
977
959/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how 978/* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how
960 long it will take to send a packet given its size. 979 long it will take to send a packet given its size.
961 */ 980 */