Skip to content

Commit

Permalink
Rename method
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaelroquetto committed Nov 18, 2024
1 parent 53b09fd commit fdde52c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/internal/ebpf/tracer_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func roundToNearestMultiple(x, n uint32) uint32 {
}

// RingBuf map types must be a multiple of os.Getpagesize()
func setupRingBufMaxEntries(m *ebpf.MapSpec) {
func adjustRingBufMaxEntries(m *ebpf.MapSpec) {
if m.Type == ebpf.RingBuf {
m.MaxEntries = roundToNearestMultiple(m.MaxEntries, uint32(os.Getpagesize()))
}
Expand All @@ -58,7 +58,7 @@ func resolveMaps(spec *ebpf.CollectionSpec) (*ebpf.CollectionOptions, error) {
defer internalMapsMux.Unlock()

for k, v := range spec.Maps {
setupRingBufMaxEntries(v)
adjustRingBufMaxEntries(v)

if v.Pinning != PinInternal {
continue
Expand Down

0 comments on commit fdde52c

Please sign in to comment.