Alessandro Decina
74d5f17559
aya: rework IterableMap and ProgramArray
...
Make MapKeys not use IterableMap. Leave only ProgramArray::get,
ProgramArray::set and ProgramArray::unset exposed as the other syscalls
don't work consistently for program arrays.
4 years ago
Alessandro Decina
aa3a30d196
aya: PerCpuKernelMem doesn't need to be public
4 years ago
Alessandro Decina
1746bbf5b8
aya: add aya::maps::Array
4 years ago
Alessandro Decina
c3b902137b
aya: add aya::maps::array and move ProgramArray under it
4 years ago
Alessandro Decina
6cec8be564
aya: hash_map: add doc aliases for HASH and LRU_HASH
4 years ago
Alessandro Decina
7a989b43b9
aya: per_cpu_hash_map: add support for BPF_MAP_TYPE_LRU_PERCPU_HASH
4 years ago
Alessandro Decina
635dcd44b9
aya: maps: introduce MapError::KeyNotFound
...
Change get() from -> Result<Option<V>, MapError> to -> Result<V,
MapError> where MapError::KeyNotFound is returned instead of Ok(None) to
signify that the key is not present.
4 years ago
Alessandro Decina
fd142e467c
aya: rename MapError::NotFound to MapError::MapNotFound
4 years ago
Alessandro Decina
3a5b289163
aya: add PerCpuHashMap
4 years ago
Alessandro Decina
d5098c9e57
aya: move hash_map.rs to hash_map/hash_map.rs
4 years ago
Alessandro Decina
6a12a48f03
aya: hash_map: factor out common hash code
...
This is in preparation of adding new hash map types
4 years ago
Alessandro Decina
ac83273da8
aya: fix warnings
4 years ago
Alessandro Decina
46e0a2ede4
aya: don't export VerifierLog
4 years ago
Alessandro Decina
7c6ae76975
aya: HashMap: add support for LRU maps
4 years ago
Alessandro Decina
04fde46855
aya: more docs
4 years ago
Alessandro Decina
eea27f52f3
aya: tweak docs
4 years ago
Alessandro Decina
5aa9cb12ad
aya: rename perf map and add docs
...
Rename the perf_map module to just perf, and rename PerfMap to
PerfEventArray.
4 years ago
Alessandro Decina
d94bfde295
aya: maps: add docs and make the hash_map and program_array modules public
4 years ago
Alessandro Decina
ce3f83acb1
aya: add HashMap docs
4 years ago
Alessandro Decina
e28da8812e
aya: make HashMap::new private
4 years ago
Alessandro Decina
24f7c37158
aya: add ProgramArray docs
4 years ago
Alessandro Decina
3fddc8165c
aya: make ProgramArray::new private
4 years ago
Alessandro Decina
6682a5ff39
aya: remove pop()
...
lookup_and_delete_elem is only supported for QUEUE and STACK maps at the
moment.
4 years ago
Alessandro Decina
1bbbf616b6
aya: add some docs for the crate and `Bpf`
4 years ago
Alessandro Decina
563ce46118
aya: maps: group syscall errors into MapError::SyscallError
4 years ago
Alessandro Decina
f9554d6db5
aya: fix bindings for PERF_EVENT_IOC_{ENABLE|DISABLE|SET_BPF}
4 years ago
Alessandro Decina
a92bfebf50
aya: remove TryInto magic from program()/program_mut() too
...
For programs it's actually useful being able to get the underlying
Program enum, for example when iterating/loading all the programs
4 years ago
Alessandro Decina
42e0a659b2
aya: remove TryInto cleverness from map() and map_mut()
...
Require callers to call try_into() explicitly. It's more characters, but
it's easier to understand/document.
Also introduce MapError::NotFound instead of returning Result<Option<_>>.
4 years ago
Alessandro Decina
d3482c063c
aya: fix some badly completed match arms
4 years ago
Alessandro Decina
ee05f9d949
aya: fix verifier log handling
4 years ago
Alessandro Decina
92b4ed2664
aya: add support for function calls
4 years ago
Alessandro Decina
8b0eee317d
aya: section: collecting relocations can't fail anymore
4 years ago
Alessandro Decina
318c16cea3
aya: obj: rename symbol_table to symbols_by_index
4 years ago
Alessandro Decina
286e117fe0
aya: add Program::name() and make ::prog_type() public
4 years ago
Alessandro Decina
0199e4b297
aya: bpf: Add Bpf::programs()
4 years ago
Alessandro Decina
dcb5121985
aya: bpf: remove lifetime param from previous signature
4 years ago
Alessandro Decina
ed53f7470b
aya: maps: add Map::name() and Map::map_type()
4 years ago
Alessandro Decina
0a493baed6
aya: add Bpf::maps() to get all the maps
4 years ago
Alessandro Decina
29f2d9b2d9
aya: switch to rustified enums
4 years ago
Alessandro Decina
59ed237343
aya: generate code with xtask
4 years ago
Alessandro Decina
8327ffbb8d
xdp: xdp BPF_LINK_CREATE was added in 5.9
4 years ago
Alessandro Decina
1e779c520a
aya: obj: implement sane defaults for license and kernel version
...
Default to license=GPL and kernel_version=any
4 years ago
Alessandro Decina
f11df77f85
aya: implement missing bit of retprobes
4 years ago
Alessandro Decina
b7369d2763
aya: sys: fix warning
4 years ago
Alessandro Decina
82bcef3790
aya: rename gen-bindings to gen-bindings.sh
4 years ago
Alessandro Decina
245cd46bab
aya: tweak error display
4 years ago
Alessandro Decina
3e8a279a59
Fix build with musl
4 years ago
Alessandro Decina
68a633fe51
perf_map: support max_entries=0
...
When a PerfMap has max_entries=0, set max_entries to the number of
available CPUs.
4 years ago
Alessandro Decina
f56c32b46b
util: add possible_cpus()
4 years ago
Alessandro Decina
a3ab2eff57
Format fixes
4 years ago