Revert "net: sched: Pass root lock to Qdisc_ops.enqueue"
authorPetr Machata <petrm@mellanox.com>
Tue, 14 Jul 2020 17:03:08 +0000 (20:03 +0300)
committerJakub Kicinski <kuba@kernel.org>
Thu, 16 Jul 2020 23:48:34 +0000 (16:48 -0700)
This reverts commit aebe4426ccaa4838f36ea805cdf7d76503e65117.

Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
35 files changed:
include/net/sch_generic.h
net/core/dev.c
net/sched/sch_atm.c
net/sched/sch_blackhole.c
net/sched/sch_cake.c
net/sched/sch_cbq.c
net/sched/sch_cbs.c
net/sched/sch_choke.c
net/sched/sch_codel.c
net/sched/sch_drr.c
net/sched/sch_dsmark.c
net/sched/sch_etf.c
net/sched/sch_ets.c
net/sched/sch_fifo.c
net/sched/sch_fq.c
net/sched/sch_fq_codel.c
net/sched/sch_fq_pie.c
net/sched/sch_generic.c
net/sched/sch_gred.c
net/sched/sch_hfsc.c
net/sched/sch_hhf.c
net/sched/sch_htb.c
net/sched/sch_multiq.c
net/sched/sch_netem.c
net/sched/sch_pie.c
net/sched/sch_plug.c
net/sched/sch_prio.c
net/sched/sch_qfq.c
net/sched/sch_red.c
net/sched/sch_sfb.c
net/sched/sch_sfq.c
net/sched/sch_skbprio.c
net/sched/sch_taprio.c
net/sched/sch_tbf.c
net/sched/sch_teql.c

index fceb3d63c9256bbcc985d8cf352ee810f0c6fa55..c510b03b97513d6be0447c74c44d029d838781b0 100644 (file)
@@ -57,7 +57,6 @@ struct qdisc_skb_head {
 struct Qdisc {
        int                     (*enqueue)(struct sk_buff *skb,
                                           struct Qdisc *sch,
-                                          spinlock_t *root_lock,
                                           struct sk_buff **to_free);
        struct sk_buff *        (*dequeue)(struct Qdisc *sch);
        unsigned int            flags;
@@ -242,7 +241,6 @@ struct Qdisc_ops {
 
        int                     (*enqueue)(struct sk_buff *skb,
                                           struct Qdisc *sch,
-                                          spinlock_t *root_lock,
                                           struct sk_buff **to_free);
        struct sk_buff *        (*dequeue)(struct Qdisc *);
        struct sk_buff *        (*peek)(struct Qdisc *);
@@ -790,11 +788,11 @@ static inline void qdisc_calculate_pkt_len(struct sk_buff *skb,
 #endif
 }
 
-static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static inline int qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                                struct sk_buff **to_free)
 {
        qdisc_calculate_pkt_len(skb, sch);
-       return sch->enqueue(skb, sch, root_lock, to_free);
+       return sch->enqueue(skb, sch, to_free);
 }
 
 static inline void _bstats_update(struct gnet_stats_basic_packed *bstats,
index b61075828358c3547720c42a87697d94e3d3fb90..062a00fdca9b537e17e7c4b799d88671fcb41bdb 100644 (file)
@@ -3749,7 +3749,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
        qdisc_calculate_pkt_len(skb, q);
 
        if (q->flags & TCQ_F_NOLOCK) {
-               rc = q->enqueue(skb, q, NULL, &to_free) & NET_XMIT_MASK;
+               rc = q->enqueue(skb, q, &to_free) & NET_XMIT_MASK;
                qdisc_run(q);
 
                if (unlikely(to_free))
@@ -3792,7 +3792,7 @@ static inline int __dev_xmit_skb(struct sk_buff *skb, struct Qdisc *q,
                qdisc_run_end(q);
                rc = NET_XMIT_SUCCESS;
        } else {
-               rc = q->enqueue(skb, q, root_lock, &to_free) & NET_XMIT_MASK;
+               rc = q->enqueue(skb, q, &to_free) & NET_XMIT_MASK;
                if (qdisc_run_begin(q)) {
                        if (unlikely(contended)) {
                                spin_unlock(&q->busylock);
index 1d5e422d9be22eadb57def79a8d89c722c88bfcb..1c281cc81f57789b787c77622cc2c026414f9c9d 100644 (file)
@@ -374,7 +374,7 @@ static struct tcf_block *atm_tc_tcf_block(struct Qdisc *sch, unsigned long cl,
 
 /* --------------------------- Qdisc operations ---------------------------- */
 
-static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int atm_tc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                          struct sk_buff **to_free)
 {
        struct atm_qdisc_data *p = qdisc_priv(sch);
@@ -432,7 +432,7 @@ done:
 #endif
        }
 
-       ret = qdisc_enqueue(skb, flow->q, root_lock, to_free);
+       ret = qdisc_enqueue(skb, flow->q, to_free);
        if (ret != NET_XMIT_SUCCESS) {
 drop: __maybe_unused
                if (net_xmit_drop_count(ret)) {
index 187644657c4f9d71a7884005638d41d95d5cd404..a7f7667ae9849ae17fdfe5644b4ae463d40ec7ba 100644 (file)
@@ -13,7 +13,7 @@
 #include <linux/skbuff.h>
 #include <net/pkt_sched.h>
 
-static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int blackhole_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                             struct sk_buff **to_free)
 {
        qdisc_drop(skb, sch, to_free);
index b3cdcd86cbfd955d8c6cfcecd5ca1dfc0ba00cf8..561d20c9adca238e7cd2bba23b4acd29dcd8133a 100644 (file)
@@ -1687,7 +1687,7 @@ hash:
 
 static void cake_reconfigure(struct Qdisc *sch);
 
-static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static s32 cake_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                        struct sk_buff **to_free)
 {
        struct cake_sched_data *q = qdisc_priv(sch);
index 9e16fdf47fe7a383434fd27975e1b4f037af770b..b2130df933a7ad60969f1875e344a92b08ed03e8 100644 (file)
@@ -356,7 +356,7 @@ cbq_mark_toplevel(struct cbq_sched_data *q, struct cbq_class *cl)
 }
 
 static int
-cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
            struct sk_buff **to_free)
 {
        struct cbq_sched_data *q = qdisc_priv(sch);
@@ -373,7 +373,7 @@ cbq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
                return ret;
        }
 
-       ret = qdisc_enqueue(skb, cl->q, root_lock, to_free);
+       ret = qdisc_enqueue(skb, cl->q, to_free);
        if (ret == NET_XMIT_SUCCESS) {
                sch->q.qlen++;
                cbq_mark_toplevel(q, cl);
index 7af15ebe07f78b21715c7d57cbd69119494bae3c..2eaac2ff380fafaf9dbaeade2b86e029bddceecc 100644 (file)
@@ -77,7 +77,7 @@ struct cbs_sched_data {
        s64 sendslope; /* in bytes/s */
        s64 idleslope; /* in bytes/s */
        struct qdisc_watchdog watchdog;
-       int (*enqueue)(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+       int (*enqueue)(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free);
        struct sk_buff *(*dequeue)(struct Qdisc *sch);
        struct Qdisc *qdisc;
@@ -85,13 +85,13 @@ struct cbs_sched_data {
 };
 
 static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch,
-                            struct Qdisc *child, spinlock_t *root_lock,
+                            struct Qdisc *child,
                             struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
        int err;
 
-       err = child->ops->enqueue(skb, child, root_lock, to_free);
+       err = child->ops->enqueue(skb, child, to_free);
        if (err != NET_XMIT_SUCCESS)
                return err;
 
@@ -101,16 +101,16 @@ static int cbs_child_enqueue(struct sk_buff *skb, struct Qdisc *sch,
        return NET_XMIT_SUCCESS;
 }
 
-static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int cbs_enqueue_offload(struct sk_buff *skb, struct Qdisc *sch,
                               struct sk_buff **to_free)
 {
        struct cbs_sched_data *q = qdisc_priv(sch);
        struct Qdisc *qdisc = q->qdisc;
 
-       return cbs_child_enqueue(skb, sch, qdisc, root_lock, to_free);
+       return cbs_child_enqueue(skb, sch, qdisc, to_free);
 }
 
-static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch,
                            struct sk_buff **to_free)
 {
        struct cbs_sched_data *q = qdisc_priv(sch);
@@ -124,15 +124,15 @@ static int cbs_enqueue_soft(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *
                q->last = ktime_get_ns();
        }
 
-       return cbs_child_enqueue(skb, sch, qdisc, root_lock, to_free);
+       return cbs_child_enqueue(skb, sch, qdisc, to_free);
 }
 
-static int cbs_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int cbs_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        struct cbs_sched_data *q = qdisc_priv(sch);
 
-       return q->enqueue(skb, sch, root_lock, to_free);
+       return q->enqueue(skb, sch, to_free);
 }
 
 /* timediff is in ns, slope is in bytes/s */
index baf3faee31aacbb2b07fdf4f2e7d4a782b82aeef..bd618b00d3193242b1a166b5c48b3bccbcef5d2e 100644 (file)
@@ -210,7 +210,7 @@ static bool choke_match_random(const struct choke_sched_data *q,
        return choke_match_flow(oskb, nskb);
 }
 
-static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int choke_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                         struct sk_buff **to_free)
 {
        struct choke_sched_data *q = qdisc_priv(sch);
index 1d94837abdd83004352d7574eccb172e006c9ab1..30169b3adbbb064c51b6006755d56446570f974c 100644 (file)
@@ -108,7 +108,7 @@ static struct sk_buff *codel_qdisc_dequeue(struct Qdisc *sch)
        return skb;
 }
 
-static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int codel_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                               struct sk_buff **to_free)
 {
        struct codel_sched_data *q;
index ad14df2ecf3ac858a718efd7cc6c8279aa45049b..dde564670ad8ca17128e45401b369144df9231a3 100644 (file)
@@ -337,7 +337,7 @@ static struct drr_class *drr_classify(struct sk_buff *skb, struct Qdisc *sch,
        return NULL;
 }
 
-static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
@@ -355,7 +355,7 @@ static int drr_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
        }
 
        first = !cl->qdisc->q.qlen;
-       err = qdisc_enqueue(skb, cl->qdisc, root_lock, to_free);
+       err = qdisc_enqueue(skb, cl->qdisc, to_free);
        if (unlikely(err != NET_XMIT_SUCCESS)) {
                if (net_xmit_drop_count(err)) {
                        cl->qstats.drops++;
index 76a9c4f277f296582402511abb4549ebc970390f..2b88710994d71e5339f82ef3fe53ecce961ea42f 100644 (file)
@@ -198,7 +198,7 @@ static struct tcf_block *dsmark_tcf_block(struct Qdisc *sch, unsigned long cl,
 
 /* --------------------------- Qdisc operations ---------------------------- */
 
-static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                          struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
@@ -267,7 +267,7 @@ static int dsmark_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *ro
                }
        }
 
-       err = qdisc_enqueue(skb, p->q, root_lock, to_free);
+       err = qdisc_enqueue(skb, p->q, to_free);
        if (err != NET_XMIT_SUCCESS) {
                if (net_xmit_drop_count(err))
                        qdisc_qstats_drop(sch);
index 7a7c50a6811540c6a354312fb5e05d22bd590672..c48f91075b5c60ee4fe9e10186c913baf5894a69 100644 (file)
@@ -160,7 +160,7 @@ static void report_sock_error(struct sk_buff *skb, u32 err, u8 code)
 }
 
 static int etf_enqueue_timesortedlist(struct sk_buff *nskb, struct Qdisc *sch,
-                                     spinlock_t *root_lock, struct sk_buff **to_free)
+                                     struct sk_buff **to_free)
 {
        struct etf_sched_data *q = qdisc_priv(sch);
        struct rb_node **p = &q->head.rb_root.rb_node, *parent = NULL;
index 1af86f30b18efb0669bb44b3ef28fbfaf2aa39d6..c1e84d1eeaba8fc2181c9dba3bfad78b6f981097 100644 (file)
@@ -415,7 +415,7 @@ static struct ets_class *ets_classify(struct sk_buff *skb, struct Qdisc *sch,
        return &q->classes[band];
 }
 
-static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                             struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
@@ -433,7 +433,7 @@ static int ets_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t
        }
 
        first = !cl->qdisc->q.qlen;
-       err = qdisc_enqueue(skb, cl->qdisc, root_lock, to_free);
+       err = qdisc_enqueue(skb, cl->qdisc, to_free);
        if (unlikely(err != NET_XMIT_SUCCESS)) {
                if (net_xmit_drop_count(err)) {
                        cl->qstats.drops++;
index b4da5b624ad866a0d924a00da520195f0df23ad9..a579a4131d22d771c9766f5ad6cdb16ece3034c0 100644 (file)
@@ -16,7 +16,7 @@
 
 /* 1 band FIFO pseudo-"scheduler" */
 
-static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                         struct sk_buff **to_free)
 {
        if (likely(sch->qstats.backlog + qdisc_pkt_len(skb) <= sch->limit))
@@ -25,7 +25,7 @@ static int bfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *roo
        return qdisc_drop(skb, sch, to_free);
 }
 
-static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                         struct sk_buff **to_free)
 {
        if (likely(sch->q.qlen < sch->limit))
@@ -34,7 +34,7 @@ static int pfifo_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *roo
        return qdisc_drop(skb, sch, to_free);
 }
 
-static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int pfifo_tail_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                              struct sk_buff **to_free)
 {
        unsigned int prev_backlog;
index a90d745c41e05d529ebb1f7f6579f939b7ff2513..2fb76fc0cc31bf732e0b32a95d8e45f457acb683 100644 (file)
@@ -439,7 +439,7 @@ static bool fq_packet_beyond_horizon(const struct sk_buff *skb,
        return unlikely((s64)skb->tstamp > (s64)(q->ktime_cache + q->horizon));
 }
 
-static int fq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int fq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                      struct sk_buff **to_free)
 {
        struct fq_sched_data *q = qdisc_priv(sch);
index bca016ffc069b9a4473a23fa3c2c86b00bc92dc2..3106653c17f33aa6286764910bb036b5abb7ec98 100644 (file)
@@ -181,7 +181,7 @@ static unsigned int fq_codel_drop(struct Qdisc *sch, unsigned int max_packets,
        return idx;
 }
 
-static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int fq_codel_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                            struct sk_buff **to_free)
 {
        struct fq_codel_sched_data *q = qdisc_priv(sch);
index 741840b9994f6a96147b6a1cf94a410c970a25e8..f98c7401880536b65d5ba5138735070242416cd8 100644 (file)
@@ -125,7 +125,7 @@ static inline void flow_queue_add(struct fq_pie_flow *flow,
        skb->next = NULL;
 }
 
-static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int fq_pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                                struct sk_buff **to_free)
 {
        struct fq_pie_sched_data *q = qdisc_priv(sch);
index 715cde1df9e460de0d549b2b91c8feba81952f0f..265a61d011dfaa7ec0f8fb8aaede920784f690c9 100644 (file)
@@ -520,7 +520,7 @@ EXPORT_SYMBOL(netif_carrier_off);
    cheaper.
  */
 
-static int noop_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, spinlock_t *root_lock,
+static int noop_enqueue(struct sk_buff *skb, struct Qdisc *qdisc,
                        struct sk_buff **to_free)
 {
        __qdisc_drop(skb, to_free);
@@ -614,7 +614,7 @@ static inline struct skb_array *band2list(struct pfifo_fast_priv *priv,
        return &priv->q[band];
 }
 
-static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, spinlock_t *root_lock,
+static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc,
                              struct sk_buff **to_free)
 {
        int band = prio2band[skb->priority & TC_PRIO_MAX];
index 7d67c6cd6605b8aad70416e6bbf1e990c5b10059..8599c6f31b057f494f64941929a2012e5fddac5a 100644 (file)
@@ -161,7 +161,7 @@ static bool gred_per_vq_red_flags_used(struct gred_sched *table)
        return false;
 }
 
-static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int gred_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                        struct sk_buff **to_free)
 {
        struct gred_sched_data *q = NULL;
index 13ba8648bb6339cd448ef53f9489e82a36f49e38..0f5f121404f33024f3dc682538740c7c2a6eb880 100644 (file)
@@ -1528,8 +1528,8 @@ hfsc_dump_qdisc(struct Qdisc *sch, struct sk_buff *skb)
        return -1;
 }
 
-static int hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
-                       struct sk_buff **to_free)
+static int
+hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
        struct hfsc_class *cl;
@@ -1545,7 +1545,7 @@ static int hfsc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root
        }
 
        first = !cl->qdisc->q.qlen;
-       err = qdisc_enqueue(skb, cl->qdisc, root_lock, to_free);
+       err = qdisc_enqueue(skb, cl->qdisc, to_free);
        if (unlikely(err != NET_XMIT_SUCCESS)) {
                if (net_xmit_drop_count(err)) {
                        cl->qstats.drops++;
index ddc6bf1d85d0e146107afa99a5fd25a0b5988556..420ede8753229faae172c0829b60d81e8eaa8de8 100644 (file)
@@ -368,7 +368,7 @@ static unsigned int hhf_drop(struct Qdisc *sch, struct sk_buff **to_free)
        return bucket - q->buckets;
 }
 
-static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int hhf_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        struct hhf_sched_data *q = qdisc_priv(sch);
index b07f29059f47d411c45b2d41bc18972f185b4cac..ba37defaca7a945a3336a71a5603dc14b50ace83 100644 (file)
@@ -576,7 +576,7 @@ static inline void htb_deactivate(struct htb_sched *q, struct htb_class *cl)
        cl->prio_activity = 0;
 }
 
-static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        int uninitialized_var(ret);
@@ -599,7 +599,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
                __qdisc_drop(skb, to_free);
                return ret;
 #endif
-       } else if ((ret = qdisc_enqueue(skb, cl->leaf.q, root_lock,
+       } else if ((ret = qdisc_enqueue(skb, cl->leaf.q,
                                        to_free)) != NET_XMIT_SUCCESS) {
                if (net_xmit_drop_count(ret)) {
                        qdisc_qstats_drop(sch);
index 56bdc4bcdc6348bc87557efc8847a064fa8d4da4..5c27b4270b90894dcfdd5c9621a0db8cf13582c3 100644 (file)
@@ -57,7 +57,7 @@ multiq_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
 }
 
 static int
-multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
               struct sk_buff **to_free)
 {
        struct Qdisc *qdisc;
@@ -74,7 +74,7 @@ multiq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
        }
 #endif
 
-       ret = qdisc_enqueue(skb, qdisc, root_lock, to_free);
+       ret = qdisc_enqueue(skb, qdisc, to_free);
        if (ret == NET_XMIT_SUCCESS) {
                sch->q.qlen++;
                return NET_XMIT_SUCCESS;
index 8fb17483a34f3499b219ec95b422922f8fdb3a5d..84f82771cdf5dce6552bd790242a8c0b8b320e06 100644 (file)
@@ -431,7 +431,7 @@ static struct sk_buff *netem_segment(struct sk_buff *skb, struct Qdisc *sch,
  *     NET_XMIT_DROP: queue length didn't change.
  *      NET_XMIT_SUCCESS: one skb was queued.
  */
-static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                         struct sk_buff **to_free)
 {
        struct netem_sched_data *q = qdisc_priv(sch);
@@ -480,7 +480,7 @@ static int netem_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *roo
                u32 dupsave = q->duplicate; /* prevent duplicating a dup... */
 
                q->duplicate = 0;
-               rootq->enqueue(skb2, rootq, root_lock, to_free);
+               rootq->enqueue(skb2, rootq, to_free);
                q->duplicate = dupsave;
                rc_drop = NET_XMIT_SUCCESS;
        }
@@ -604,7 +604,7 @@ finish_segs:
                        skb_mark_not_on_list(segs);
                        qdisc_skb_cb(segs)->pkt_len = segs->len;
                        last_len = segs->len;
-                       rc = qdisc_enqueue(segs, sch, root_lock, to_free);
+                       rc = qdisc_enqueue(segs, sch, to_free);
                        if (rc != NET_XMIT_SUCCESS) {
                                if (net_xmit_drop_count(rc))
                                        qdisc_qstats_drop(sch);
@@ -720,7 +720,7 @@ deliver:
                                struct sk_buff *to_free = NULL;
                                int err;
 
-                               err = qdisc_enqueue(skb, q->qdisc, NULL, &to_free);
+                               err = qdisc_enqueue(skb, q->qdisc, &to_free);
                                kfree_skb_list(to_free);
                                if (err != NET_XMIT_SUCCESS &&
                                    net_xmit_drop_count(err)) {
index b305313b64e30b2ce595fa2453610917d764747a..c65077f0c0f39832ee97f4e89f25639306b19281 100644 (file)
@@ -82,7 +82,7 @@ bool pie_drop_early(struct Qdisc *sch, struct pie_params *params,
 }
 EXPORT_SYMBOL_GPL(pie_drop_early);
 
-static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int pie_qdisc_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                             struct sk_buff **to_free)
 {
        struct pie_sched_data *q = qdisc_priv(sch);
index e5f8b4769b4d60c5347a5744da7d750de4cfed2e..cbc2ebca4548c927070dd2dbd7685cdb6a7ffe8f 100644 (file)
@@ -84,7 +84,7 @@ struct plug_sched_data {
        u32 pkts_to_release;
 };
 
-static int plug_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int plug_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                        struct sk_buff **to_free)
 {
        struct plug_sched_data *q = qdisc_priv(sch);
index 46b7ce81c6e31ef0f9cdd5228a342a85e3a5c30c..3eabb871a1d522ad72b903ad43666ce801220c2d 100644 (file)
@@ -65,8 +65,8 @@ prio_classify(struct sk_buff *skb, struct Qdisc *sch, int *qerr)
        return q->queues[band];
 }
 
-static int prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
-                       struct sk_buff **to_free)
+static int
+prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb);
        struct Qdisc *qdisc;
@@ -83,7 +83,7 @@ static int prio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root
        }
 #endif
 
-       ret = qdisc_enqueue(skb, qdisc, root_lock, to_free);
+       ret = qdisc_enqueue(skb, qdisc, to_free);
        if (ret == NET_XMIT_SUCCESS) {
                sch->qstats.backlog += len;
                sch->q.qlen++;
index 3cfe6262eb00dc00c6dcfcb5518427825094b24a..6335230a971e21233bb1758b57ae72fff41ce6fc 100644 (file)
@@ -1194,7 +1194,7 @@ static struct qfq_aggregate *qfq_choose_next_agg(struct qfq_sched *q)
        return agg;
 }
 
-static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        unsigned int len = qdisc_pkt_len(skb), gso_segs;
@@ -1225,7 +1225,7 @@ static int qfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
 
        gso_segs = skb_is_gso(skb) ? skb_shinfo(skb)->gso_segs : 1;
        first = !cl->qdisc->q.qlen;
-       err = qdisc_enqueue(skb, cl->qdisc, root_lock, to_free);
+       err = qdisc_enqueue(skb, cl->qdisc, to_free);
        if (unlikely(err != NET_XMIT_SUCCESS)) {
                pr_debug("qfq_enqueue: enqueue failed %d\n", err);
                if (net_xmit_drop_count(err)) {
index a79602f7fab8678e2618ee65e4342643a3ff3dfd..4cc0ad0b11892b270acf776157c934097fb319ed 100644 (file)
@@ -67,7 +67,7 @@ static int red_use_nodrop(struct red_sched_data *q)
        return q->flags & TC_RED_NODROP;
 }
 
-static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        struct red_sched_data *q = qdisc_priv(sch);
@@ -126,7 +126,7 @@ static int red_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
                break;
        }
 
-       ret = qdisc_enqueue(skb, child, root_lock, to_free);
+       ret = qdisc_enqueue(skb, child, to_free);
        if (likely(ret == NET_XMIT_SUCCESS)) {
                qdisc_qstats_backlog_inc(sch, skb);
                sch->q.qlen++;
index 356f6d1d30db5af4e051568811ccd808a87807b3..da047a37a3bf3e86b3e463cfb9f79bf986720d07 100644 (file)
@@ -276,7 +276,7 @@ static bool sfb_classify(struct sk_buff *skb, struct tcf_proto *fl,
        return false;
 }
 
-static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
 
@@ -399,7 +399,7 @@ static int sfb_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
        }
 
 enqueue:
-       ret = qdisc_enqueue(skb, child, root_lock, to_free);
+       ret = qdisc_enqueue(skb, child, to_free);
        if (likely(ret == NET_XMIT_SUCCESS)) {
                qdisc_qstats_backlog_inc(sch, skb);
                sch->q.qlen++;
index a1314510dc69f7aacb0ab37be6fd1b10d651ca9a..cae5dbbadc1c1d2987832ac6dd27b218ac8de6ef 100644 (file)
@@ -343,7 +343,7 @@ static int sfq_headdrop(const struct sfq_sched_data *q)
 }
 
 static int
-sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock, struct sk_buff **to_free)
+sfq_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
 {
        struct sfq_sched_data *q = qdisc_priv(sch);
        unsigned int hash, dropped;
index f75f237c44369316fee6c8bfc7c4ee91a44756e9..7a5e4c454715617cb57c6db7de7fdaa9e6886d40 100644 (file)
@@ -65,7 +65,7 @@ static u16 calc_new_low_prio(const struct skbprio_sched_data *q)
        return SKBPRIO_MAX_PRIORITY - 1;
 }
 
-static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int skbprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                          struct sk_buff **to_free)
 {
        const unsigned int max_priority = SKBPRIO_MAX_PRIORITY - 1;
index daef2ff60a985e7ad6577a239715f20eb7faefa3..e981992634ddfe9373fe19d4915615bf5c334691 100644 (file)
@@ -410,7 +410,7 @@ done:
        return txtime;
 }
 
-static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                          struct sk_buff **to_free)
 {
        struct taprio_sched *q = qdisc_priv(sch);
@@ -435,7 +435,7 @@ static int taprio_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *ro
        qdisc_qstats_backlog_inc(sch, skb);
        sch->q.qlen++;
 
-       return qdisc_enqueue(skb, child, root_lock, to_free);
+       return qdisc_enqueue(skb, child, to_free);
 }
 
 static struct sk_buff *taprio_peek_soft(struct Qdisc *sch)
