Lines Matching defs:sch

873 static void pfifo_fast_destroy(struct Qdisc *sch)
875 struct pfifo_fast_priv *priv = qdisc_priv(sch);
893 static int pfifo_fast_change_tx_queue_len(struct Qdisc *sch,
896 struct pfifo_fast_priv *priv = qdisc_priv(sch);
932 struct Qdisc *sch;
933 unsigned int size = sizeof(*sch) + ops->priv_size;
944 sch = kzalloc_node(size, GFP_KERNEL, netdev_queue_numa_node_read(dev_queue));
946 if (!sch)
948 __skb_queue_head_init(&sch->gso_skb);
949 __skb_queue_head_init(&sch->skb_bad_txq);
950 gnet_stats_basic_sync_init(&sch->bstats);
951 lockdep_register_key(&sch->root_lock_key);
952 spin_lock_init(&sch->q.lock);
953 lockdep_set_class(&sch->q.lock, &sch->root_lock_key);
956 sch->cpu_bstats =
958 if (!sch->cpu_bstats)
961 sch->cpu_qstats = alloc_percpu(struct gnet_stats_queue);
962 if (!sch->cpu_qstats) {
963 free_percpu(sch->cpu_bstats);
968 spin_lock_init(&sch->busylock);
969 lockdep_set_class(&sch->busylock,
973 spin_lock_init(&sch->seqlock);
974 lockdep_set_class(&sch->seqlock,
977 sch->ops = ops;
978 sch->flags = ops->static_flags;
979 sch->enqueue = ops->enqueue;
980 sch->dequeue = ops->dequeue;
981 sch->dev_queue = dev_queue;
982 sch->owner = -1;
983 netdev_hold(dev, &sch->dev_tracker, GFP_KERNEL);
984 refcount_set(&sch->refcnt, 1);
986 return sch;
988 lockdep_unregister_key(&sch->root_lock_key);
989 kfree(sch);
999 struct Qdisc *sch;
1006 sch = qdisc_alloc(dev_queue, ops, extack);
1007 if (IS_ERR(sch)) {
1011 sch->parent = parentid;
1013 if (!ops->init || ops->init(sch, NULL, extack) == 0) {
1015 return sch;
1018 qdisc_put(sch);
1420 void mq_change_real_num_tx(struct Qdisc *sch, unsigned int new_real_tx)
1423 struct net_device *dev = qdisc_dev(sch);