Skip to content

Commit

Permalink
print ebpf verifier detail log.
Browse files Browse the repository at this point in the history
Signed-off-by: cfc4n <cfc4n.cs@gmail.com>
  • Loading branch information
cfc4n committed Aug 11, 2024
1 parent 1152532 commit 67fa810
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1367,8 +1367,12 @@ func (m *Manager) loadCollection() error {
var err error
// Load collection
m.collection, err = ebpf.NewCollectionWithOptions(m.collectionSpec, m.options.VerifierOptions)
var ve *ebpf.VerifierError
if err != nil {
return fmt.Errorf("error:%w , couldn't load eBPF programs, cs:%v", err, m.collectionSpec)
if errors.As(err, &ve) {
return fmt.Errorf("verifier error:%+v , couldn't load eBPF programs, cs:%v", ve, m.collectionSpec)
}
return fmt.Errorf("error:%v , couldn't load eBPF programs, cs:%v", err, m.collectionSpec)
}

// Initialize Maps
Expand Down

0 comments on commit 67fa810

Please sign in to comment.