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

[ebpfless] Implement connection duration and fix IsOpen #31763

Merged
merged 1 commit into from
Dec 5, 2024

Conversation

pimlu
Copy link
Contributor

@pimlu pimlu commented Dec 4, 2024

What does this PR do?

This PR adds bookkeeping for connection duration and IsOpen to the ebpfless TCP processor.

Motivation

Want the whole test suite to pass, goal is to have the test suite in a good state for KMT

Describe how you validated your changes

To run the test this fixes:

DD_REMOTE_CONFIGURATION_ENABLED=false TEST_EBPFLESS_OVERRIDE=true sudo -E go test -tags=linux,linux_bpf,npm,process,test ./pkg/network/tracer -v --run TestTracerSuite/eBPFless -run TestTracerSuite/eBPFless/TestConnectionDuration

To run the TCP processor unit test suite:

go test -tags=linux,linux_bpf,npm,process,test ./pkg/network/tracer/connection/ebpfless

To run just the unit test added by this PR:

go test -tags=linux,linux_bpf,npm,process,test ./pkg/network/tracer/connection/ebpfless -run TestOpenCloseConn

Possible Drawbacks / Trade-offs

We have multiple sources of timestamps in the ebpfless tracer:

  • time.Now() (used by Duration)
  • ddebpf.NowNanoseconds() (used by conn.LastUpdateEpoch and RTT)
  • time.Time parameter from VisitPackets (currently unused, but available)
    In a future PR, we might want to switch to a single source of truth for this.

Additional Notes

@github-actions github-actions bot added component/system-probe short review PR is simple enough to be reviewed quickly team/networks labels Dec 4, 2024
@pimlu pimlu added changelog/no-changelog qa/done QA done before merge and regressions are covered by tests labels Dec 4, 2024
@pimlu pimlu modified the milestones: 7.61.0, 7.62.0 Dec 4, 2024
@pimlu pimlu marked this pull request as ready for review December 4, 2024 18:08
@pimlu pimlu requested a review from a team as a code owner December 4, 2024 18:08
@pimlu pimlu requested a review from AyyLam December 4, 2024 18:08
@agent-platform-auto-pr
Copy link
Contributor

Test changes on VM

Use this command from test-infra-definitions to manually test this PR changes on a VM:

inv aws.create-vm --pipeline-id=50348933 --os-family=ubuntu

Note: This applies to commit 1cc5caa

@pimlu
Copy link
Contributor Author

pimlu commented Dec 5, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 5, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-05 16:10:56 UTC ℹ️ MergeQueue: waiting for PR to be ready

This merge request is not mergeable yet, because of pending checks/missing approvals. It will be added to the queue as soon as checks pass and/or get approvals.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2024-12-05 20:10:51 UTC ⚠️ MergeQueue: This merge request was unqueued

This merge request was unqueued

@pimlu
Copy link
Contributor Author

pimlu commented Dec 5, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Dec 5, 2024

Devflow running: /merge

View all feedbacks in Devflow UI.


2024-12-05 20:46:19 UTC ℹ️ MergeQueue: pull request added to the queue

The median merge time in main is 23m.

@dd-mergequeue dd-mergequeue bot merged commit 435a6e3 into main Dec 5, 2024
315 of 317 checks passed
@dd-mergequeue dd-mergequeue bot deleted the stuart.geipel/ebpfless-duration branch December 5, 2024 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog/no-changelog component/system-probe qa/done QA done before merge and regressions are covered by tests short review PR is simple enough to be reviewed quickly team/networks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants