Skip to content

Commit

Permalink
aya: tidy bpf syscalls and feature support functions into submodules
Browse files Browse the repository at this point in the history
This organizes the bpf syscalls and feature probe functions in
aya/src/sys/bpf.rs into submodules: btf, link, map, object, program,
utils, and feature_probe. This is to help make development slightly
less daunting to parse and expand on.

The submodules, except for feature_probe, are re-exported so that
importing them remains unchanged (i.e. crate::sys::foo). The feature
probe submodule isn't re-exported (uses crate::sys::feature_probe::foo)
so that there's some separation between bpf syscall stuff and feature
probing.
  • Loading branch information
tyrone-wu committed Jun 1, 2024
1 parent 0ec87f6 commit 0c1d9f2
Show file tree
Hide file tree
Showing 10 changed files with 1,254 additions and 1,153 deletions.
13 changes: 8 additions & 5 deletions aya/src/bpf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,11 +36,14 @@ use crate::{
SkMsg, SkSkb, SkSkbKind, SockOps, SocketFilter, TracePoint, UProbe, Xdp,
},
sys::{
bpf_load_btf, is_bpf_cookie_supported, is_bpf_global_data_supported,
is_btf_datasec_supported, is_btf_decl_tag_supported, is_btf_enum64_supported,
is_btf_float_supported, is_btf_func_global_supported, is_btf_func_supported,
is_btf_supported, is_btf_type_tag_supported, is_perf_link_supported,
is_probe_read_kernel_supported, is_prog_id_supported, is_prog_name_supported,
bpf_load_btf,
feature_probe::{
is_bpf_cookie_supported, is_bpf_global_data_supported, is_btf_datasec_supported,
is_btf_decl_tag_supported, is_btf_enum64_supported, is_btf_float_supported,
is_btf_func_global_supported, is_btf_func_supported, is_btf_supported,
is_btf_type_tag_supported, is_perf_link_supported, is_probe_read_kernel_supported,
is_prog_id_supported, is_prog_name_supported,
},
retry_with_verifier_logs,
},
util::{bytes_of, bytes_of_slice, page_size, possible_cpus, POSSIBLE_CPUS},
Expand Down
Loading

0 comments on commit 0c1d9f2

Please sign in to comment.