Lines Matching refs:tb
14 static void xdp_dump_prog_id(struct nlattr **tb, int attr, in xdp_dump_prog_id() argument
18 if (!tb[attr]) in xdp_dump_prog_id()
24 NET_DUMP_UINT("id", " id %u", libbpf_nla_getattr_u32(tb[attr])) in xdp_dump_prog_id()
32 struct nlattr *tb[IFLA_XDP_MAX + 1]; in do_xdp_dump_one() local
35 if (libbpf_nla_parse_nested(tb, IFLA_XDP_MAX, attr, NULL) < 0) in do_xdp_dump_one()
38 if (!tb[IFLA_XDP_ATTACHED]) in do_xdp_dump_one()
41 mode = libbpf_nla_getattr_u8(tb[IFLA_XDP_ATTACHED]); in do_xdp_dump_one()
55 xdp_dump_prog_id(tb, IFLA_XDP_SKB_PROG_ID, "generic", true); in do_xdp_dump_one()
56 xdp_dump_prog_id(tb, IFLA_XDP_DRV_PROG_ID, "driver", true); in do_xdp_dump_one()
57 xdp_dump_prog_id(tb, IFLA_XDP_HW_PROG_ID, "offload", true); in do_xdp_dump_one()
61 xdp_dump_prog_id(tb, IFLA_XDP_PROG_ID, "driver", false); in do_xdp_dump_one()
63 xdp_dump_prog_id(tb, IFLA_XDP_PROG_ID, "generic", false); in do_xdp_dump_one()
65 xdp_dump_prog_id(tb, IFLA_XDP_PROG_ID, "offload", false); in do_xdp_dump_one()
72 int do_xdp_dump(struct ifinfomsg *ifinfo, struct nlattr **tb) in do_xdp_dump() argument
74 if (!tb[IFLA_XDP]) in do_xdp_dump()
77 return do_xdp_dump_one(tb[IFLA_XDP], ifinfo->ifi_index, in do_xdp_dump()
78 libbpf_nla_getattr_str(tb[IFLA_IFNAME])); in do_xdp_dump()
83 struct nlattr *tb[TCA_ACT_BPF_MAX + 1]; in do_bpf_dump_one_act() local
85 if (libbpf_nla_parse_nested(tb, TCA_ACT_BPF_MAX, attr, NULL) < 0) in do_bpf_dump_one_act()
88 if (!tb[TCA_ACT_BPF_PARMS]) in do_bpf_dump_one_act()
92 if (tb[TCA_ACT_BPF_NAME]) in do_bpf_dump_one_act()
94 libbpf_nla_getattr_str(tb[TCA_ACT_BPF_NAME])); in do_bpf_dump_one_act()
95 if (tb[TCA_ACT_BPF_ID]) in do_bpf_dump_one_act()
97 libbpf_nla_getattr_u32(tb[TCA_ACT_BPF_ID])); in do_bpf_dump_one_act()
104 struct nlattr *tb[TCA_ACT_MAX + 1]; in do_dump_one_act() local
109 if (libbpf_nla_parse_nested(tb, TCA_ACT_MAX, attr, NULL) < 0) in do_dump_one_act()
112 if (tb[TCA_ACT_KIND] && in do_dump_one_act()
113 strcmp(libbpf_nla_data(tb[TCA_ACT_KIND]), "bpf") == 0) in do_dump_one_act()
114 return do_bpf_dump_one_act(tb[TCA_ACT_OPTIONS]); in do_dump_one_act()
121 struct nlattr *tb[TCA_ACT_MAX_PRIO + 1]; in do_bpf_act_dump() local
124 if (libbpf_nla_parse_nested(tb, TCA_ACT_MAX_PRIO, attr, NULL) < 0) in do_bpf_act_dump()
129 ret = do_dump_one_act(tb[act]); in do_bpf_act_dump()
140 struct nlattr *tb[TCA_BPF_MAX + 1]; in do_bpf_filter_dump() local
143 if (libbpf_nla_parse_nested(tb, TCA_BPF_MAX, attr, NULL) < 0) in do_bpf_filter_dump()
146 if (tb[TCA_BPF_NAME]) in do_bpf_filter_dump()
148 libbpf_nla_getattr_str(tb[TCA_BPF_NAME])); in do_bpf_filter_dump()
149 if (tb[TCA_BPF_ID]) in do_bpf_filter_dump()
151 libbpf_nla_getattr_u32(tb[TCA_BPF_ID])); in do_bpf_filter_dump()
152 if (tb[TCA_BPF_ACT]) { in do_bpf_filter_dump()
153 ret = do_bpf_act_dump(tb[TCA_BPF_ACT]); in do_bpf_filter_dump()
161 int do_filter_dump(struct tcmsg *info, struct nlattr **tb, const char *kind, in do_filter_dump() argument
166 if (tb[TCA_OPTIONS] && in do_filter_dump()
167 strcmp(libbpf_nla_data(tb[TCA_KIND]), "bpf") == 0) { in do_filter_dump()
173 ret = do_bpf_filter_dump(tb[TCA_OPTIONS]); in do_filter_dump()