From: Martin KaFai Lau <kafai@fb.com>
To: <netdev@vger.kernel.org>
Cc: Alexei Starovoitov <ast@fb.com>,
Daniel Borkmann <daniel@iogearbox.net>, <kernel-team@fb.com>
Subject: [PATCH bpf-next 2/7] bpf: tools: Sync uapi bpf.h
Date: Fri, 7 Dec 2018 16:42:26 -0800 [thread overview]
Message-ID: <20181208004226.2495044-1-kafai@fb.com> (raw)
In-Reply-To: <20181208004224.2494845-1-kafai@fb.com>
Sync uapi bpf.h to tools/include/uapi/linux for
the new bpf_line_info.
Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Yonghong Song <yhs@fb.com>
---
tools/include/uapi/linux/bpf.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index 16263e8827fc..7973c28b24a0 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/tools/include/uapi/linux/bpf.h
@@ -356,6 +356,9 @@ union bpf_attr {
__u32 func_info_rec_size; /* userspace bpf_func_info size */
__aligned_u64 func_info; /* func info */
__u32 func_info_cnt; /* number of bpf_func_info records */
+ __u32 line_info_rec_size; /* userspace bpf_line_info size */
+ __aligned_u64 line_info; /* line info */
+ __u32 line_info_cnt; /* number of bpf_line_info records */
};
struct { /* anonymous struct used by BPF_OBJ_* commands */
@@ -2679,6 +2682,12 @@ struct bpf_prog_info {
__u32 func_info_rec_size;
__aligned_u64 func_info;
__u32 func_info_cnt;
+ __u32 line_info_cnt;
+ __aligned_u64 line_info;
+ __aligned_u64 jited_line_info;
+ __u32 jited_line_info_cnt;
+ __u32 line_info_rec_size;
+ __u32 jited_line_info_rec_size;
} __attribute__((aligned(8)));
struct bpf_map_info {
@@ -2995,4 +3004,14 @@ struct bpf_func_info {
__u32 type_id;
};
+#define BPF_LINE_INFO_LINE_NUM(line_col) ((line_col) >> 10)
+#define BPF_LINE_INFO_LINE_COL(line_col) ((line_col) & 0x3ff)
+
+struct bpf_line_info {
+ __u32 insn_off;
+ __u32 file_name_off;
+ __u32 line_off;
+ __u32 line_col;
+};
+
#endif /* _UAPI__LINUX_BPF_H__ */
--
2.17.1
next prev parent reply other threads:[~2018-12-08 0:42 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-08 0:42 [PATCH bpf-next 0/7] Introduce bpf_line_info Martin KaFai Lau
2018-12-08 0:42 ` [PATCH bpf-next 1/7] bpf: Add bpf_line_info support Martin KaFai Lau
2018-12-08 0:42 ` Martin KaFai Lau [this message]
2018-12-08 0:42 ` [PATCH bpf-next 3/7] bpf: Refactor and bug fix in test_func_type in test_btf.c Martin KaFai Lau
2018-12-08 0:42 ` [PATCH bpf-next 4/7] bpf: Add unit tests for bpf_line_info Martin KaFai Lau
2018-12-08 0:42 ` [PATCH bpf-next 5/7] bpf: libbpf: Refactor and bug fix on the bpf_func_info loading logic Martin KaFai Lau
2018-12-08 0:42 ` [PATCH bpf-next 6/7] bpf: libbpf: Add btf_line_info support to libbpf Martin KaFai Lau
2018-12-08 0:42 ` [PATCH bpf-next 7/7] bpf: libbpf: bpftool: Print bpf_line_info during prog dump Martin KaFai Lau
2018-12-10 1:18 ` Jakub Kicinski
2018-12-09 22:08 ` [PATCH bpf-next 0/7] Introduce bpf_line_info Alexei Starovoitov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181208004226.2495044-1-kafai@fb.com \
--to=kafai@fb.com \
--cc=ast@fb.com \
--cc=daniel@iogearbox.net \
--cc=kernel-team@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).