/tools/bpf/bpftool/ |
D | netlink_dumper.c | 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() [all …]
|
D | net.c | 92 typedef int (*dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb); 201 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_class_nlmsg() local 207 if (libbpf_nla_parse(tb, TCA_MAX, attr, len, NULL) != 0) in __dump_class_nlmsg() 210 return dump_class_nlmsg(cookie, t, tb); in __dump_class_nlmsg() 240 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_qdisc_nlmsg() local 246 if (libbpf_nla_parse(tb, TCA_MAX, attr, len, NULL) != 0) in __dump_qdisc_nlmsg() 249 return dump_qdisc_nlmsg(cookie, t, tb); in __dump_qdisc_nlmsg() 279 struct nlattr *tb[TCA_MAX + 1], *attr; in __dump_filter_nlmsg() local 285 if (libbpf_nla_parse(tb, TCA_MAX, attr, len, NULL) != 0) in __dump_filter_nlmsg() 288 return dump_filter_nlmsg(cookie, t, tb); in __dump_filter_nlmsg() [all …]
|
D | main.h | 256 int do_xdp_dump(struct ifinfomsg *ifinfo, struct nlattr **tb); 257 int do_filter_dump(struct tcmsg *ifinfo, struct nlattr **tb, const char *kind,
|
/tools/testing/selftests/powerpc/pmu/ebb/ |
D | trace.c | 17 struct trace_buffer *tb; in trace_buffer_allocate() local 19 if (size < sizeof(*tb)) { in trace_buffer_allocate() 24 tb = mmap(NULL, size, PROT_READ | PROT_WRITE, in trace_buffer_allocate() 26 if (tb == MAP_FAILED) { in trace_buffer_allocate() 31 tb->size = size; in trace_buffer_allocate() 32 tb->tail = tb->data; in trace_buffer_allocate() 33 tb->overflow = false; in trace_buffer_allocate() 35 return tb; in trace_buffer_allocate() 38 static bool trace_check_bounds(struct trace_buffer *tb, void *p) in trace_check_bounds() argument 40 return p < ((void *)tb + tb->size); in trace_check_bounds() [all …]
|
D | trace.h | 33 int trace_log_reg(struct trace_buffer *tb, u64 reg, u64 value); 34 int trace_log_counter(struct trace_buffer *tb, u64 value); 35 int trace_log_string(struct trace_buffer *tb, char *str); 36 int trace_log_indent(struct trace_buffer *tb); 37 int trace_log_outdent(struct trace_buffer *tb); 38 void trace_buffer_print(struct trace_buffer *tb); 39 void trace_print_location(struct trace_buffer *tb);
|
/tools/lib/bpf/ |
D | nlattr.c | 104 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, in libbpf_nla_parse() argument 110 memset(tb, 0, sizeof(struct nlattr *) * (maxtype + 1)); in libbpf_nla_parse() 124 if (tb[type]) in libbpf_nla_parse() 128 tb[type] = nla; in libbpf_nla_parse() 149 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype, in libbpf_nla_parse_nested() argument 153 return libbpf_nla_parse(tb, maxtype, libbpf_nla_data(nla), in libbpf_nla_parse_nested() 164 struct nlattr *tb[NLMSGERR_ATTR_MAX + 1], *attr; in libbpf_nla_dump_errormsg() local 183 if (libbpf_nla_parse(tb, NLMSGERR_ATTR_MAX, attr, alen, in libbpf_nla_dump_errormsg() 189 if (tb[NLMSGERR_ATTR_MSG]) in libbpf_nla_dump_errormsg() 190 errmsg = (char *) libbpf_nla_data(tb[NLMSGERR_ATTR_MSG]); in libbpf_nla_dump_errormsg()
|
D | netlink.c | 25 typedef int (*libbpf_dump_nlmsg_t)(void *cookie, void *msg, struct nlattr **tb); 297 struct nlattr *tb[IFLA_MAX + 1], *attr; in __dump_link_nlmsg() local 304 if (libbpf_nla_parse(tb, IFLA_MAX, attr, len, NULL) != 0) in __dump_link_nlmsg() 307 return dump_link_nlmsg(cookie, ifi, tb); in __dump_link_nlmsg() 310 static int get_xdp_info(void *cookie, void *msg, struct nlattr **tb) in get_xdp_info() argument 320 if (!tb[IFLA_XDP]) in get_xdp_info() 323 ret = libbpf_nla_parse_nested(xdp_tb, IFLA_XDP_MAX, tb[IFLA_XDP], NULL); in get_xdp_info() 544 static int __get_tc_info(void *cookie, struct tcmsg *tc, struct nlattr **tb, in __get_tc_info() argument 554 if (!tb[TCA_OPTIONS]) in __get_tc_info() 557 libbpf_nla_parse_nested(tbb, TCA_BPF_MAX, tb[TCA_OPTIONS], NULL); in __get_tc_info() [all …]
|
D | nlattr.h | 111 int libbpf_nla_parse(struct nlattr *tb[], int maxtype, struct nlattr *head, 113 int libbpf_nla_parse_nested(struct nlattr *tb[], int maxtype,
|
/tools/testing/selftests/netfilter/ |
D | nf-queue.c | 38 const struct nlattr **tb = data; in parse_attr_cb() local 73 tb[type] = attr; in parse_attr_cb() 79 struct nlattr *tb[NFQA_MAX+1] = { 0 }; in queue_cb() local 85 mnl_attr_parse(nlh, sizeof(struct nfgenmsg), parse_attr_cb, tb); in queue_cb() 86 if (tb[NFQA_PACKET_HDR]) { in queue_cb() 87 ph = mnl_attr_get_payload(tb[NFQA_PACKET_HDR]); in queue_cb() 102 if (tb[NFQA_SKB_INFO]) in queue_cb() 103 skbinfo = ntohl(mnl_attr_get_u32(tb[NFQA_SKB_INFO])); in queue_cb()
|
/tools/arch/powerpc/include/uapi/asm/ |
D | kvm.h | 236 __u64 tb; member
|
/tools/testing/selftests/bpf/ |
D | test_offload.py | 86 tb = "".join(traceback.extract_stack().format()) 87 print(tb) 88 log("FAIL: " + msg, tb, level=1)
|