Alessandro Decina
9a0b13e781
ignore .vscode
3 years ago
Alessandro Decina
8956dd0b71
add .cargo/config
3 years ago
Alessandro Decina
e666cad2d6
Fix libc link in readme
3 years ago
Alessandro Decina
be0b7bbd83
Doc fixes
3 years ago
Alessandro Decina
9f7b017d5d
aya: bump version to 0.10
3 years ago
Alessandro Decina
5e0057acb9
Add readme
3 years ago
Alessandro Decina
768640dd46
aya: add doc aliases for maps and programs
3 years ago
Alessandro Decina
293e66af65
More docs
3 years ago
Alessandro Decina
ad58e171ff
aya: refactor tc code a bit and add docs
3 years ago
Alessandro Decina
11e21e83be
More docs
3 years ago
Alessandro Decina
6c7df27bd0
More doc fixes
3 years ago
Alessandro Decina
28158e6028
aya: improve async perf map docs
3 years ago
Alessandro Decina
6ecf7dabf3
aya: tweak PerfEventArray docs
3 years ago
Alessandro Decina
6772595f3e
aya: ProgramArray: more doc fixes
3 years ago
Alessandro Decina
4bde0c54bd
aya: ProgramArray: tweak docs
3 years ago
Alessandro Decina
2cda5dbbe7
aya: implement ProgramFd for CgroupSkb
3 years ago
Alessandro Decina
2d7b9b2e90
aya: fix CgroupSkb docs
3 years ago
Alessandro Decina
67d35cc1d3
bpf: fix PerfMap::output() API when appending context data
...
map.output(&ctx, &data, nr_bytes) can be used to append nr_bytes from
the current context to the &data event.
3 years ago
Alessandro Decina
73c48a5029
bpf: add support for BPF_PROG_TYPE_CGROUP_SKB programs
...
Example:
fn cgroup_skb_egress(skb: SkSkbContext) -> i32 {
// allow data to go through
1
}
3 years ago
Alessandro Decina
08a68faf8a
aya: programs: add support for BPF_PROG_TYPE_CGROUP_SKB programs
3 years ago
Alessandro Decina
fb3e2f7f9d
aya: programs: fix detaching programs attached with bpf_prog_attach
3 years ago
Alessandro Decina
665802594c
aya: programs: fix syscall name in errors
3 years ago
Alessandro Decina
81a0b61164
aya: handle reordered functions
...
LLVM will split .text into .text.hot .text.unlikely etc and move the
content around in order to improve locality. We need to parse all the
text sections or relocations can potentially fail.
3 years ago
Alessandro Decina
b92b1e18a9
aya: improve call relocation error messages
3 years ago
Alessandro Decina
20b2d4c77d
aya: BpfError: set the #[source] attribute for RelocationErrors
3 years ago
Arnabjyoti Kalita
6974d349e8
programs: add support for attaching and detaching TC programs
...
This change adds support for attaching TC programs directly from aya, without
having to use iproute2/tc.
3 years ago
Alessandro Decina
d085bdb89f
CI: add build-test github action
3 years ago
Alessandro Decina
240c65507b
bpf: add HashMap::remove()
3 years ago
Alessandro Decina
696ae6079c
bpf: Add HashMap::pinned API
4 years ago
Alessandro Decina
97c96383bd
bpf: improve SockOpsContext API
4 years ago
Alessandro Decina
cb3d71429c
bpf: improve SkMsgContext API
4 years ago
Alessandro Decina
bf4892d0db
bpf: add support for Queue and SockMap maps
4 years ago
Alessandro Decina
31f8d71604
aya: add support for Stack and Queue maps
4 years ago
Alessandro Decina
157c0e2831
bpf: generate bindings for SOL_SOCKET and SO_* socket options
...
This is needed for bpf_getsockopt() and bpf_setsockopt()
4 years ago
Alessandro Decina
575e85c412
bpf: add id and pinning fields to bpf_map_def
4 years ago
Alessandro Decina
40b7da6655
aya: add id and pinning fields to bpf_map_def
4 years ago
Alessandro Decina
ab8d512b60
bpf: add HashMap::insert
4 years ago
Alessandro Decina
dc4e020f29
aya: netlink: improve error messages
4 years ago
Alessandro Decina
8f55cd728c
bpf: SkSkbContext: add ::l3_csum_replace
4 years ago
Alessandro Decina
4febbc3fae
bpf: perf_map: fix type error
4 years ago
Alessandro Decina
8e6f447e9b
bpf: sk_skb: add helper methods
...
This adds support for skb_store_bytes, skb_load_bytes and
l4_csum_replace to SkSkbContext.
4 years ago
Alessandro Decina
274ea91b5e
bpf: aya-bpf-bindings: commit generated bindings
4 years ago
Alessandro Decina
afcc5dc662
bpf: add support for BPF_PROG_TYPE_SCHED_CLS programs
4 years ago
Alessandro Decina
5effc972ac
aya: add support for BPF_PROG_TYPE_SCHED_CLS programs
4 years ago
Alessandro Decina
4222b140ec
aya: perf_map: fix bug when max_entries=0
...
When a perf map has max_entries=0, max_entries is dynamically set at
load time to the number of possible cpus as reported by
/sys/devices/system/cpu/possible.
This change fixes a bug where instead of setting max_entries to the
number of possible cpus, we were setting it to the cpu index of the last
possible cpu.
4 years ago
Alessandro Decina
3b7ffd0048
aya: update generated bindings
...
Update generated bindings with kernel headers from libbpf 4ccc1f0
4 years ago
Alessandro Decina
c44393d59b
xtask: codegen: use uapi kernel headers from libbpf
...
libbpf periodically syncs uapi headers from the kernel. Use those to
generate bindings so that we don't have to rely on distro packages
when we cut releases.
4 years ago
Alessandro Decina
9595bd4571
aya-gen: don't generate doc comments
4 years ago
Alessandro Decina
30d2b25f11
aya: xdp: fix detaching on kernels older than 5.7
...
XDP_FLAGS_REPLACE was added in 5.7. Now for kernels >= 5.7 whenever we
detach an XDP program we pass along the program fd we expect to be
detaching. For older kernels, we just detach whatever is attached, which
is not great but it's the way the API worked pre XDP_FLAGS_REPLACE.
4 years ago
Alessandro Decina
607cf68a69
aya: xdp: set flags when attaching with netlink
4 years ago