Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

program: remove LogSize and VerifierError.Truncated #1526

Merged
merged 1 commit into from
Jul 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions internal/errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func ErrorWithLog(source string, err error, log []byte) *VerifierError {

log = bytes.Trim(log, whitespace)
if len(log) == 0 {
return &VerifierError{source, err, nil, false}
return &VerifierError{source, err, nil}
}

logLines := bytes.Split(log, []byte{'\n'})
Expand All @@ -34,7 +34,7 @@ func ErrorWithLog(source string, err error, log []byte) *VerifierError {
lines = append(lines, string(bytes.TrimRight(line, whitespace)))
}

return &VerifierError{source, err, lines, false}
return &VerifierError{source, err, lines}
}

// VerifierError includes information from the eBPF verifier.
Expand All @@ -46,8 +46,6 @@ type VerifierError struct {
Cause error
// The verifier output split into lines.
Log []string
// Deprecated: the log is never truncated anymore.
Truncated bool
}

func (le *VerifierError) Unwrap() error {
Expand Down
8 changes: 0 additions & 8 deletions prog.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,6 @@ const (
outputPad = 256 + 2
)

// Deprecated: the correct log size is now detected automatically and this
// constant is unused.
const DefaultVerifierLogSize = 64 * 1024

// minVerifierLogSize is the default number of bytes allocated for the
// verifier log.
const minVerifierLogSize = 64 * 1024
Expand All @@ -73,10 +69,6 @@ type ProgramOptions struct {
// attempt at loading the program.
LogLevel LogLevel

// Deprecated: the correct log buffer size is determined automatically
// and this field is ignored.
LogSize int

// Disables the verifier log completely, regardless of other options.
LogDisabled bool

Expand Down
Loading