-
Notifications
You must be signed in to change notification settings - Fork 683
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
Rework of PfRingDevice capture thread implementation. #1668
base: dev
Are you sure you want to change the base?
Conversation
- Completely rewrote the capture thread function to be a free function. - Added StopToken and StopTokenSource to encapsulate stop requests. - Refactored startCaptureSingleThread to use startCaptureMultiThread.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #1668 +/- ##
==========================================
+ Coverage 83.60% 83.62% +0.02%
==========================================
Files 273 276 +3
Lines 47555 47617 +62
Branches 9806 9734 -72
==========================================
+ Hits 39759 39822 +63
+ Misses 7177 6924 -253
- Partials 619 871 +252
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
I don't actually have a system that can run PF_RING. So it would be nice if someone could test it live. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suppose it can be split up. The main fix is the startup block struct. The rest like the StopToken was added as the whole |
I wouldn't add this much code just to make |
# Conflicts: # Pcap++/CMakeLists.txt
Opened #1679 which is a minimal viable fix. |
… methods. - Changed StartupBlock to class and made all fields private. - Added signalStart() and waitForSignal() methods to simplify interactions. - StartupBlock is now single-use object. Once the block has been signaled, it cannot be reset.
# Conflicts: # Pcap++/header/PfRingDevice.h # Pcap++/src/PfRingDevice.cpp
Fixes #1664.
StopToken
andStopTokenSource
that mirror C++20'sstop_token
andstop_source
.Many variables are now kept on the thread's stack instead of relying on member fields in
PfRingDevice
.