This change exposes the ifindex field from the underlying xdp_md
data structure to the XdpContext in Aya. The ifindex represents the
unique OS-provided index for a network interface.
Fixes#1140
Per man 2 perf_event_open:
> RETURN VALUE
> On success, perf_event_open() returns the new file descriptor. On
> error, -1 is returned and errno is set to indicate the error.
Bake this into our syscalls so we stop using `_` so much which can hide
information loss. Remove the type parameter to SysResult.
Per man 2 bpf:
> RETURN VALUE
> For a successful call, the return value depends on the operation:
>
> BPF_MAP_CREATE
> The new file descriptor associated with the eBPF map.
>
> BPF_PROG_LOAD
> The new file descriptor associated with the eBPF program.
>
> All other commands
> Zero.
>
> On error, -1 is returned, and errno is set to indicate the error.
Bake this into our syscalls so we stop using `_` so much which can hide
information loss.
It is especially common to run CI on non-main branches in forks. This
shouldn't have any impact on how many CI jobs we run in the main aya
repo if contributors follow a fork-centric workflow.
PerCpuHashMap was never returning MapError::KeyNotFound because
bpf_map_lookup_elem_per_cpu was replacing Ok(None) with
Ok(Some(zeroed_value)).
Update bpf_map_lookup_elem_per_cpu to map the Option value.
libbpf is a submodule, so its version is already effectively pinned.
`xtask codegen` also runs `git submodule update` which reverts the
action of updating to `origin/HEAD`. Remove the cruft.
libbpf commit: d4a841a32b04d69194ab5bdac359a51938a206ce
Files changed:
M aya-obj/src/generated/linux_bindings_aarch64.rs
M aya-obj/src/generated/linux_bindings_armv7.rs
M aya-obj/src/generated/linux_bindings_mips.rs
M aya-obj/src/generated/linux_bindings_powerpc64.rs
M aya-obj/src/generated/linux_bindings_riscv64.rs
M aya-obj/src/generated/linux_bindings_s390x.rs
M aya-obj/src/generated/linux_bindings_x86_64.rs
M xtask/public-api/aya-obj.txt
When `aya::obj` was migrated to be its own crate `aya-obj`, the `obj`
alias was created to preserve existing imports that relied on
`crate::obj`.
This resulted in 3 ways to import `aya-obj` objects:
- `use aya_obj::*`
- `use obj::*`
- `use crate::obj::*`
The `obj` alias is now removed to avoid confusion, and all `obj` imports
are funneled through `aya_obj`.