aya-obj v0.1.0
New Features
- Rename Bpf to Ebpf
And BpfLoader to EbpfLoader.
This also adds type aliases to preserve the use of the old names, making
updating to a new Aya release less of a burden. These aliases are marked
as deprecated since we'll likely remove them in a later release.
Other
-
revamp MapInfo be more friendly with older kernels
Adds detection for whether a field is available inMapInfo
:- For
map_type()
, we treturn new enumMapType
instead of the integer
representation. - For fields that can't be zero, we return
Option<NonZero*>
type. - For
name_as_str()
, it now uses the feature probebpf_name()
to
detect if field is available.
Although the feature probe checks for program name, it can also be
used for map name since they were both introduced in the same commit.
- For
-
revamp ProgramInfo be more friendly with older kernels
Purpose of this commit is to add detections for whether a field is
available inProgramInfo
.- For
program_type()
, we return the new enumProgramType
instead of
the integer representation. - For fields that we know cannot be zero, we return
Option<NonZero*>
type. - For
name_as_str()
, it now also uses the feature probebpf_name()
to detect if field is available or not. - Two additional feature probes are added for the fields:
prog_info_map_ids()
probe ->map_ids()
fieldprog_info_gpl_compatible()
probe ->gpl_compatible()
field
With the
prog_info_map_ids()
probe, the previous implementation that
I had forbpf_prog_get_info_by_fd()
is shortened to use the probe
instead of having to make 2 potential syscalls.The
test_loaded_at()
test is also moved into info tests since it is
better related to the info tests. - For
-
add conversion u32 to enum type for prog, link, & attach type
Add conversion from u32 to program type, link type, and attach type.
Additionally, remove duplicate match statement for u32 conversion to
BPF_MAP_TYPE_BLOOM_FILTER
&BPF_MAP_TYPE_CGRP_STORAGE
.New error
InvalidTypeBinding<T>
is created to represent when a
parsed/received value binding to a type is invalid.
This is used in the new conversions added here, and also replaces
InvalidMapTypeError
inTryFrom
forbpf_map_type
. -
add archs powerpc64 and s390x to aya
bpfman, a project using aya, has a requirement to support powerpc64 and
s390x architectures. Adding these two architectures to aya. -
Generate new bindings
Test
- adjust test to not use byte arrays
Where possible, replace the hardcoded byte arrays in the tests with the
structs they represent, then convert the structs to byte arrays. - adjust test byte arrays for big endian
Adding support for s390x (big endian architecture) and found that some
of the unit tests have structures and files implemented as byte arrays.
They are all coded as little endian and need a bug endian version to
work properly.
New Features (BREAKING)
- Rename BpfRelocationError -> EbpfRelocationError
- Rename BpfSectionKind to EbpfSectionKind
Commit Statistics
- 19 commits contributed to the release.
- 223 days passed between releases.
- 10 commits were understood as conventional.
- 0 issues like '(#ID)' were seen in commit messages
Commit Details
view details
- Uncategorized
- Appease clippy (
aa240ba
) - Merge pull request #1007 from tyrone-wu/aya/info-api (
15eb935
) - Revamp MapInfo be more friendly with older kernels (
fbb0930
) - Revamp ProgramInfo be more friendly with older kernels (
88f5ac3
) - Add conversion u32 to enum type for prog, link, & attach type (
1634fa7
) - Merge pull request #974 from Billy99/billy99-arch-ppc64-s390x (
ab5e688
) - Adjust test to not use byte arrays (
4dc4b5c
) - Add archs powerpc64 and s390x to aya (
b513af1
) - Adjust test byte arrays for big endian (
eef7346
) - Merge pull request #989 from aya-rs/codegen (
8015e10
) - [codegen] Update libbpf to 686f600bca59e107af4040d0838ca2b02c14ff50 (
8d7446e
) - Merge pull request #978 from aya-rs/codegen (
06aa5c8
) - [codegen] Update libbpf to c1a6c770c46c6e78ad6755bf596c23a4e6f6b216 (
8b50a6a
) - Document miri skip reasons (
35962a4
) - Generate new bindings (
b06ff40
) - Merge pull request #528 from dave-tucker/rename-all-the-things (
63d8d4d
) - Rename Bpf to Ebpf (
8c79b71
) - Rename BpfRelocationError -> EbpfRelocationError (
fd48c55
) - Rename BpfSectionKind to EbpfSectionKind (
cf3e2ca
)
- Appease clippy (