Lines Matching refs:tcm
1794 struct tcmsg *tcm; in tcf_fill_node() local
1798 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tcf_fill_node()
1801 tcm = nlmsg_data(nlh); in tcf_fill_node()
1802 tcm->tcm_family = AF_UNSPEC; in tcf_fill_node()
1803 tcm->tcm__pad1 = 0; in tcf_fill_node()
1804 tcm->tcm__pad2 = 0; in tcf_fill_node()
1806 tcm->tcm_ifindex = qdisc_dev(q)->ifindex; in tcf_fill_node()
1807 tcm->tcm_parent = parent; in tcf_fill_node()
1809 tcm->tcm_ifindex = TCM_IFINDEX_MAGIC_BLOCK; in tcf_fill_node()
1810 tcm->tcm_block_index = block->index; in tcf_fill_node()
1812 tcm->tcm_info = TC_H_MAKE(tp->prio, tp->protocol); in tcf_fill_node()
1818 tcm->tcm_handle = 0; in tcf_fill_node()
1821 tp->ops->dump(net, tp, fh, skb, tcm, rtnl_held) < 0) in tcf_fill_node()
2461 struct tcmsg *tcm = nlmsg_data(cb->nlh); in tcf_chain_dump() local
2473 if (TC_H_MAJ(tcm->tcm_info) && in tcf_chain_dump()
2474 TC_H_MAJ(tcm->tcm_info) != tp->prio) in tcf_chain_dump()
2476 if (TC_H_MIN(tcm->tcm_info) && in tcf_chain_dump()
2477 TC_H_MIN(tcm->tcm_info) != tp->protocol) in tcf_chain_dump()
2523 struct tcmsg *tcm = nlmsg_data(cb->nlh); in tc_dump_tfilter() local
2529 if (nlmsg_len(cb->nlh) < sizeof(*tcm)) in tc_dump_tfilter()
2532 err = nlmsg_parse_deprecated(cb->nlh, sizeof(*tcm), tca, TCA_MAX, in tc_dump_tfilter()
2537 if (tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK) { in tc_dump_tfilter()
2538 block = tcf_block_refcnt_get(net, tcm->tcm_block_index); in tc_dump_tfilter()
2553 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_dump_tfilter()
2557 parent = tcm->tcm_parent; in tc_dump_tfilter()
2562 q = qdisc_lookup(dev, TC_H_MAJ(tcm->tcm_parent)); in tc_dump_tfilter()
2571 if (TC_H_MIN(tcm->tcm_parent)) { in tc_dump_tfilter()
2572 cl = cops->find(q, tcm->tcm_parent); in tc_dump_tfilter()
2602 if (tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK) in tc_dump_tfilter()
2622 struct tcmsg *tcm; in tc_chain_fill_node() local
2628 nlh = nlmsg_put(skb, portid, seq, event, sizeof(*tcm), flags); in tc_chain_fill_node()
2631 tcm = nlmsg_data(nlh); in tc_chain_fill_node()
2632 tcm->tcm_family = AF_UNSPEC; in tc_chain_fill_node()
2633 tcm->tcm__pad1 = 0; in tc_chain_fill_node()
2634 tcm->tcm__pad2 = 0; in tc_chain_fill_node()
2635 tcm->tcm_handle = 0; in tc_chain_fill_node()
2637 tcm->tcm_ifindex = qdisc_dev(block->q)->ifindex; in tc_chain_fill_node()
2638 tcm->tcm_parent = block->q->handle; in tc_chain_fill_node()
2640 tcm->tcm_ifindex = TCM_IFINDEX_MAGIC_BLOCK; in tc_chain_fill_node()
2641 tcm->tcm_block_index = block->index; in tc_chain_fill_node()
2902 struct tcmsg *tcm = nlmsg_data(cb->nlh); in tc_dump_chain() local
2909 if (nlmsg_len(cb->nlh) < sizeof(*tcm)) in tc_dump_chain()
2912 err = nlmsg_parse_deprecated(cb->nlh, sizeof(*tcm), tca, TCA_MAX, in tc_dump_chain()
2917 if (tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK) { in tc_dump_chain()
2918 block = tcf_block_refcnt_get(net, tcm->tcm_block_index); in tc_dump_chain()
2933 dev = __dev_get_by_index(net, tcm->tcm_ifindex); in tc_dump_chain()
2937 parent = tcm->tcm_parent; in tc_dump_chain()
2942 q = qdisc_lookup(dev, TC_H_MAJ(tcm->tcm_parent)); in tc_dump_chain()
2951 if (TC_H_MIN(tcm->tcm_parent)) { in tc_dump_chain()
2952 cl = cops->find(q, tcm->tcm_parent); in tc_dump_chain()
2988 if (tcm->tcm_ifindex == TCM_IFINDEX_MAGIC_BLOCK) in tc_dump_chain()