/linux/drivers/net/ethernet/netronome/nfp/abm/ |
H A D | qdisc.c | 16 static bool nfp_abm_qdisc_is_red(struct nfp_qdisc *qdisc) in nfp_abm_qdisc_is_red() argument 18 return qdisc->type == NFP_QDISC_RED || qdisc->type == NFP_QDISC_GRED; in nfp_abm_qdisc_is_red() 21 static bool nfp_abm_qdisc_child_valid(struct nfp_qdisc *qdisc, unsigned int id) in nfp_abm_qdisc_child_valid() argument 23 return qdisc->children[id] && in nfp_abm_qdisc_child_valid() 24 qdisc->children[id] != NFP_QDISC_UNTRACKED; in nfp_abm_qdisc_child_valid() 45 nfp_abm_stats_update_red(struct nfp_abm_link *alink, struct nfp_qdisc *qdisc, in nfp_abm_stats_update_red() argument 52 if (!qdisc->offloaded) in nfp_abm_stats_update_red() 55 for (i = 0; i < qdisc->red.num_bands; i++) { in nfp_abm_stats_update_red() 57 &qdisc->red.band[i].stats); in nfp_abm_stats_update_red() 63 &qdisc->red.band[i].xstats); in nfp_abm_stats_update_red() [all …]
|
/linux/net/sched/ |
H A D | sch_generic.c | 639 static int noop_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, in noop_enqueue() argument 647 static struct sk_buff *noop_dequeue(struct Qdisc *qdisc) in noop_dequeue() argument 662 RCU_POINTER_INITIALIZER(qdisc, &noop_qdisc), 690 static int noqueue_init(struct Qdisc *qdisc, struct nlattr *opt, in noqueue_init() argument 696 qdisc->enqueue = NULL; in noqueue_init() 735 static int pfifo_fast_enqueue(struct sk_buff *skb, struct Qdisc *qdisc, in pfifo_fast_enqueue() argument 739 struct pfifo_fast_priv *priv = qdisc_priv(qdisc); in pfifo_fast_enqueue() 747 if (qdisc_is_percpu_stats(qdisc)) in pfifo_fast_enqueue() 748 return qdisc_drop_cpu(skb, qdisc, to_free); in pfifo_fast_enqueue() 750 return qdisc_drop(skb, qdisc, to_free); in pfifo_fast_enqueue() [all …]
|
H A D | sch_mq.c | 73 struct Qdisc *qdisc; in mq_init() local 90 qdisc = qdisc_create_dflt(dev_queue, get_default_qdisc_ops(dev, ntx), in mq_init() 94 if (!qdisc) in mq_init() 96 priv->qdiscs[ntx] = qdisc; in mq_init() 97 qdisc->flags |= TCQ_F_ONETXQUEUE | TCQ_F_NOPARENT; in mq_init() 110 struct Qdisc *qdisc, *old; in mq_attach() local 114 qdisc = priv->qdiscs[ntx]; in mq_attach() 115 old = dev_graft_qdisc(qdisc->dev_queue, qdisc); in mq_attach() 120 qdisc_hash_add(qdisc, false); in mq_attach() 131 struct Qdisc *qdisc; in mq_dump() local [all …]
|
H A D | sch_drr.c | 25 struct Qdisc *qdisc; member 110 cl->qdisc = qdisc_create_dflt(sch->dev_queue, in drr_change_class() 113 if (cl->qdisc == NULL) in drr_change_class() 114 cl->qdisc = &noop_qdisc; in drr_change_class() 116 qdisc_hash_add(cl->qdisc, true); in drr_change_class() 123 qdisc_put(cl->qdisc); in drr_change_class() 142 qdisc_put(cl->qdisc); in drr_destroy_class() 159 qdisc_purge_queue(cl->qdisc); in drr_delete_class() 217 *old = qdisc_replace(sch, new, &cl->qdisc); in drr_graft_class() 225 return cl->qdisc; in drr_class_leaf() [all …]
|
H A D | sch_mqprio.c | 351 struct Qdisc *qdisc; in mqprio_init() local 398 qdisc = qdisc_create_dflt(dev_queue, in mqprio_init() 402 if (!qdisc) in mqprio_init() 405 priv->qdiscs[i] = qdisc; in mqprio_init() 406 qdisc->flags |= TCQ_F_ONETXQUEUE | TCQ_F_NOPARENT; in mqprio_init() 436 struct Qdisc *qdisc, *old; in mqprio_attach() local 441 qdisc = priv->qdiscs[ntx]; in mqprio_attach() 442 old = dev_graft_qdisc(qdisc->dev_queue, qdisc); in mqprio_attach() 446 qdisc_hash_add(qdisc, false); in mqprio_attach() 559 struct Qdisc *qdisc; in mqprio_dump() local [all …]
|
H A D | sch_ets.c | 41 struct Qdisc *qdisc; member 262 *old = qdisc_replace(sch, new, &cl->qdisc); in ets_class_graft() 271 return cl->qdisc; in ets_class_leaf() 306 tcm->tcm_info = cl->qdisc->handle; in ets_class_dump() 326 struct Qdisc *cl_q = cl->qdisc; in ets_class_dump_stats() 427 first = !cl->qdisc->q.qlen; in ets_qdisc_enqueue() 428 err = qdisc_enqueue(skb, cl->qdisc, to_free); in ets_qdisc_enqueue() 467 skb = qdisc_dequeue_peeked(cl->qdisc); in ets_qdisc_dequeue() 476 skb = cl->qdisc->ops->peek(cl->qdisc); in ets_qdisc_dequeue() 478 qdisc_warn_nonwc(__func__, cl->qdisc); in ets_qdisc_dequeue() [all …]
|
H A D | sch_tbf.c | 111 struct Qdisc *qdisc; /* Inner qdisc, default - bfifo queue */ member 224 ret = qdisc_enqueue(segs, q->qdisc, to_free); in tbf_segment() 258 ret = qdisc_enqueue(skb, q->qdisc, to_free); in tbf_enqueue() 280 skb = q->qdisc->ops->peek(q->qdisc); in tbf_dequeue() 303 skb = qdisc_dequeue_peeked(q->qdisc); in tbf_dequeue() 339 qdisc_reset(q->qdisc); in tbf_reset() 437 if (q->qdisc != &noop_qdisc) { in tbf_change() 438 err = fifo_set_limit(q->qdisc, qopt->limit); in tbf_change() 455 qdisc_tree_flush_backlog(q->qdisc); in tbf_change() 456 old = q->qdisc; in tbf_change() [all …]
|
H A D | sch_multiq.c | 63 struct Qdisc *qdisc; in multiq_enqueue() local 66 qdisc = multiq_classify(skb, sch, &ret); in multiq_enqueue() 68 if (qdisc == NULL) { in multiq_enqueue() 77 ret = qdisc_enqueue(skb, qdisc, to_free); in multiq_enqueue() 90 struct Qdisc *qdisc; in multiq_dequeue() local 105 qdisc = q->queues[q->curband]; in multiq_dequeue() 106 skb = qdisc->dequeue(qdisc); in multiq_dequeue() 122 struct Qdisc *qdisc; in multiq_peek() local 137 qdisc in multiq_peek() [all...] |
/linux/include/net/ |
H A D | sch_generic.h | 136 static inline void qdisc_refcount_inc(struct Qdisc *qdisc) in qdisc_refcount_inc() argument 138 if (qdisc->flags & TCQ_F_BUILTIN) in qdisc_refcount_inc() 140 refcount_inc(&qdisc->refcnt); in qdisc_refcount_inc() 143 static inline bool qdisc_refcount_dec_if_one(struct Qdisc *qdisc) in qdisc_refcount_dec_if_one() argument 145 if (qdisc->flags & TCQ_F_BUILTIN) in qdisc_refcount_dec_if_one() 147 return refcount_dec_if_one(&qdisc->refcnt); in qdisc_refcount_dec_if_one() 154 static inline struct Qdisc *qdisc_refcount_inc_nz(struct Qdisc *qdisc) in qdisc_refcount_inc_nz() argument 156 if (qdisc->flags & TCQ_F_BUILTIN) in qdisc_refcount_inc_nz() 157 return qdisc; in qdisc_refcount_inc_nz() 158 if (refcount_inc_not_zero(&qdisc->refcnt)) in qdisc_refcount_inc_nz() [all …]
|
/linux/tools/testing/selftests/bpf/prog_tests/ |
H A D | cgroup_ancestor.c | 18 struct bpf_tc_hook qdisc; member 58 memset(&t->qdisc, 0, sizeof(t->qdisc)); in setup_network() 59 t->qdisc.sz = sizeof(t->qdisc); in setup_network() 60 t->qdisc.attach_point = BPF_TC_EGRESS; in setup_network() 61 t->qdisc.ifindex = if_nametoindex("lo"); in setup_network() 62 if (!ASSERT_NEQ(t->qdisc.ifindex, 0, "if_nametoindex")) in setup_network() 64 if (!ASSERT_OK(bpf_tc_hook_create(&t->qdisc), "qdisc add")) in setup_network() 70 if (!ASSERT_OK(bpf_tc_attach(&t->qdisc, &t->tc_attach), "filter add")) in setup_network() 76 bpf_tc_hook_destroy(&t->qdisc); in setup_network() 87 bpf_tc_detach(&t->qdisc, &t->tc_attach); in cleanup_network() [all …]
|
/linux/include/trace/events/ |
H A D | qdisc.h | 2 #define TRACE_SYSTEM qdisc 16 TP_PROTO(struct Qdisc *qdisc, const struct netdev_queue *txq, 19 TP_ARGS(qdisc, txq, packets, skb), 22 __field( struct Qdisc *, qdisc ) 34 __entry->qdisc = qdisc; 39 __entry->handle = qdisc->handle; 40 __entry->parent = qdisc->parent; 44 TP_printk("dequeue ifindex=%d qdisc handle=0x%X parent=0x%X txq_state=0x%lX packets=%d skbaddr=%p", 51 TP_PROTO(struct Qdisc *qdisc, cons [all...] |
/linux/tools/testing/selftests/drivers/net/mlxsw/ |
H A D | tc_restrictions.sh | 44 tc qdisc add dev $swp1 ingress_block 22 clsact 51 tc qdisc add dev $swp2 ingress_block 22 clsact 54 tc qdisc del dev $swp2 clsact 56 tc qdisc add dev $swp2 egress_block 22 clsact 61 tc qdisc add dev $swp2 egress_block 22 clsact 68 tc qdisc del dev $swp1 clsact 70 tc qdisc add dev $swp1 egress_block 22 clsact 79 tc qdisc del dev $swp2 clsact 80 tc qdisc del dev $swp1 clsact 92 tc qdisc add dev $swp1 ingress_block 22 clsact [all …]
|
H A D | sch_offload.sh | 57 tc qdisc add dev $h1 $locus handle $handle \ 60 tc qdisc del dev $h1 $locus 68 tc qdisc add dev $h1 $locus handle $handle \ 71 tc qdisc del dev $h1 $locus 79 tc qdisc add dev $h1 $locus handle $handle \ 82 tc qdisc del dev $h1 $locus 90 tc qdisc add dev $h1 $locus handle $handle \ 93 tc qdisc del dev $h1 $locus 101 tc qdisc add dev $h1 $locus handle $handle pfifo limit 100K 103 tc qdisc del dev $h1 $locus [all …]
|
H A D | qos_headroom.sh | 168 tc qdisc replace dev $swp root handle 1: bfifo limit 1.5M 170 tc qdisc delete dev $swp root 248 tc qdisc replace dev $swp root handle 1: bfifo limit 1.5M 254 tc qdisc delete dev $swp root 258 tc qdisc replace dev $swp root handle 1: bfifo limit 1.5M 260 tc qdisc delete dev $swp root 276 tc qdisc replace dev $swp root handle 1: bfifo limit 1.5M 290 tc qdisc replace dev $swp root handle 1: bfifo limit 1M 298 tc qdisc replace dev $swp root handle 2: prio bands 8 303 tc qdisc delete dev $swp root [all …]
|
H A D | sch_red_ets.sh | 28 tc qdisc add dev $swp3 parent 1: handle 10: $QDISC \ 36 tc qdisc add dev $swp3 parent 10:8 handle 108: red \ 45 tc qdisc add dev $swp3 parent 10:7 handle 107: red \ 60 tc qdisc del dev $swp3 parent 10:8 65 tc qdisc del dev $swp3 parent 10:7 70 tc qdisc del dev $swp3 parent 1: 116 check_err $? "backlog of $cur observed on non-busy qdisc"
|
H A D | qos_dscp_router.sh | 68 tc qdisc add dev $h1 clsact 77 tc qdisc del dev $h1 clsact 84 tc qdisc add dev $h2 clsact 93 tc qdisc del dev $h2 clsact 102 tc qdisc add dev $swp1 clsact 103 tc qdisc add dev $swp2 clsact 114 tc qdisc del dev $swp2 clsact 115 tc qdisc del dev $swp1 clsact
|
H A D | rif_mac_profiles.sh | 19 tc qdisc add dev $h1 ingress 24 tc qdisc del dev $h1 ingress 35 tc qdisc add dev $h2 ingress 40 tc qdisc del dev $h2 ingress 51 tc qdisc add dev $rp1 clsact 52 tc qdisc add dev $rp2 clsact 61 tc qdisc del dev $rp2 clsact 62 tc qdisc del dev $rp1 clsact
|
H A D | qos_pfc.sh | 173 tc qdisc replace dev $swp1 root handle 1: \ 189 tc qdisc replace dev $swp2 root handle 1: \ 191 tc qdisc replace dev $swp2 parent 1:7 handle 17: \ 206 tc qdisc replace dev $swp3 root handle 1: \ 228 tc qdisc replace dev $swp4 root handle 1: \ 293 tc qdisc del dev $swp4 root 307 tc qdisc del dev $swp3 root 319 tc qdisc del dev $swp2 parent 1:7 320 tc qdisc del dev $swp2 root 333 tc qdisc del dev $swp1 root
|
/linux/tools/testing/selftests/net/forwarding/ |
H A D | sch_tbf_etsprio.sh | 17 tc qdisc replace dev $swp2 parent 10:3 handle 103: tbf \ 19 tc qdisc replace dev $swp2 parent 10:2 handle 102: tbf \ 32 tc qdisc add dev $swp2 root handle 10: $QDISC 3 priomap 2 1 0 33 defer tc qdisc del dev $swp2 root 44 tc qdisc replace dev $swp2 root handle 1: \ 46 defer tc qdisc del dev $swp2 root 48 tc qdisc replace dev $swp2 parent 1:1 handle 10: \ 50 tc qdisc replace dev $swp2 parent 10:3 handle 103: \ 52 tc qdisc replace dev $swp2 parent 10:2 handle 102: \ 54 tc qdisc replac [all...] |
H A D | tc_mpls_l2vpn.sh | 81 tc qdisc add dev $edge1 ingress 89 tc qdisc add dev $mpls1 ingress 102 tc qdisc del dev $mpls1 ingress 105 tc qdisc del dev $edge1 ingress 110 tc qdisc add dev $edge2 ingress 118 tc qdisc add dev $mpls2 ingress 131 tc qdisc del dev $mpls2 ingress 134 tc qdisc del dev $edge2 ingress
|
H A D | skbedit_priority.sh | 65 tc qdisc add dev $swp1 clsact 66 tc qdisc add dev $swp2 clsact 67 tc qdisc add dev $swp2 root handle 10: \ 73 tc qdisc del dev $swp2 root 74 tc qdisc del dev $swp2 clsact 75 tc qdisc del dev $swp1 clsact
|
H A D | pedit_ip.sh | 47 tc qdisc add dev $h2 clsact 52 tc qdisc del dev $h2 clsact 64 tc qdisc add dev $swp1 clsact 65 tc qdisc add dev $swp2 clsact 70 tc qdisc del dev $swp2 clsact 71 tc qdisc del dev $swp1 clsact
|
H A D | pedit_l4port.sh | 48 tc qdisc add dev $h2 clsact 53 tc qdisc del dev $h2 clsact 65 tc qdisc add dev $swp1 clsact 66 tc qdisc add dev $swp2 clsact 71 tc qdisc del dev $swp2 clsact 72 tc qdisc del dev $swp1 clsact
|
/linux/samples/bpf/ |
H A D | do_hbm_test.sh | 90 qdisc="" 148 qdisc="fq" 169 qdisc="${i#*=}" 236 if [ "$qdisc" != "" ] ; then 239 tc qdisc del dev lo root > /dev/null 2>&1 240 tc qdisc add dev lo root netem delay $netem\ms > /dev/null 2>&1 241 elif [ "$qdisc" != "" ] ; then 242 tc qdisc del dev eth0 root > /dev/null 2>&1 243 tc qdisc add dev eth0 root $qdisc > /dev/null 2>&1 411 tc qdisc del dev lo root > /dev/null 2>&1 [all …]
|
/linux/Documentation/networking/ |
H A D | multiqueue.rst | 32 default pfifo_fast qdisc. This qdisc supports one qdisc per hardware queue. 33 A new round-robin qdisc, sch_multiq also supports multiple hardware queues. The 34 qdisc is responsible for classifying the skb's and then directing the skb's to 42 On qdisc load, the number of bands is based on the number of queues on the 51 qdiscs. To add the MULTIQ qdisc to your network device, assuming the device 54 # tc qdisc add dev eth0 root handle 1: multiq 56 The qdisc will allocate the number of bands to equal the number of queues that 57 the device reports, and bring the qdisc online. Assuming eth0 has 4 Tx
|