13 Commits (11f406414ebeaaf2a4ee88cc30fcd35e85524f01)

Author SHA1 Message Date
Michal Rostecki f462b301f4 ebpf: Update git repository URL for aya-log
aya-log was moved to the main aya repository, the old one is archived.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki 0ea4a7eb04 Add aya-log
This change adds aya-log and example log messsages to all eBPF
programs.

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
2 years ago
Michal Rostecki 04584fe9c5 ebpf: Make the dev target identical to release
eBPF programs cannot be debugged and those ones built with the default
dev profile are often annoying the verifier. Therefore it doesn't make
sense to compile not optimized eBPF objects.

However, we still want to let people to use the dev profile, especially
in the future when we want to get rid of xtask by using cargo binary
dependencies[0]. The trick is to have no real difference between dev and
release profile in eBPF.

This change doesn't affect the userspace part which still is going to
contain debug symbols when built with dev profile.

[0] https://rust-lang.github.io/rfcs/3028-cargo-binary-dependencies.html

Signed-off-by: Michal Rostecki <vadorovsky@gmail.com>
3 years ago
Michal Rostecki ec1910fffd Revert "Use release profile for eBPF programs by default"
This reverts commit ad9b8ee8dc.
3 years ago
Marcus Weiner 220aa73093
Use HTTPS url for git dependency 3 years ago
Dmitry Savintsev aa3b2a4407 use edition 2021 3 years ago
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
Alessandro Decina 7baf4f5688 Sleep while waiting for SIGINT 3 years ago
Alessandro Decina 6d30972fdb ebpf: set debug = 1 to avoid a potential segfault in LLVM 3 years ago
Alessandro Decina dcf738cd46 Switch git urls to aya-rs 3 years ago
Alessandro Decina 81a98fe13a ebpf: set opt-level = 2
Pretty much all non trivial programs need at least opt-level=2 to
compile and link successfully
3 years ago
Dave Tucker 5d018fd6ba Add xtask for building ebpf programs
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