]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/net/sch_generic.h
net/mlx5e: Rx, Fix checksum calculation for new hardware
[mirror_ubuntu-bionic-kernel.git] / include / net / sch_generic.h
index becf86aa4ac6bc92e8078247a1c912323b63b131..ab1dfa9c829c615c43dcf0efe9f0cba22345ef0d 100644 (file)
@@ -280,7 +280,6 @@ struct tcf_block {
        struct net *net;
        struct Qdisc *q;
        struct list_head cb_list;
-       struct work_struct work;
 };
 
 static inline void qdisc_cb_private_validate(const struct sk_buff *skb, int sz)
@@ -313,6 +312,11 @@ static inline struct Qdisc *qdisc_root(const struct Qdisc *qdisc)
        return q;
 }
 
+static inline struct Qdisc *qdisc_root_bh(const struct Qdisc *qdisc)
+{
+       return rcu_dereference_bh(qdisc->dev_queue->qdisc);
+}
+
 static inline struct Qdisc *qdisc_root_sleeping(const struct Qdisc *qdisc)
 {
        return qdisc->dev_queue->qdisc_sleeping;
@@ -736,6 +740,16 @@ static inline void __qdisc_drop(struct sk_buff *skb, struct sk_buff **to_free)
        *to_free = skb;
 }
 
+static inline void __qdisc_drop_all(struct sk_buff *skb,
+                                   struct sk_buff **to_free)
+{
+       if (skb->prev)
+               skb->prev->next = *to_free;
+       else
+               skb->next = *to_free;
+       *to_free = skb;
+}
+
 static inline unsigned int __qdisc_queue_drop_head(struct Qdisc *sch,
                                                   struct qdisc_skb_head *qh,
                                                   struct sk_buff **to_free)
@@ -856,6 +870,15 @@ static inline int qdisc_drop(struct sk_buff *skb, struct Qdisc *sch,
        return NET_XMIT_DROP;
 }
 
+static inline int qdisc_drop_all(struct sk_buff *skb, struct Qdisc *sch,
+                                struct sk_buff **to_free)
+{
+       __qdisc_drop_all(skb, to_free);
+       qdisc_qstats_drop(sch);
+
+       return NET_XMIT_DROP;
+}
+
 /* Length to Time (L2T) lookup in a qdisc_rate_table, to determine how
    long it will take to send a packet given its size.
  */