Opt-in per-packet capture-leg (source_idx) on Packet events for full leg fidelity #121
Labels
No labels
blocks-others
breaking
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
license: clean
license: foxio
needs-fuzz
priority: P0
priority: P1
priority: P2
question
roadmap
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
marcpardo/flowscope#121
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Part of the tap-merge three-axis epic. Phase 3 — optional, audit-grade
fidelity. Independent of the core #71 fix.
Why
Phase 2 folds the capture leg to a per-direction binding on
FlowStats— correct and cheap for a correctly-wired tap (one NIC per canonical
orientation). But some use cases need per-packet leg attribution:
(asymmetric routing, mis-wiring, LACP hashing surprises).
For these, a per-direction summary isn't enough — you need the leg on
each
Packetevent.Proposed change (opt-in)
Add an opt-in per-packet
source_idx(orcapture_leg: Option<u32>)to
Event::Packet/FlowEvent::Packet, populated fromview.rx_metadata.source_idx, gated behind a builder/config knob(mirroring how
Event::Packet.tcpis opt-in viaDriverBuilder::emit_packet_detailstoday —src/driver/typed.rs).Default off so the hot path and the common merged-mode consumer pay
nothing.
#[non_exhaustive]Packet variants introduced by thePhase-1 fix, so this is an additive field add at that point.
binding (Phase 2) is the mainstream answer.
Acceptance criteria
there is zero added hot-path cost.
Packetevent carries the originatingsource_idx.per-packet leg sequence.
Dependencies
#[non_exhaustive]Packet variants) so the field addis additive.
References
(https://pcapng.com/), gopacket
CaptureInfo.InterfaceIndex,AF_PACKET
sll_ifindex, PF_RINGif_index.plans/issue-71-tap-merge-orientation.md(§4 option 2, §5 Phase 3)