index c3eb5cdb83a82a38048e8e9126ae108d029d20ef..78e79029dc631a8b0a9985ea23b1568b30e10f96 100644 (file)
@@ -187,7 +187,7 @@ static int tbf_offload_dump(struct Qdisc *sch)
 /* GSO packet is too big, segment it so that tbf can transmit
  * each segment in time
  */
-static int tbf_segment(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int tbf_segment(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        struct tbf_sched_data *q = qdisc_priv(sch);
@@ -206,7 +206,7 @@ static int tbf_segment(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
                skb_mark_not_on_list(segs);
                qdisc_skb_cb(segs)->pkt_len = segs->len;
                len += segs->len;
-               ret = qdisc_enqueue(segs, q->qdisc, root_lock, to_free);
+               ret = qdisc_enqueue(segs, q->qdisc, to_free);
                if (ret != NET_XMIT_SUCCESS) {
                        if (net_xmit_drop_count(ret))
                                qdisc_qstats_drop(sch);
@@ -221,7 +221,7 @@ static int tbf_segment(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
        return nb > 0 ? NET_XMIT_SUCCESS : NET_XMIT_DROP;
 }
 
-static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
+static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch,
                       struct sk_buff **to_free)
 {
        struct tbf_sched_data *q = qdisc_priv(sch);
@@ -231,10 +231,10 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_
        if (qdisc_pkt_len(skb) > q->max_size) {
                if (skb_is_gso(skb) &&
                    skb_gso_validate_mac_len(skb, q->max_size))
-                       return tbf_segment(skb, sch, root_lock, to_free);
+                       return tbf_segment(skb, sch, to_free);
                return qdisc_drop(skb, sch, to_free);
        }
-       ret = qdisc_enqueue(skb, q->qdisc, root_lock, to_free);
+       ret = qdisc_enqueue(skb, q->qdisc, to_free);
        if (ret != NET_XMIT_SUCCESS) {
                if (net_xmit_drop_count(ret))
                        qdisc_qstats_drop(sch);
index b586eec2eaeb5c730ab8451993746990ef554a2f..2f1f0a3784083088bf9cfeb3b4c84e1391fb9e54 100644 (file)
@@ -72,8 +72,8 @@ struct teql_sched_data {
 
 /* "teql*" qdisc routines */
 
-static int teql_enqueue(struct sk_buff *skb, struct Qdisc *sch, spinlock_t *root_lock,
-                       struct sk_buff **to_free)
+static int
+teql_enqueue(struct sk_buff *skb, struct Qdisc *sch, struct sk_buff **to_free)
 {
        struct net_device *dev = qdisc_dev(sch);
        struct teql_sched_data *q = qdisc_priv(sch);