PcapPlusPlus icon indicating copy to clipboard operation
PcapPlusPlus copied to clipboard

Specify queue id as a configuration parameter

Open JasMetzger opened this issue 5 months ago • 6 comments

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.

JasMetzger avatar Oct 27 '25 20:10 JasMetzger

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.

codecov[bot] avatar Oct 27 '25 20:10 codecov[bot]

@JasMetzger, please notice that clang-format fails in CI

seladb avatar Nov 06 '25 06:11 seladb

Sorry for the delay--- I was out of town. Where is this test failing?

JasMetzger avatar Nov 09 '25 15:11 JasMetzger

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

seladb avatar Nov 09 '25 21:11 seladb

When I run the pre-commit, there are errors in files that I did not modify. Shall I address those?

JasMetzger avatar Nov 10 '25 10:11 JasMetzger

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

seladb avatar Nov 13 '25 08:11 seladb

@JasMetzger should we move this PR to DRAFT until it's ready for review? The CI is currently failing...

seladb avatar Dec 07 '25 07:12 seladb

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.

JasMetzger avatar Dec 07 '25 09:12 JasMetzger