Home
last modified time | relevance | path

Searched refs:qdisc (Results 1 – 25 of 44) sorted by relevance

12

/external/libnl/lib/route/
Dqdisc_obj.c31 struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) obj; in qdisc_free_data() local
34 tca_free_data((struct rtnl_tca *) qdisc); in qdisc_free_data()
36 qops = rtnl_qdisc_lookup_ops(qdisc); in qdisc_free_data()
38 qops->qo_free_data(qdisc); in qdisc_free_data()
61 struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) obj; in qdisc_dump_line() local
64 tca_dump_line((struct rtnl_tca *) qdisc, "qdisc", p); in qdisc_dump_line()
66 qops = rtnl_qdisc_lookup_ops(qdisc); in qdisc_dump_line()
68 qops->qo_dump[NL_DUMP_LINE](qdisc, p); in qdisc_dump_line()
75 struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) arg; in qdisc_dump_details() local
80 tca_dump_details((struct rtnl_tca *) qdisc, p); in qdisc_dump_details()
[all …]
Dqdisc.c102 struct rtnl_qdisc *qdisc; in qdisc_msg_parser() local
105 qdisc = rtnl_qdisc_alloc(); in qdisc_msg_parser()
106 if (!qdisc) { in qdisc_msg_parser()
111 qdisc->ce_msgtype = n->nlmsg_type; in qdisc_msg_parser()
113 err = tca_msg_parser(n, (struct rtnl_tca *) qdisc); in qdisc_msg_parser()
117 qops = rtnl_qdisc_lookup_ops(qdisc); in qdisc_msg_parser()
119 err = qops->qo_msg_parser(qdisc); in qdisc_msg_parser()
124 err = pp->pp_cb((struct nl_object *) qdisc, pp); in qdisc_msg_parser()
126 rtnl_qdisc_put(qdisc); in qdisc_msg_parser()
147 static int qdisc_build(struct rtnl_qdisc *qdisc, int type, int flags, in qdisc_build() argument
[all …]
Dqdisc_api.c88 struct rtnl_qdisc_ops *rtnl_qdisc_lookup_ops(struct rtnl_qdisc *qdisc) in rtnl_qdisc_lookup_ops() argument
90 if (!qdisc->q_ops) in rtnl_qdisc_lookup_ops()
91 qdisc->q_ops = __rtnl_qdisc_lookup_ops(qdisc->q_kind); in rtnl_qdisc_lookup_ops()
93 return qdisc->q_ops; in rtnl_qdisc_lookup_ops()
/external/libnl/lib/route/sch/
Dsfq.c42 static inline struct rtnl_sfq *sfq_qdisc(struct rtnl_qdisc *qdisc) in sfq_qdisc() argument
44 return (struct rtnl_sfq *) qdisc->q_subdata; in sfq_qdisc()
47 static inline struct rtnl_sfq *sfq_alloc(struct rtnl_qdisc *qdisc) in sfq_alloc() argument
49 if (!qdisc->q_subdata) in sfq_alloc()
50 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_sfq)); in sfq_alloc()
52 return sfq_qdisc(qdisc); in sfq_alloc()
55 static int sfq_msg_parser(struct rtnl_qdisc *qdisc) in sfq_msg_parser() argument
60 if (!(qdisc->ce_mask & TCA_ATTR_OPTS)) in sfq_msg_parser()
63 if (qdisc->q_opts->d_size < sizeof(*opts)) in sfq_msg_parser()
66 sfq = sfq_alloc(qdisc); in sfq_msg_parser()
[all …]
Dnetem.c46 static inline struct rtnl_netem *netem_qdisc(struct rtnl_qdisc *qdisc) in netem_qdisc() argument
48 return (struct rtnl_netem *) qdisc->q_subdata; in netem_qdisc()
51 static inline struct rtnl_netem *netem_alloc(struct rtnl_qdisc *qdisc) in netem_alloc() argument
53 if (!qdisc->q_subdata) in netem_alloc()
54 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_netem)); in netem_alloc()
56 return netem_qdisc(qdisc); in netem_alloc()
65 static int netem_msg_parser(struct rtnl_qdisc *qdisc) in netem_msg_parser() argument
71 if (qdisc->q_opts->d_size < sizeof(*opts)) in netem_msg_parser()
74 netem = netem_alloc(qdisc); in netem_msg_parser()
78 opts = (struct tc_netem_qopt *) qdisc->q_opts->d_data; in netem_msg_parser()
[all …]
Dfifo.c44 static inline struct rtnl_fifo *fifo_qdisc(struct rtnl_qdisc *qdisc) in fifo_qdisc() argument
46 return (struct rtnl_fifo *) qdisc->q_subdata; in fifo_qdisc()
49 static inline struct rtnl_fifo *fifo_alloc(struct rtnl_qdisc *qdisc) in fifo_alloc() argument
51 if (!qdisc->q_subdata) in fifo_alloc()
52 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_fifo)); in fifo_alloc()
54 return fifo_qdisc(qdisc); in fifo_alloc()
57 static int fifo_msg_parser(struct rtnl_qdisc *qdisc) in fifo_msg_parser() argument
62 if (qdisc->q_opts->d_size < sizeof(struct tc_fifo_qopt)) in fifo_msg_parser()
65 fifo = fifo_alloc(qdisc); in fifo_msg_parser()
69 opt = (struct tc_fifo_qopt *) qdisc->q_opts->d_data; in fifo_msg_parser()
[all …]
Dred.c37 static inline struct rtnl_red *red_qdisc(struct rtnl_qdisc *qdisc) in red_qdisc() argument
39 return (struct rtnl_red *) qdisc->q_subdata; in red_qdisc()
42 static inline struct rtnl_red *red_alloc(struct rtnl_qdisc *qdisc) in red_alloc() argument
44 if (!qdisc->q_subdata) in red_alloc()
45 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_red)); in red_alloc()
47 return red_qdisc(qdisc); in red_alloc()
54 static int red_msg_parser(struct rtnl_qdisc *qdisc) in red_msg_parser() argument
61 if (!(qdisc->ce_mask & TCA_ATTR_OPTS)) in red_msg_parser()
64 err = tca_parse(tb, TCA_RED_MAX, (struct rtnl_tca *) qdisc, red_policy); in red_msg_parser()
71 red = red_alloc(qdisc); in red_msg_parser()
[all …]
Dprio.c42 static inline struct rtnl_prio *prio_qdisc(struct rtnl_qdisc *qdisc) in prio_qdisc() argument
44 return (struct rtnl_prio *) qdisc->q_subdata; in prio_qdisc()
47 static inline struct rtnl_prio *prio_alloc(struct rtnl_qdisc *qdisc) in prio_alloc() argument
49 if (!qdisc->q_subdata) in prio_alloc()
50 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_prio)); in prio_alloc()
52 return prio_qdisc(qdisc); in prio_alloc()
55 static int prio_msg_parser(struct rtnl_qdisc *qdisc) in prio_msg_parser() argument
60 if (qdisc->q_opts->d_size < sizeof(*opt)) in prio_msg_parser()
63 prio = prio_alloc(qdisc); in prio_msg_parser()
67 opt = (struct tc_prio_qopt *) qdisc->q_opts->d_data; in prio_msg_parser()
[all …]
Dtbf.c38 static inline struct rtnl_tbf *tbf_qdisc(struct rtnl_qdisc *qdisc) in tbf_qdisc() argument
40 return (struct rtnl_tbf *) qdisc->q_subdata; in tbf_qdisc()
43 static inline struct rtnl_tbf *tbf_alloc(struct rtnl_qdisc *qdisc) in tbf_alloc() argument
45 if (!qdisc->q_subdata) in tbf_alloc()
46 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_tbf)); in tbf_alloc()
48 return tbf_qdisc(qdisc); in tbf_alloc()
96 static void tbf_free_data(struct rtnl_qdisc *qdisc) in tbf_free_data() argument
98 free(qdisc->q_subdata); in tbf_free_data()
101 static void tbf_dump_line(struct rtnl_qdisc *qdisc, struct nl_dump_params *p) in tbf_dump_line() argument
105 struct rtnl_tbf *tbf = tbf_qdisc(qdisc); in tbf_dump_line()
[all …]
Ddsmark.c38 static inline struct rtnl_dsmark_qdisc *dsmark_qdisc(struct rtnl_qdisc *qdisc) in dsmark_qdisc() argument
40 return (struct rtnl_dsmark_qdisc *) qdisc->q_subdata; in dsmark_qdisc()
44 dsmark_qdisc_alloc(struct rtnl_qdisc *qdisc) in dsmark_qdisc_alloc() argument
46 if (!qdisc->q_subdata) in dsmark_qdisc_alloc()
47 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_dsmark_qdisc)); in dsmark_qdisc_alloc()
49 return dsmark_qdisc(qdisc); in dsmark_qdisc_alloc()
60 static int dsmark_qdisc_msg_parser(struct rtnl_qdisc *qdisc) in dsmark_qdisc_msg_parser() argument
66 err = tca_parse(tb, TCA_DSMARK_MAX, (struct rtnl_tca *) qdisc, in dsmark_qdisc_msg_parser()
71 dsmark = dsmark_qdisc_alloc(qdisc); in dsmark_qdisc_msg_parser()
136 static void dsmark_qdisc_dump_line(struct rtnl_qdisc *qdisc, in dsmark_qdisc_dump_line() argument
[all …]
Dhtb.c49 static inline struct rtnl_htb_qdisc *htb_qdisc(struct rtnl_qdisc *qdisc) in htb_qdisc() argument
51 if (qdisc->q_subdata == NULL) in htb_qdisc()
52 qdisc->q_subdata = calloc(1, sizeof(struct rtnl_htb_qdisc)); in htb_qdisc()
54 return (struct rtnl_htb_qdisc *) qdisc->q_subdata; in htb_qdisc()
62 static int htb_qdisc_msg_parser(struct rtnl_qdisc *qdisc) in htb_qdisc_msg_parser() argument
68 err = tca_parse(tb, TCA_HTB_MAX, (struct rtnl_tca *) qdisc, htb_policy); in htb_qdisc_msg_parser()
72 d = htb_qdisc(qdisc); in htb_qdisc_msg_parser()
87 static void htb_qdisc_free_data(struct rtnl_qdisc *qdisc) in htb_qdisc_free_data() argument
89 free(qdisc->q_subdata); in htb_qdisc_free_data()
139 static void htb_qdisc_dump_line(struct rtnl_qdisc *qdisc, in htb_qdisc_dump_line() argument
[all …]
Dcbq.c116 static int cbq_qdisc_msg_parser(struct rtnl_qdisc *qdisc) in cbq_qdisc_msg_parser() argument
118 return cbq_msg_parser((struct rtnl_tca *) qdisc); in cbq_qdisc_msg_parser()
126 static void cbq_qdisc_free_data(struct rtnl_qdisc *qdisc) in cbq_qdisc_free_data() argument
128 free(qdisc->q_subdata); in cbq_qdisc_free_data()
173 static void cbq_qdisc_dump_line(struct rtnl_qdisc *qdisc, in cbq_qdisc_dump_line() argument
176 cbq_dump_line((struct rtnl_tca *) qdisc, p); in cbq_qdisc_dump_line()
225 static void cbq_qdisc_dump_details(struct rtnl_qdisc *qdisc, in cbq_qdisc_dump_details() argument
228 cbq_dump_details((struct rtnl_tca *) qdisc, p); in cbq_qdisc_dump_details()
250 static void cbq_qdisc_dump_stats(struct rtnl_qdisc *qdisc, in cbq_qdisc_dump_stats() argument
253 cbq_dump_stats((struct rtnl_tca *) qdisc, p); in cbq_qdisc_dump_stats()
/external/libnl/src/
Ddisabled-nl-qdisc-add.c23 static int parse_blackhole_opts(struct rtnl_qdisc *qdisc, char *argv[], in parse_blackhole_opts() argument
29 static int parse_pfifo_opts(struct rtnl_qdisc *qdisc, char *argv[], int argc) in parse_pfifo_opts() argument
40 err = rtnl_qdisc_fifo_set_limit(qdisc, limit); in parse_pfifo_opts()
50 static int parse_bfifo_opts(struct rtnl_qdisc *qdisc, char *argv[], int argc) in parse_bfifo_opts() argument
66 err = rtnl_qdisc_fifo_set_limit(qdisc, limit); in parse_bfifo_opts()
76 static int parse_prio_opts(struct rtnl_qdisc *qdisc, char *argv[], int argc) in parse_prio_opts() argument
86 err = rtnl_qdisc_prio_set_bands(qdisc, bands); in parse_prio_opts()
113 err = rtnl_qdisc_prio_set_priomap(qdisc, map, sizeof(map)); in parse_prio_opts()
129 struct rtnl_qdisc *qdisc; in main() local
143 qdisc = rtnl_qdisc_alloc(); in main()
[all …]
Dnl-tctree-list.c65 struct rtnl_qdisc *qdisc = (struct rtnl_qdisc *) obj; in print_qdisc() local
67 uint32_t parent = rtnl_qdisc_get_handle(qdisc); in print_qdisc()
72 rtnl_qdisc_foreach_child(qdisc, class_cache, &print_class, arg + 2); in print_qdisc()
85 struct rtnl_qdisc *qdisc; in print_link() local
94 qdisc = rtnl_qdisc_get_by_parent(qdisc_cache, ifindex, TC_H_ROOT); in print_link()
95 if (qdisc) { in print_link()
96 print_qdisc((struct nl_object *) qdisc, (void *) 2); in print_link()
97 rtnl_qdisc_put(qdisc); in print_link()
100 qdisc = rtnl_qdisc_get_by_parent(qdisc_cache, ifindex, 0); in print_link()
101 if (qdisc) { in print_link()
[all …]
Dnl-qdisc-delete.c43 struct rtnl_qdisc *qdisc = nl_object_priv(obj); in delete_cb() local
53 if ((err = rtnl_qdisc_delete(sock, qdisc)) < 0) in delete_cb()
66 struct rtnl_qdisc *qdisc; in main() local
73 qdisc = nl_cli_qdisc_alloc(); in main()
103 case 'd': nl_cli_qdisc_parse_dev(qdisc, link_cache, optarg); break; in main()
104 case 'p': nl_cli_qdisc_parse_parent(qdisc, optarg); break; in main()
105 case 'H': nl_cli_qdisc_parse_handle(qdisc, optarg); break; in main()
106 case 'k': nl_cli_qdisc_parse_kind(qdisc, optarg); break; in main()
110 nl_cache_foreach_filter(qdisc_cache, OBJ_CAST(qdisc), delete_cb, NULL); in main()
Dnl-qdisc-list.c40 struct rtnl_qdisc *qdisc; in main() local
51 qdisc = nl_cli_qdisc_alloc(); in main()
80 case 'd': nl_cli_qdisc_parse_dev(qdisc, link_cache, optarg); break; in main()
81 case 'p': nl_cli_qdisc_parse_parent(qdisc, optarg); break; in main()
82 case 'H': nl_cli_qdisc_parse_handle(qdisc, optarg); break; in main()
83 case 'k': nl_cli_qdisc_parse_kind(qdisc, optarg); break; in main()
87 nl_cache_dump_filter(qdisc_cache, &params, OBJ_CAST(qdisc)); in main()
D.gitignore21 nl-qdisc-add
22 nl-qdisc-delete
23 nl-qdisc-list
/external/libnl/src/lib/
Dqdisc.c24 struct rtnl_qdisc *qdisc; in nl_cli_qdisc_alloc() local
26 qdisc = rtnl_qdisc_alloc(); in nl_cli_qdisc_alloc()
27 if (!qdisc) in nl_cli_qdisc_alloc()
30 return qdisc; in nl_cli_qdisc_alloc()
33 void nl_cli_qdisc_parse_dev(struct rtnl_qdisc *qdisc, struct nl_cache *link_cache, char *arg) in nl_cli_qdisc_parse_dev() argument
40 rtnl_qdisc_set_ifindex(qdisc, ival); in nl_cli_qdisc_parse_dev()
43 void nl_cli_qdisc_parse_parent(struct rtnl_qdisc *qdisc, char *arg) in nl_cli_qdisc_parse_parent() argument
52 rtnl_qdisc_set_parent(qdisc, parent); in nl_cli_qdisc_parse_parent()
55 void nl_cli_qdisc_parse_handle(struct rtnl_qdisc *qdisc, char *arg) in nl_cli_qdisc_parse_handle() argument
64 rtnl_qdisc_set_handle(qdisc, handle); in nl_cli_qdisc_parse_handle()
[all …]
/external/iproute2/testsuite/tests/
Dcbq.t2 $TC qdisc del dev $DEV root >/dev/null 2>&1
3 $TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
5 $TC qdisc list dev $DEV
6 $TC qdisc del dev $DEV root
7 $TC qdisc list dev $DEV
8 $TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
10 $TC qdisc del dev $DEV root
Dpolicer2 $TC qdisc del dev $DEV root >/dev/null 2>&1
3 $TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
6 $TC qdisc list dev $DEV
8 $TC qdisc del dev $DEV root
9 $TC qdisc list dev $DEV
10 $TC qdisc add dev $DEV root handle 10:0 cbq bandwidth 100Mbit avpkt 1400 mpu 64
13 $TC qdisc del dev $DEV root
Dcls-testbed.t16 qdisc add dev $DEV root handle 10:0 \
30 qdisc add dev $DEV root handle 10:0 htb
42 qdisc add dev $DEV root handle 20:0 \
48 qdisc add dev $DEV parent 20:0 handle 10:0 prio
56 ts_tc "cls-testbed" "tree listing" qdisc list dev eth0
64 qdisc del dev $DEV root
Ddsmark.t13 qdisc add dev $DEV root handle 10:0 \
25 qdisc list dev $DEV
31 qdisc del dev $DEV root
/external/iproute2/doc/actions/
Difb-README46 $TC qdisc add dev ifb0 root handle 1: prio
47 $TC qdisc add dev ifb0 parent 1:1 handle 10: sfq
48 $TC qdisc add dev ifb0 parent 1:2 handle 20: tbf rate 20kbit buffer 1600 limit 3000
49 $TC qdisc add dev ifb0 parent 1:3 handle 30: sfq
55 $TC qdisc add dev eth0 ingress
99 [root@jmandrake]:~# $TC -s qdisc
100 qdisc sfq 30: dev ifb0 limit 128p quantum 1514b
102 qdisc tbf 20: dev ifb0 rate 20Kbit burst 1575b lat 2147.5s
104 qdisc sfq 10: dev ifb0 limit 128p quantum 1514b
106 qdisc prio 1: dev ifb0 bands 3 priomap 1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
[all …]
/external/iproute2/examples/diffserv/
DEdge231 $TC qdisc add dev $INDEV handle ffff: ingress
52 $TC qdisc add $EGDEV handle 1:0 root dsmark indices 64
73 $TC qdisc ls dev $INDEV
80 $TC qdisc ls $EGDEV
/external/iproute2/examples/
Dcbqinit.eth113 $TC qdisc add dev $DEVICE root handle 1: cbq \
43 $TC qdisc add dev $DEVICE parent 1:2 sfq quantum 1514b perturb 15
51 $TC qdisc add dev $DEVICE parent 1:3 sfq quantum 1514b perturb 15
59 $TC qdisc add dev $DEVICE parent 1:4 sfq quantum 1514b perturb 15

12