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 in
MapInfo:- For
map_type(), we treturn new enumMapTypeinstead 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 in
ProgramInfo.- For
program_type(), we return the new enumProgramTypeinstead 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 replacesInvalidMapTypeErrorinTryFromforbpf_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 ()
- Appease clippy (