dpdk: recognize net_pcap driver and stop after no packets are rx_bursted#81
Draft
dpdk: recognize net_pcap driver and stop after no packets are rx_bursted#81
Conversation
Co-authored-by: lukashino <10761421+lukashino@users.noreply.github.com>
Co-authored-by: lukashino <10761421+lukashino@users.noreply.github.com>
… flow Co-authored-by: lukashino <10761421+lukashino@users.noreply.github.com>
Co-authored-by: lukashino <10761421+lukashino@users.noreply.github.com>
Co-authored-by: lukashino <10761421+lukashino@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement net_pcap driver recognition and termination on no packets
dpdk: recognize net_pcap driver and stop after no packets are rx_bursted
Jan 28, 2026
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
DPDK with
net_pcapdriver remained stuck in RX loop after PCAP file exhaustion, requiring timeout workarounds. This implements automatic EOF detection and graceful per-interface shutdown.Implementation
Driver Detection
dev_info->driver_nameduring config loadnet_pcap, configurable viapcap-file-mode: true/falseEOF Detection
pcap_file_mode_zero_poll_count)rte_eth_rx_burst()calls returning 0 packetsRXPacketCountHeuristic()to return -1 on EOF, triggering clean loop exitPer-Interface Behavior
Configuration
Files Changed
Core (56 lines):
src/source-dpdk.{h,c}- EOF detection in receive loopsrc/runmode-dpdk.{h,c}- Config parsing and driver detectionDocumentation (612 lines):
doc/userguide/capture-hardware/dpdk.rst- User-facing PCAP file mode sectiondoc/dpdk-pcap-{implementation,test-cases}.md- Technical details and test proceduresTest Configs (163 lines):
.github/workflows/dpdk/suricata-pcap-single.yaml.github/workflows/dpdk/suricata-pcap-multiple.yaml.github/workflows/dpdk/suricata-pcap-mixed.yamlNotes
pcap-file-mode: false✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.