Commit Graph

735 Commits (4c1d645aa6e8150b50007ff42eb17e270a5b80af)
 

Author SHA1 Message Date
Kenjiro Nakayama c5d5695a71 Add missing BPF_MAP_TYPE_STACK in BPF code
Currently BPF_MAP_TYPE_STACK is supported by user code (`aya/src/maps/stack.rs`),
but it does not support the BPF_MAP_TYPE_STACK BPF code.

This patch fixes it.
2 years ago
Dave Tucker 8672ff6c56 bpf: Remove generated getters
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker 9a33b6b654 aya-gen: Remove getters
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker a0473548ca
Merge pull request #265 from dave-tucker/sklookup
Add support for BPF_PROG_TYPE_SK_LOOKUP
2 years ago
Dave Tucker 74704c3b28 bpf: Support BPF_PROG_TYPE_SK_LOOKUP
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker 2226b89ceb aya: Add support for BPF_PROG_TYPE_SK_LOOKUP
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Kenjiro Nakayama c4262f793d Add support for BPF_MAP_TYPE_BLOOM_FILTER
This patch adds support for `BPF_MAP_TYPE_BLOOM_FILTER`.
2 years ago
Dave Tucker 4acd996cb8 bpf: Add PtRegs wrapper
This adds a portable wrapper around pt_regs and user_pt_regs.
It makes writing Raw Tracepoint or KProbe programs easier when the
arguments are one of these types while also ensuring code is portable
across architectures

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
2 years ago
Dave Tucker 7d8365c351
Merge pull request #281 from dave-tucker/export
aya: Export program modules
3 years ago
Dave Tucker 824baf9d64 aya: Export program modules
This allows access to XdpLink, XdpLinkId etc... which is currently
unavailable since these modules are private

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker c385d1881b
Merge pull request #280 from krsh/riscv64-arch
Add riscv64 bindings
3 years ago
gianluigi a9c0fccb2e Add riscv64 bindings 3 years ago
Dave Tucker de1559ab77
Merge pull request #279 from aya-rs/codegen
Update libbpf to 47595c2f08aece55baaf21ed0b72f5c5abf2cb5e
3 years ago
dave-tucker 4767664d5d [codegen] Update libbpf to 47595c2f08aece55baaf21ed0b72f5c5abf2cb5eUpdate libbpf to 47595c2f08aece55baaf21ed0b72f5c5abf2cb5e
Files changed:\nM	aya/src/generated/linux_bindings_riscv64.rs
M	bpf/aya-bpf-bindings/src/riscv64/bindings.rs
M	bpf/aya-bpf-bindings/src/riscv64/getters.rs
M	bpf/aya-bpf-bindings/src/riscv64/helpers.rs
3 years ago
Dave Tucker ce7a8b7dc1
.github: gen - add rustfmt to toolchain 3 years ago
Dave Tucker b71fe64a10
Merge pull request #278 from dave-tucker/riscv
riscv scaffolding for codegen
3 years ago
Dave Tucker 8b7950bb0f .github: use nightly for codegen
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker edaa70b5ba riscv scaffolding for codegen
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker 3acd8d3650
Merge pull request #275 from krsh/riscv64-arch
Add riscv64 architecture support to xtask/codegen
3 years ago
gianluigi d35680f30c Add riscv64 architecture support to xtask/codegen 3 years ago
Dave Tucker 0d7fb4472d
Merge pull request #276 from dave-tucker/clippy
clippy: fix new lints on nightly
3 years ago
Dave Tucker 4a32e7d985 clippy: fix new lints on nightly
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Michal Rostecki 3262f85925 bpf(doc): Hide docs of bindings
Before this change, documentation of helper functions (defined by us,
not bindings) were not visible, because `use gen::*` was overriding them
with helpers coming from aya-bpf-bindings, which have the same names and
no docs.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
3 years ago
Amos Wenger a1e7b58d7c Don't use #[no_mangle] (clashes with `#[export_name]`)
This closes #270.

