Lines Matching refs:tcm
872 struct tcmsg *tcm; in tc_fill_qdisc() local
881 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tc_fill_qdisc()
884 tcm = nlmsg_data(nlh); in tc_fill_qdisc()
885 tcm->tcm_family = AF_UNSPEC; in tc_fill_qdisc()
886 tcm->tcm__pad1 = 0; in tc_fill_qdisc()
887 tcm->tcm__pad2 = 0; in tc_fill_qdisc()
888 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_qdisc()
889 tcm->tcm_parent = clid; in tc_fill_qdisc()
890 tcm->tcm_handle = q->handle; in tc_fill_qdisc()
891 tcm->tcm_info = refcount_read(&q->refcnt); in tc_fill_qdisc()
1411 struct tcmsg *tcm = nlmsg_data(n); in tc_get_qdisc() local
1423 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_get_qdisc()
1428 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_get_qdisc()
1432 clid = tcm->tcm_parent; in tc_get_qdisc()
1453 if (tcm->tcm_handle && q->handle != tcm->tcm_handle) { in tc_get_qdisc()
1458 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_get_qdisc()
1496 struct tcmsg *tcm; in tc_modify_qdisc() local
1508 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_modify_qdisc()
1513 tcm = nlmsg_data(n); in tc_modify_qdisc()
1514 clid = tcm->tcm_parent; in tc_modify_qdisc()
1517 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_modify_qdisc()
1542 if (!q || !tcm->tcm_handle || q->handle != tcm->tcm_handle) { in tc_modify_qdisc()
1543 if (tcm->tcm_handle) { in tc_modify_qdisc()
1548 if (TC_H_MIN(tcm->tcm_handle)) { in tc_modify_qdisc()
1552 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_modify_qdisc()
1603 if (!tcm->tcm_handle) { in tc_modify_qdisc()
1607 q = qdisc_lookup(dev, tcm->tcm_handle); in tc_modify_qdisc()
1636 tcm->tcm_parent, tcm->tcm_parent, in tc_modify_qdisc()
1646 dev_queue = p->ops->cl_ops->select_queue(p, tcm); in tc_modify_qdisc()
1653 tcm->tcm_parent, tcm->tcm_handle, in tc_modify_qdisc()
1789 struct tcmsg *tcm; in tc_fill_tclass() local
1796 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tc_fill_tclass()
1799 tcm = nlmsg_data(nlh); in tc_fill_tclass()
1800 tcm->tcm_family = AF_UNSPEC; in tc_fill_tclass()
1801 tcm->tcm__pad1 = 0; in tc_fill_tclass()
1802 tcm->tcm__pad2 = 0; in tc_fill_tclass()
1803 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tc_fill_tclass()
1804 tcm->tcm_parent = q->handle; in tc_fill_tclass()
1805 tcm->tcm_handle = q->handle; in tc_fill_tclass()
1806 tcm->tcm_info = 0; in tc_fill_tclass()
1809 if (cl_ops->dump && cl_ops->dump(q, cl, skb, tcm) < 0) in tc_fill_tclass()
1958 struct tcmsg *tcm = nlmsg_data(n); in tc_ctl_tclass() local
1974 err = nlmsg_parse_deprecated(n, sizeof(*tcm), tca, TCA_MAX, in tc_ctl_tclass()
1979 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_ctl_tclass()
1998 portid = tcm->tcm_parent; in tc_ctl_tclass()
1999 clid = tcm->tcm_handle; in tc_ctl_tclass()
2108 struct tcmsg *tcm, struct netlink_callback *cb, in tc_dump_tclass_qdisc() argument
2115 (tcm->tcm_parent && in tc_dump_tclass_qdisc()
2116 TC_H_MAJ(tcm->tcm_parent) != q->handle)) { in tc_dump_tclass_qdisc()
2137 struct tcmsg *tcm, struct netlink_callback *cb, in tc_dump_tclass_root() argument
2146 if (tc_dump_tclass_qdisc(root, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2152 if (tcm->tcm_parent) { in tc_dump_tclass_root()
2153 q = qdisc_match_from_root(root, TC_H_MAJ(tcm->tcm_parent)); in tc_dump_tclass_root()
2155 tc_dump_tclass_qdisc(q, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2160 if (tc_dump_tclass_qdisc(q, skb, tcm, cb, t_p, s_t) < 0) in tc_dump_tclass_root()
2169 struct tcmsg *tcm = nlmsg_data(cb->nlh); in tc_dump_tclass() local
2175 if (nlmsg_len(cb->nlh) < sizeof(*tcm)) in tc_dump_tclass()
2177 dev = dev_get_by_index(net, tcm->tcm_ifindex); in tc_dump_tclass()
2184 if (tc_dump_tclass_root(dev->qdisc, skb, tcm, cb, &t, s_t) < 0) in tc_dump_tclass()
2189 tc_dump_tclass_root(dev_queue->qdisc_sleeping, skb, tcm, cb, in tc_dump_tclass()