Lines Matching refs:tcm

918 	struct tcmsg *tcm;  in tc_fill_qdisc()  local
927 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tc_fill_qdisc()
930 tcm = nlmsg_data(nlh); in tc_fill_qdisc()
931 tcm->tcm_family = AF_UNSPEC; in tc_fill_qdisc()
932 tcm->tcm__pad1 = 0; in tc_fill_qdisc()
933 tcm->tcm__pad2 = 0; in tc_fill_qdisc()
934 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_qdisc()
935 tcm->tcm_parent = clid; in tc_fill_qdisc()
936 tcm->tcm_handle = q->handle; in tc_fill_qdisc()
937 tcm->tcm_info = refcount_read(&q->refcnt); in tc_fill_qdisc()
1477 struct tcmsg *tcm = nlmsg_data(n); in tc_get_qdisc() local
1485 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_get_qdisc()
1490 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_get_qdisc()
1494 clid = tcm->tcm_parent; in tc_get_qdisc()
1515 if (tcm->tcm_handle && q->handle != tcm->tcm_handle) { in tc_get_qdisc()
1520 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_get_qdisc()
1576 struct tcmsg *tcm; in tc_modify_qdisc() local
1585 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_modify_qdisc()
1590 tcm = nlmsg_data(n); in tc_modify_qdisc()
1591 clid = tcm->tcm_parent; in tc_modify_qdisc()
1594 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_modify_qdisc()
1619 if (!q || !tcm->tcm_handle || q->handle != tcm->tcm_handle) { in tc_modify_qdisc()
1620 if (tcm->tcm_handle) { in tc_modify_qdisc()
1625 if (TC_H_MIN(tcm->tcm_handle)) { in tc_modify_qdisc()
1629 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_modify_qdisc()
1697 if (!tcm->tcm_handle) { in tc_modify_qdisc()
1701 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_modify_qdisc()
1731 tcm->tcm_parent, tcm->tcm_parent, in tc_modify_qdisc()
1741 dev_queue = p->ops->cl_ops->select_queue(p, tcm); in tc_modify_qdisc()
1748 tcm->tcm_parent, tcm->tcm_handle, in tc_modify_qdisc()
1885 struct tcmsg *tcm; in tc_fill_tclass() local
1892 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tc_fill_tclass()
1895 tcm = nlmsg_data(nlh); in tc_fill_tclass()
1896 tcm->tcm_family = AF_UNSPEC; in tc_fill_tclass()
1897 tcm->tcm__pad1 = 0; in tc_fill_tclass()
1898 tcm->tcm__pad2 = 0; in tc_fill_tclass()
1899 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_tclass()
1900 tcm->tcm_parent = q->handle; in tc_fill_tclass()
1901 tcm->tcm_handle = q->handle; in tc_fill_tclass()
1902 tcm->tcm_info = 0; in tc_fill_tclass()
1905 if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0) in tc_fill_tclass()
2075 struct tcmsg *tcm = nlmsg_data(n); in tc_ctl_tclass() local
2087 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_ctl_tclass()
2092 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_ctl_tclass()
2111 portid = tcm->tcm_parent; in tc_ctl_tclass()
2112 clid = tcm->tcm_handle; in tc_ctl_tclass()
2221 struct tcmsg *tcm, struct netlink_callback *cb, in tc_dump_tclass_qdisc() argument
2228 (tcm->tcm_parent && in tc_dump_tclass_qdisc()
2229 TC_H_MAJ(tcm->tcm_parent) != q->handle)) { in tc_dump_tclass_qdisc()
2250 struct tcmsg *tcm, struct netlink_callback *cb, in tc_dump_tclass_root() argument
2259 if (tc_dump_tclass_qdisc(root, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2265 if (tcm->tcm_parent) { in tc_dump_tclass_root()
2266 q = qdisc_match_from_root(root, TC_H_MAJ(tcm->tcm_parent)); in tc_dump_tclass_root()
2268 tc_dump_tclass_qdisc(q, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2273 if (tc_dump_tclass_qdisc(q, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2282 struct tcmsg *tcm = nlmsg_data(cb->nlh); in tc_dump_tclass() local
2288 if (nlmsg_len(cb->nlh) < sizeof(*tcm)) in tc_dump_tclass()
2290 dev = dev_get_by_index(net, tcm->tcm_ifindex); in tc_dump_tclass()
2298 skb, tcm, cb, &t, s_t, true) < 0) in tc_dump_tclass()
2304 skb, tcm, cb, &t, s_t, false) < 0) in tc_dump_tclass()