From 200d42e4141b98b61c3e8c6a9eaf097156045be5 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Fri, 20 May 2022 09:08:03 +0900 Subject: [PATCH 1/2] xtask: Add `bpf_.*` instead of `bpf_map_.*` to allowed type This patch replaces `bpf_map_.*` with `bpf_.*`. Currently some types that are not used in helper functions are not generated for bindings - e.g. `bpf_sk_lookup`, `bpf_sockopt` and etc. This patch replaces `bpf_map_.*` with `bpf_.*`. Note, this PR does not include bindings files as it would be better to be created by auto script. The missing bindings can be created by `cargo xtask codegen --libbpf-dir //libbp`. --- xtask/src/codegen/aya_bpf_bindings.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xtask/src/codegen/aya_bpf_bindings.rs b/xtask/src/codegen/aya_bpf_bindings.rs index 6f3d6a02..2d17e58d 100644 --- a/xtask/src/codegen/aya_bpf_bindings.rs +++ b/xtask/src/codegen/aya_bpf_bindings.rs @@ -46,7 +46,7 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> { .constified_enum("BPF_FLOW_.*"); let types = [ - "bpf_map_.*", + "bpf_.*", "sk_action", "pt_regs", "user_pt_regs", From 42baf1c0745f38e6d79d510a2981cb19fa517945 Mon Sep 17 00:00:00 2001 From: Kenjiro Nakayama Date: Fri, 20 May 2022 11:10:07 +0900 Subject: [PATCH 2/2] Remove bpf_adj_room_mode --- xtask/src/codegen/aya_bpf_bindings.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/xtask/src/codegen/aya_bpf_bindings.rs b/xtask/src/codegen/aya_bpf_bindings.rs index 2d17e58d..616ca705 100644 --- a/xtask/src/codegen/aya_bpf_bindings.rs +++ b/xtask/src/codegen/aya_bpf_bindings.rs @@ -51,7 +51,6 @@ pub fn codegen(opts: &Options) -> Result<(), anyhow::Error> { "pt_regs", "user_pt_regs", "xdp_action", - "bpf_adj_room_mode", ]; let vars = ["BPF_.*", "bpf_.*", "TC_ACT_.*", "SOL_SOCKET", "SO_.*"];