Specify queue id as a configuration parameter
The queue id can be specified as an additional configuration parameter. It is checked against the maximum queues available by the device using a utility provided as a static function. In the open() function, the configured queue id is used in place of the hardwired zero value that was used before. Added a convenience function to obtain the queue id from device.
Community may consider renaming the XdpDevice to XdpSocketDevice as each instance of the XdpDevice class pertains to a single queue id / socket.
Codecov Report
:x: Patch coverage is 74.19355% with 8 lines in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 83.45%. Comparing base (a789e12) to head (16c0da9).
:warning: Report is 8 commits behind head on dev.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| Pcap++/src/XdpDevice.cpp | 72.41% | 5 Missing and 3 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## dev #2009 +/- ##
==========================================
- Coverage 83.46% 83.45% -0.01%
==========================================
Files 311 311
Lines 54556 54592 +36
Branches 11491 11822 +331
==========================================
+ Hits 45534 45562 +28
- Misses 7795 7815 +20
+ Partials 1227 1215 -12
| Flag | Coverage Δ | |
|---|---|---|
| alpine320 | 75.89% <ø> (-0.02%) |
:arrow_down: |
| fedora42 | 75.42% <ø> (-0.04%) |
:arrow_down: |
| macos-14 | 81.57% <ø> (-0.01%) |
:arrow_down: |
| macos-15 | 81.56% <ø> (-0.02%) |
:arrow_down: |
| mingw32 | 69.98% <ø> (-0.05%) |
:arrow_down: |
| mingw64 | 69.98% <ø> (+0.09%) |
:arrow_up: |
| npcap | ? |
|
| rhel94 | 75.48% <ø> (-0.01%) |
:arrow_down: |
| ubuntu2004 | 59.46% <ø> (-0.04%) |
:arrow_down: |
| ubuntu2004-zstd | 59.59% <ø> (+<0.01%) |
:arrow_up: |
| ubuntu2204 | 75.39% <ø> (-0.04%) |
:arrow_down: |
| ubuntu2204-icpx | 57.85% <ø> (+0.01%) |
:arrow_up: |
| ubuntu2404 | 75.51% <ø> (-0.01%) |
:arrow_down: |
| ubuntu2404-arm64 | 75.54% <ø> (-0.03%) |
:arrow_down: |
| unittest | 83.45% <74.19%> (-0.01%) |
:arrow_down: |
| windows-2022 | 85.42% <ø> (+0.16%) |
:arrow_up: |
| windows-2025 | 85.46% <ø> (+0.13%) |
:arrow_up: |
| winpcap | 85.46% <ø> (-0.07%) |
:arrow_down: |
| xdp | 53.01% <74.19%> (-0.01%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@JasMetzger, please notice that clang-format fails in CI
Sorry for the delay--- I was out of town. Where is this test failing?
Sorry for the delay--- I was out of town. Where is this test failing?
@JasMetzger you can see the pre-commit build that failed: https://github.com/seladb/PcapPlusPlus/actions/runs/19214326473/job/54921310413?pr=2009
There are trailing white-spaces and formatting issues. To fix formatting, you should run clang-format as mentioned in https://github.com/seladb/PcapPlusPlus/blob/master/CONTRIBUTING.md
When I run the pre-commit, there are errors in files that I did not modify. Shall I address those?
When I run the pre-commit, there are errors in files that I did not modify. Shall I address those?
@JasMetzger there shouldn't be errors in files you did not modify, please avoid updating them in this PR
@JasMetzger should we move this PR to DRAFT until it's ready for review? The CI is currently failing...
When I do a clean make, there are warnings in files I haven't touched, so not sure what to do about that code. The first warning is freebsd running bash but I don't understand how it is failing BSD or what it is doing. Do I need to create a FreeBSD environment? Is it compiling it? I think I need some help with the CI. I got it to pass clang.