Commit Graph

263 Commits (569b8ca39ed0aac5b814f86d6f54ed44dc6295c4)
 

Author SHA1 Message Date
Dave Tucker 569b8ca39e obj/btf: Add some tests for reading btf data
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Dave Tucker 753a683704 btf: Add bindings for BTF_KIND_FLOAT
Fixes: 

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Dave Tucker 1153a51202
docs: Logging Packets ()
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Markus Stange 70dc862196
Fix rustup command in the docs. ()
rustup install nightly --component rust-src

gives:

```
error: Found argument '--component' which wasn't expected, or isn't valid in this context

USAGE:
    rustup install [FLAGS] [OPTIONS] <toolchain>...

For more information try --help
```

The correct command seems to be `rustup toolchain install nightly --component rust-src`.
Dave Tucker b880ccd269
README: Add docs link ()
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Dave Tucker 07a21e5822
docs: Initial Commit of Aya Book ()
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
Alessandro Decina f30abca15e (cargo-release) version 0.10.3
Alessandro Decina 66a12ffcf7 aya: programs: tweak LircMode2::query doc.
Alessandro Decina 8c03ba052a aya: netlink: fix clippy lint
Alessandro Decina a68ff47246 aya-bpf, aya-bpf-bindings: fix clippy lints
Sean Young 81e07e9661
Implement query for lirc programs ()
Signed-off-by: Sean Young <sean@mess.org>
Alessandro Decina fa2cbe2f82 aya: fix clippy warnings
Alessandro Decina c2a90c2c01 aya: tc: add qdisc_detach_program
qdisc_detach_program can be used to detach all the programs that have
the given name. It's useful when you want to detach programs that were
attached by some other process (eg. iproute2), or when you want to
detach programs that were previously left attached because the program
that attached them was killed.
Alessandro Decina 0a9d02140a aya: netlink: fix alignment when writing attributes
Alessandro Decina abb199e6f4 aya: netlink: fix handling of multipart messages
Alessandro Decina 9185f32f6f aya: tc: clean up netlink code a bit
Simone Margaritelli b4b019e447
fix: pass BTF object by reference in order to allow multiple eBPF programs to share it and save memory (closes ). ()
Tw 55ba0538f2
bpf: add support for tracepoint program ()
This patch add initial support for tracepoint program type.
Hope you enjoy.

Signed-off-by: Tw <wei.tan@intel.com>
Alessandro Decina d996a88de4 aya: fix formatting
Alessandro Decina 12ea9f3500 CI: enable clippy for aya, aya-gen and xtask
Alessandro Decina 2d16843d5d xtask: clippy warnings
Alessandro Decina 5dfd27dbd0 bpf: fix some clippy warnings
Alessandro Decina 1159741eda aya-gen: fix clippy warnings
Alessandro Decina 0878c4505a aya: fix clippy warnings
Alessandro Decina 21e01df242 aya: obj: improve parse_map_def tests
Add a test that checks that we handle ELF section padding correctly and
simplify the other tests.
Alessandro Decina b657930a3e aya: don't error out parsing padded map sections
Fixes 
Simone Margaritelli 8311abfdcb
added support for armv7-unknown-linux-gnueabi and armv7-unknown-linux-gnueabihf
* new: added support for armv7-unknown-linux-gnueabi (closes alessandrod/aya/issues/22)

* fix: replaced custom type defintions with proper libc types

* fix: fixed pointless parameter binding

* new: added linker for armv7-unknown-linux-gnueabihf to cargo config
Alessandro Decina b3ecbe7c54
Merge pull request from tw4452852/minor_fix_for_stackid
bpf: fix a minor bug due to stackid allocation
Tw d1b7b024dc bpf: fix a minor bug due to stackid allocation
The type casting introduces an allocation, this will cause compiling failure when linking final bpf target.
So remove this casting to fix this issue.

BTW, the following is the failure I met:

= note: 07:24:12 [ERROR] fatal error: "unable to allocate function return #1"
          PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
          Stack dump:
          0.    Running pass 'Function Pass Manager' on module 'trace_bpf-001a275b17e9eb12'.
          1.    Running pass 'BPF DAG->DAG Pattern Instruction Selection' on function '@_ZN7aya_bpf4maps11stack_trace10StackTrace11get_stackid17h32b649bc3780c0aaE'

Signed-off-by: Tw <wei.tan@intel.com>
Alessandro Decina 7eddffb962
Merge pull request from tw4452852/stacktrace
bpf: add support for STACK_TRACE map
Tw fd20bd5e23 bpf: add support for STACK_TRACE map
This path support initial support for BPF_MAP_TYPE_STACK_TRACE.

Signed-off-by: Tw <wei.tan@intel.com>
Alessandro Decina ef39e0ebd2 bpf: sk_skb: add ::cb() and ::cb_mut() to work with skb->cb
Alessandro Decina 9c8e78b7d4 aya: tc: make qdisc_add_clsact return io::Error
Alessandro Decina 35e9b4e639 bpf: don't generate bpf_map_def and fix aya_bpf::bindings overrides
Alessandro Decina ec5822d78e bpf: sk_skb: wrap more helpers
Alessandro Decina 122a5306e7 aya, aya-bpf-bindings: regenerate bindings
Alessandro Decina a847d6d53b xtask: aya-bpf-bindings: add bpf_adj_room_mode
Alessandro Decina 8cd669ca9a xtask: fix include paths for kernel headers bundled with libbpf
Alessandro Decina 08c71dfeb1 aya: kprobe: remove pid argument
Kprobes can only be attached globally. Per-pid logic needs to be
implemented on the BPF side with bpf_get_current_pid_tgid.
Arnabjyoti Kalita 35f15f70e0
aya: add minimum kernel version for each map and program type ()
Alessandro Decina be035bf42c CI: add lint workflow
Alessandro Decina 1d294ba34c CI: don't install bpf-linker
The bpf code isn't tested in CI yet
Alessandro Decina bb15e82c1d aya: add missing load() in kprobe example
Fixes 
Rafael Ortiz d8d311738c
aya: support both bpf_map_def layout variants
Libbpf and iproute2 use two slightly different `bpf_map_def` layouts. This change implements support for loading both.

Refs: , 
Alessandro Decina 97cb0db0ad bpf/aya-bpf-cty: target_arch for bpf*-unknown-none was renamed to "bpf"
Alessandro Decina d0a0be65d2 Add contributing section to readme
Alessandro Decina 58e45f8513 Add CONTRIBUTING.md
Alessandro Decina 5f0ff1698a aya: netlink: tc: use ptr::read_unaligned instead of deferencing a potentially unaligned ptr
Alessandro Decina 7f2ceaf12e aya: netlink: port TC code to using new nlattr utils
Alessandro Decina d9b5ab575f aya: netlink: refactor nlattr writing code