With this, the symbol name is correct in the intermediate LLVM bitcode
object file (`.rcgu.o`) and in the final BPF program.
3 years ago
Dave Tucker 9904237ac1
Merge pull request #273 from dave-tucker/fix_sidebar
xtask: Add all crates to sidebar
3 years ago
Dave Tucker ba312c48d5 xtask: Add all crates to sidebar
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Kenjiro Nakayama e68d734c68
Add support for BPF_PROG_TYPE_CGROUP_SOCKOPT (#268) 3 years ago
Alessandro Decina 63b6286bd9
Merge pull request #263 from nak3/cgroup-skb-attach-type
Set attach type during load for BPF_PROG_TYPE_CGROUP_SKB
3 years ago
Alessandro Decina aacf6ec110
Merge pull request #267 from aya-rs/codegen
Update libbpf to 86eb09863c1c0177e99c2c703092042d3cdba910
3 years ago
alessandrod 7f7c78ad6b [codegen] Update libbpf to 86eb09863c1c0177e99c2c703092042d3cdba910Update libbpf to 86eb09863c1c0177e99c2c703092042d3cdba910
Files changed:\nM	aya/src/generated/linux_bindings_aarch64.rs
M	aya/src/generated/linux_bindings_armv7.rs
M	aya/src/generated/linux_bindings_x86_64.rs
M	bpf/aya-bpf-bindings/src/aarch64/bindings.rs
M	bpf/aya-bpf-bindings/src/aarch64/getters.rs
M	bpf/aya-bpf-bindings/src/aarch64/helpers.rs
M	bpf/aya-bpf-bindings/src/armv7/bindings.rs
M	bpf/aya-bpf-bindings/src/armv7/getters.rs
M	bpf/aya-bpf-bindings/src/armv7/helpers.rs
M	bpf/aya-bpf-bindings/src/x86_64/bindings.rs
M	bpf/aya-bpf-bindings/src/x86_64/getters.rs
M	bpf/aya-bpf-bindings/src/x86_64/helpers.rs
3 years ago
Alessandro Decina daf3386601
Merge pull request #266 from nak3/add-sk_type
xtask: Add `bpf_.*` instead of `bpf_map_.*` to allowed type
3 years ago
Kenjiro Nakayama 42baf1c074 Remove bpf_adj_room_mode 3 years ago
Kenjiro Nakayama 5d228695a4 Use map() 3 years ago
Alessandro Decina 8fd8816dfd
Merge pull request #261 from dave-tucker/cgroup_sock
Add Support for BPF_PROG_TYPE_CGROUP_SOCK_ADDR
3 years ago
Kenjiro Nakayama 200d42e414 xtask: Add `bpf_.*` instead of `bpf_map_.*` to allowed type
This patch replaces `bpf_map_.*` with `bpf_.*`.

Currently some types that are not used in helper functions are not generated for bindings - e.g. `bpf_sk_lookup`, `bpf_sockopt` and etc.
This patch replaces `bpf_map_.*` with `bpf_.*`.

Note, this PR does not include bindings files as it would be better to be created by auto script.
The missing bindings can be created by `cargo xtask codegen --libbpf-dir /<PATH_TO>/libbp`.
3 years ago
Dave Tucker 2bac924464 bpf: Add support for BPF_PROG_TYPE_CGROUP_SOCK_ADDR
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker af54b6c818 aya: Add BPF_PROG_TYPE_CGROUP_SOCK_ADDR
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Kenjiro Nakayama 29c10fafb7 Set attach type during load for BPF_PROG_TYPE_CGROUP_SKB
As per title, this patch sets `expected_attach_type` during load.
3 years ago
Alessandro Decina 41a27e3784
Merge pull request #260 from dave-tucker/netlify
Add Netlify Config and Update README
3 years ago
Dave Tucker 7e6530ff1e readme: Add unreleased docs link
This rearranges the README to use fancy badges!
And adds links to the docs published on netlify.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker 713ea349fd docs: Add netlify.toml
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker 5ff672d8a0
Merge pull request #259 from dave-tucker/xtask
xtask: Add docs build
3 years ago
Dave Tucker 8205bee930 xtask: Add docs build
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Kenjiro Nakayama f721021a0a
Add support for BPF_PROG_TYPE_CGROUP_SYSCTL (#256)
* Add support for BPF_PROG_TYPE_CGROUP_SYSCTL

This patch adds support for `BPF_PROG_TYPE_CGROUP_SYSCTL`.

* Parse unnamed macro

* Fix docs
3 years ago
Dave Tucker 2fca4aee4e
Merge pull request #253 from dave-tucker/forget
aya: Implement forget_link
3 years ago
Dave Tucker 8069ad14d0 aya: Implement forget_link
Fixes #51

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Alessandro Decina b9a544831c
Merge pull request #255 from NoneTirex/main
aya-bpf: Set skb_buff visbility to pub
3 years ago
tirex f1f7185dab Set skb_buff visbility to pub 3 years ago
Alessandro Decina e71e07f88e
Merge pull request #254 from dave-tucker/clippy
clippy: Fix lint against latest nightly
3 years ago
Dave Tucker cdaa3af5ae clippy: Fix lint against latest nightly
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago