This repository was archived by the owner on Feb 9, 2026. It is now read-only.
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR implements a new feature to export flow statistics to pinned eBPF maps, while refactoring the packet capture support check and adding a dedicated flows reader.
- Refactored plain packet capture support check in pkg/packet/packet.go via a new function.
- Introduced a new flows package with flows reading functionality in pkg/flows/flows.go.
- Added new eBPF map definitions and updates in BPF files for both x86 and arm64, along with corresponding pinning logic in pkg/bpf/bpf.go.
Reviewed Changes
Copilot reviewed 10 out of 11 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| pkg/packet/packet.go | Refactored support check logic into a helper function. |
| pkg/flows/flows.go | Added a new flows reader with flow aggregation functionality. |
| pkg/bpf/tracer_bpfel_x86.go | Added new map definitions for flows stats and heap flow key. |
| pkg/bpf/tracer_bpfel_arm64.go | Synchronized changes for new flows maps with x86 implementation. |
| pkg/bpf/bpf.go | Updated pinning logic to include the new flows map. |
| internal/tai/tai.go | Introduced a helper function SetTimestamp for TAI timestamp handling. |
| bpf/packet_sniffer.c | Added flow key/value structs and updated the flows statistics tracking. |
Files not reviewed (1)
- go.mod: Language not supported
Codecov ReportAttention: Patch coverage is
❌ Your patch status has failed because the patch coverage (0.00%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## master #157 +/- ##
========================================
Coverage ? 0.00%
========================================
Files ? 54
Lines ? 5187
Branches ? 0
========================================
Hits ? 0
Misses ? 5187
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR implements a new feature to export flow statistics to pinned eBPF maps, while refactoring the packet capture support check and adding a dedicated flows reader.
Refactored plain packet capture support check in pkg/packet/packet.go via a new function.
Introduced a new flows package with flows reading functionality in pkg/flows/flows.go.
see also https://github.com/kubeshark/worker/pull/677