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

ebpf connection tracker: perf map fixes #2507

Merged
merged 2 commits into from
May 16, 2017
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
8 changes: 7 additions & 1 deletion probe/endpoint/ebpf.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ func newEbpfTracker() (eventTracker, error) {
return nil, fmt.Errorf("kernel not supported: %v", err)
}

t, err := tracer.NewTracer(tcpEventCbV4, tcpEventCbV6)
t, err := tracer.NewTracer(tcpEventCbV4, tcpEventCbV6, lostCb)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -119,6 +119,12 @@ func tcpEventCbV6(e tracer.TcpV6) {
// TODO: IPv6 not supported in Scope
}

func lostCb(count uint64) {
log.Errorf("tcp tracer lost %d events. Stopping the eBPF tracker", count)
ebpfTracker.dead = true
ebpfTracker.stop()
}

func (t *EbpfTracker) handleConnection(ev tracer.EventType, tuple fourTuple, pid int, networkNamespace string) {
t.Lock()
defer t.Unlock()
Expand Down
38 changes: 30 additions & 8 deletions vendor/github.com/iovisor/gobpf/elf/elf.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 6 additions & 5 deletions vendor/github.com/iovisor/gobpf/elf/elf_unsupported.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

35 changes: 20 additions & 15 deletions vendor/github.com/iovisor/gobpf/elf/perf.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions vendor/github.com/iovisor/gobpf/elf/table.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading