Skip to content

Commit 4031506

Browse files
committed
fix: emit BPF helper functions before init_bpf_maps in userspace codegen
Signed-off-by: Cong Wang <cwang@multikernel.io>
1 parent 2985274 commit 4031506

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/userspace_codegen.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4517,7 +4517,7 @@ static void handle_signal(int sig) {
45174517
%s
45184518
45194519
%s
4520-
|} includes string_typedefs unified_declarations string_helpers daemon_globals "" structs_with_pinned skeleton_code all_fd_declarations map_operation_functions ringbuf_handlers ringbuf_dispatch_functions auto_bpf_init_code getopt_parsing_code bpf_helper_functions (struct_ops_runtime_helpers ^ (if struct_ops_runtime_helpers <> "" && struct_ops_attach_functions <> "" then "\n\n" else "") ^ struct_ops_attach_functions) functions
4520+
|} includes string_typedefs unified_declarations string_helpers daemon_globals "" structs_with_pinned skeleton_code all_fd_declarations map_operation_functions ringbuf_handlers ringbuf_dispatch_functions bpf_helper_functions getopt_parsing_code auto_bpf_init_code (struct_ops_runtime_helpers ^ (if struct_ops_runtime_helpers <> "" && struct_ops_attach_functions <> "" then "\n\n" else "") ^ struct_ops_attach_functions) functions
45214521
45224522
(** Generate userspace C code from IR multi-program *)
45234523
let generate_userspace_code_from_ir ?(config_declarations = []) ?(tail_call_analysis = {Tail_call_analyzer.dependencies = []; prog_array_size = 0; index_mapping = Hashtbl.create 16; errors = []}) ?(kfunc_dependencies = {kfunc_definitions = []; private_functions = []; program_dependencies = []; module_name = ""}) ?(resolved_imports = []) (ir_multi_prog : ir_multi_program) ?(output_dir = ".") source_filename =

0 commit comments

Comments
 (0)