]> granicus.if.org Git - strace/commitdiff
xlat: add flow dissector bpf program type constants
authorEugene Syromyatnikov <evgsyr@gmail.com>
Thu, 1 Nov 2018 16:15:24 +0000 (17:15 +0100)
committerDmitry V. Levin <ldv@altlinux.org>
Wed, 26 Dec 2018 01:59:38 +0000 (01:59 +0000)
* xlat/bpf_attach_type.in (BPF_FLOW_DISSECTOR): New constant
introduced by Linux commit v4.20-rc1~14^2~259^2~9^2~4.
* xlat/bpf_prog_types.in (BPF_PROG_TYPE_FLOW_DISSECTOR): Likewise.
* NEWS: Mention this.
* tests/bpf.c (BPF_PROG_LOAD_checks, BPF_PROG_QUERY_checks): Update.
* tests/kernel_version.c (print_bpf_attr): Update.

Co-Authored-by: Dmitry V. Levin <ldv@altlinux.org>
NEWS
tests/bpf.c
tests/kernel_version.c
xlat/bpf_attach_type.in
xlat/bpf_prog_types.in

diff --git a/NEWS b/NEWS
index a228ce4504b00ed9bc213b369c6f45ccca0943ae..da99cb16e2d21d2255cfef111cd01295d377b30a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -23,7 +23,8 @@ Noteworthy changes in release ?.?? (????-??-??)
   * Enhanced decoding of getsockopt SO_ERROR option.
   * Enhanced error diagnostics when the first exec fails.
   * Added %net as a short form of %network in syscall specifications.
-  * Updated lists of FAN_*, IFLA_*, NETLINK_*, SOL_*, and TCA_* constants.
+  * Updated lists of BPF_*, FAN_*, IFLA_*, NETLINK_*, SOL_*, and TCA_*
+    constants.
   * Enhanced manual page.
 
 * Bug fixes
index 0bcb7e0478ffb69bb523d75426e65ae2f1f7068a..9e7f66f653aa1b6f6389caf7256af88c9c6ea38c 100644 (file)
@@ -573,7 +573,7 @@ static struct bpf_attr_check BPF_PROG_LOAD_checks[] = {
        },
        { /* 1 */
                .data = { .BPF_PROG_LOAD_data = {
-                       .prog_type = 21,
+                       .prog_type = 22,
                        .insn_cnt = 0xbadc0ded,
                        .insns = 0,
                        .license = 0,
@@ -584,7 +584,7 @@ static struct bpf_attr_check BPF_PROG_LOAD_checks[] = {
                        .prog_flags = 0,
                } },
                .size = offsetofend(struct BPF_PROG_LOAD_struct, prog_flags),
-               .str = "prog_type=0x15 /* BPF_PROG_TYPE_??? */"
+               .str = "prog_type=0x16 /* BPF_PROG_TYPE_??? */"
                       ", insn_cnt=3134983661, insns=NULL, license=NULL"
                       ", log_level=42, log_size=3141592653, log_buf=NULL"
                       ", kern_version=KERNEL_VERSION(51966, 240, 13)"
@@ -958,7 +958,7 @@ static struct bpf_attr_check BPF_PROG_QUERY_checks[] = {
        { /* 2 */
                .data = { .BPF_PROG_QUERY_data = {
                        .target_fd = 3141592653U,
-                       .attach_type = 17,
+                       .attach_type = 18,
                        .query_flags = 0xfffffffe,
                        .attach_flags = 0xfffffffc,
                        .prog_ids = 0xffffffffffffffffULL,
@@ -966,7 +966,7 @@ static struct bpf_attr_check BPF_PROG_QUERY_checks[] = {
                } },
                .size = offsetofend(struct BPF_PROG_QUERY_struct, prog_cnt),
                .str = "query={target_fd=-1153374643"
-                      ", attach_type=0x11 /* BPF_??? */"
+                      ", attach_type=0x12 /* BPF_??? */"
                       ", query_flags=0xfffffffe /* BPF_F_QUERY_??? */"
                       ", attach_flags=0xfffffffc /* BPF_F_??? */"
                       ", prog_ids="
index 63299bcb9878f897983c3f8b9b0af3b24b6401f1..3f8a5fef9d407af502a9f387c10ec68c8e6a6dea 100644 (file)
@@ -35,9 +35,9 @@ static void
 print_bpf_attr(void)
 {
 #if XLAT_RAW
-       printf("{prog_type=0x15"
+       printf("{prog_type=0x16"
 #else
-       printf("{prog_type=0x15 /* BPF_PROG_TYPE_??? */"
+       printf("{prog_type=0x16 /* BPF_PROG_TYPE_??? */"
 #endif
                ", insn_cnt=3134983661"
                ", insns=NULL"
@@ -72,7 +72,7 @@ main(void)
 {
        long ret;
        struct BPF_PROG_LOAD_struct prog = {
-               .prog_type = 21,
+               .prog_type = 22,
                .insn_cnt = 0xbadc0ded,
                .insns = 0,
                .license = 0,
index 04619e6471d48ef6da86d3d7c6f73d4aa408187b..29a58b81ba440d3a027f179703bc6074940b848d 100644 (file)
@@ -16,3 +16,4 @@ BPF_CGROUP_INET6_POST_BIND 13
 BPF_CGROUP_UDP4_SENDMSG 14
 BPF_CGROUP_UDP6_SENDMSG 15
 BPF_LIRC_MODE2 16
+BPF_FLOW_DISSECTOR 17
index d32ca7fad2de2792cc30ead1211757aa727daedc..dd1b40792eab08b706f29ff28922f7115f748f25 100644 (file)
@@ -20,3 +20,4 @@ BPF_PROG_TYPE_RAW_TRACEPOINT 17
 BPF_PROG_TYPE_LWT_SEG6LOCAL 18
 BPF_PROG_TYPE_LIRC_MODE2 19
 BPF_PROG_TYPE_SK_REUSEPORT 20
+BPF_PROG_TYPE_FLOW_DISSECTOR 21