v0.3.0-libbpf-0.8.0
·
240 commits
to main
since this release
This release of libbpfgo now provides official support for statically/dynamically linking libbpf v0.8.0!!!
Breaking Changes
ListProgramNames
API was removedGetUnsafePointer
helper was removed
New APIs
BPFMap.SetValueSize()
(calls libbpf bpf_map__set_value_size) #156BPFMap.GetValueReadInto()
(calls libbpf bpf_map__lookup_elem) #156- This enables the use per-cpu arrays, hashmaps, and storage!
BPFObjectIterator
! #166- Allows for iterating over each map and program in a BPF object
- Uses libbpf bpf_object__next_program and bpf_object__next_map
GetSectionName
(calls libbpf bpf_program__section_name) #166GetValueFlags()
/UpdateValueFlags()
#154- The enables passing a
MapFlag
argument to the bpf helper functionsbpf_map_update_elem
andbpf_map_lookup_elem_flags
- The enables passing a
BPFProg.AttachXDP()
(calls libbpf bpf_program__attach_xdp) #170BPFProg.GetSectionName()
(calls libbpf bpf_program_-section_name) #164BPFMapTypeIsSupported()
/BPFProgramTypeIsSupported()
#164SetStrictMode()
(calls libbpf_set_strict_mode) #160BPFLink.Pin()
/BPFLink.Unpin()
(calls libbpf bpf_link__pin/unpin) #144BPFProg.AttachGeneric()
(calls libbpf bpf_program__attach) #144- Allows for autodetection of bpf program and attach types! This is useful for tracing programs
BPFProg.SetAttachTarget()
/BPFProg.SetAttachType
/BPFProg.SetProgramType
#144
New Helpers
- You can now use a range of new helpers for parsing options passed to socket syscalls such as
setsockopt
andgetsockopt
#181 CreateMap()
(calls bpf_map_create) #138BPFMap.Name()
/BPFMap.Type
(calls libbpf bpf_map__name/bpf_map__type) #138BPFMap.SetType()
(calls libbpf bpf_map__set_type) #138
New Selftests/examples
- Fentry BPF_PROG_TYPE_TRACING sample #144
- Fentry set attach target selftest #144
- New tc selftest
- New XDP selftest
- Removed the faulty tcpconnect selftest
- VersionString selftest