Commit Graph

15 Commits (9916092f5c575ec2383c10fa45572d7dfc31aee3)

Author SHA1 Message Date
Tamir Duberstein 9916092f5c codegen: tidy up
- Document the need for external rustfmt invocation.
- Remove reexports.
- Remove `write_to_file`.
- Avoid allocating strings when using bindgen to write bindings.
1 week ago
Tamir Duberstein 34319cba12 ci,xtask: sort architectures 1 week ago
Tamir Duberstein 56ebe1406e aya-tool: do not attempt to run rustfmt
This can be done externally. Do so in CI.

This is an attempt to resolve the inconsistency between CI and local
rustfmt in the generated bindings.

Restore running CI on generated branches; the presence of a PR is
apparently not enough.
1 week ago
Tamir Duberstein f0a9f19ddc Bump edition to 2024
Change FromRawTracepointArgs::arg to return T rather than *const T which
seems to have been returning a dangling pointer.

Arguably this is not strictly necessary; edition 2024 seems to be
focused on increased strictness around unsafe code which doesn't unlock
new functionality for our users. That said, this work revealed an
apparent bug (see above) that we wouldn't otherwise catch due to
allow-by-default lints.
1 week ago
WANG Rui 9d0bdb56e6 chore(xtask): Add loongarch64 to codegen
Signed-off-by: WANG Rui <wangrui@loongson.cn>
2 weeks ago
Tamir Duberstein c8f14b18d4 codegen: tidy up
Move some code out of a loop, where it appears to be nonsense.
1 month ago
Tamir Duberstein ee7861a6ed codegen: avoid lossy string conversion
This can't possibly work right if lossy conversion is required.
1 month ago
Dave Tucker d92284e4f8 chore(codegen): Fix duplicate BPF_F_LINK
Per the comment added in the code, there are 2 definitions of
BPF_F_LINK in the kernel headers. Once is in an anonymous enum which
bindgen will constify, and once is via a #define macro. The values are
identical. The fix is to exclude BPF_F_LINK from the list of variables
in bindgen removing one of the duplicate definitions.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 month ago
Ishan Jain 91fb73092e chore(xtask): Add mips to codegen
This will generate bindings for mips the next time that the codegen job
is run.

Signed-off-by: Ishan Jain <contact@ishanjain.me>
Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
1 month ago
astoycos a52ad4ba2a codegen: add `tcx_action_base` enum to bindings
Signed-off-by: astoycos <astoycos@gmail.com>
7 months ago
Dave Tucker b20b1f1b0a chore(xtask): Create bindings dir
If the bindings directory doesn't exist then create it.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
9 months ago
Billy McFall 62efed1853 chore(xtask): Add s390x and powerpc64 to codegen
This commit adds the s390x and powerpc architectures
to codegen. This will enable an upcoming PR to add
support for aya to support theses architectures
in both aya and aya-ebpf.

Co-authored-by: Dave Tucker <dave@dtucker.co.uk>
Signed-off-by: Billy McFall <22157057+Billy99@users.noreply.github.com>
9 months ago
tyrone-wu b23973dd9c xtask: corrected bpf to ebpf for path to aya-ebpf-bindings in codegen
Currently, when running `cargo +nightly xtask codegen` locally and in
the codegen GHA workflow, an error occurs with only "Error: bindgen
failed" displayed.

This was due to a path using "bpf/..." instead of "ebpf/...". It is now
corrected to "ebpf", and bindgen fails should now display a more direct
message on why it failed.

Fixes: #914
12 months ago
Dave Tucker 41c61560ea chore(aya-ebpf): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
Dave Tucker 70ac91dc1e chore(aya-ebpf-bindings): Rename bpf -> ebpf
Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago