20 Commits (c41fb5ef0de9b9844b2bb464d1e7bc0740aeeef0)

Author SHA1 Message Date
Michal Rostecki ad9b8ee8dc Use release profile for eBPF programs by default
This change removes the differentiation between release and dev profiles
for eBPF programs. There is no way eBPF programs can be debugged and
building them with dev profile just makes them slower and often unable
to be verified. They should be always built with the release profile.

After this change, `cargo xtask build-ebpf` is going to build eBPF
programs with release profile. And the userspace program is going to
include eBPF program bytes from target/release/. Regardless of which
profile is being used in the userspace program.

`cargo xtask build-ebpf` has the --profile argument which can be
optionally used (i.e. for user-defined profiles), but by default the
value of that option is `release`.

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
3 years ago
Dmitry Savintsev 4a9e5843a7
fix typo 3 years ago
Dmitry Savintsev c35eadc34b avoid 'cargo fmt' diffs in generated code 3 years ago
Dmitry Savintsev 4d22913931
classifier: don't bail on qdisc_add_clsact error 3 years ago
Michal Rostecki de709c52d0 Use Tokio and simplelog by default
Replace ctrlc usage with Tokio and simplelog.

Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
3 years ago
Dmitry S 21803634d7 xdp - suggest SKB_MODE on attach failure 3 years ago
Dmitry Savintsev c7dfae4933 import TryFrom only for sk_msg programs
Avoid unused_imports warning for std::convert::TryFrom.
Conditionally import it only when it is needed -
in sk_msg programs.

remove unused `std::convert::TryFrom` import to avoid the warning in the generated projects:
```
warning: unused import: `TryFrom`
 --> myapp/src/main.rs:4:15
  |
4 |     convert::{TryFrom,TryInto},
  |               ^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: `myapp` (bin "myapp") generated 1 warning
```
3 years ago
Michal Rostecki e1fb8024a6 fentry/fexit: Add template for fentry/fexit programs
Signed-off-by: Michal Rostecki <mrostecki@opensuse.org>
3 years ago
Dave Tucker 292ae61bee update to new api in aya main
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker e18bfe3e0d rename userspace feature to user
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
William Findlay a80359acca
userspace: use include_bytes_aligned! instead of --path flag 3 years ago
William Findlay 3f082e713e
tp_btf: add template for tp_btf programs 3 years ago
William Findlay 7908e8593d
lsm: update program.load() to use new signature with &Btf 3 years ago
William Findlay 7ffb47cc6b
template: add a new template for LSM programs 3 years ago
Alessandro Decina ddbe4013bf Fix attach placeholder for kprobes 3 years ago
Alessandro Decina 7baf4f5688 Sleep while waiting for SIGINT 3 years ago
Alessandro Decina dcf738cd46 Switch git urls to aya-rs 3 years ago
Dave Tucker d98d90be7a Generate Skeleton Programs for all program types
User may specify a program_type by prompt or CLI flag.
We then generate skeleton code to the ebpf program for a noop program of
that type.

Requires cargo-generate@main

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker 273123abb7 aya isn't optional for the main program
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago
Dave Tucker 9e1c761d8d Initial Commit
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
3 years ago