diff options
| author | Paul Buetow <paul@buetow.org> | 2026-05-13 09:52:04 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-05-13 09:52:04 +0300 |
| commit | 83d68e56213c5107a4e24aceff61439c4e6644f4 (patch) | |
| tree | c47a73f3fd3d3a1089f77e00934bcdb45168965c /internal/ior_bpfsetup.go | |
| parent | 66956756ba018ed32a455aa57f04517af2c7357f (diff) | |
Revert "fix: surface rb.Poll errors instead of silently dropping them"
This reverts commit 66956756ba018ed32a455aa57f04517af2c7357f.
Diffstat (limited to 'internal/ior_bpfsetup.go')
| -rw-r--r-- | internal/ior_bpfsetup.go | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/internal/ior_bpfsetup.go b/internal/ior_bpfsetup.go index 7575700..885d321 100644 --- a/internal/ior_bpfsetup.go +++ b/internal/ior_bpfsetup.go @@ -88,23 +88,13 @@ func setupBPFModule(parentCtx context.Context, cfg flags.Config) (*bpf.Module, * } // setupEventChannel initialises the BPF ring-buffer and returns the event channel. -// It starts polling the ring buffer and logs any fatal poll error to stderr so -// that a background ring-buffer failure does not go completely unnoticed. func setupEventChannel(bpfModule *bpf.Module) (chan []byte, error) { ch := make(chan []byte, appconfig.DefaultChannelBufferSize) rb, err := bpfModule.InitRingBuf("event_map", ch) if err != nil { return nil, err } - // Poll returns a channel that receives any fatal error from the background - // polling goroutine. Monitor it in a goroutine so the error is logged and - // does not silently drop events. - pollErrCh := rb.Poll(300) - go func() { - if err := <-pollErrCh; err != nil { - fmt.Fprintf(os.Stderr, "ior: ring buffer poll failed: %v\n", err) - } - }() + rb.Poll(300) return ch, nil } |
