Skip to content
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

Refactor reentrant flag to be set during channel creation. #1738

Draft
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

Dimi1010
Copy link
Collaborator

Split of #1668

This PR aims to standardize m_ReentrantMode to be set during the channel opening phase instead of the capture initialization phase as it is determined by the opening flags. The currently used implementation essentially assumes the what the reentrant mode is based on the function being called to start the capture, instead of recording the correct value.

…nnelImpl` to remove ambiguity between public and private calls.
… of when starting capture as it is determined by the PF_RING_REENTRANT flag.

- Added ability to choose if `openSingleChannelImpl` will open w/reenterant flag.
int res = openSingleRxChannel(ringName.c_str(), &m_PfRingDescriptors[i]);
// todo: Shouldn't we use the reentrant mode here? We are opening multiple channels?
// todo: Potentially only open in reenterant mode if creating N > 1 channels?
int res = openSingleRxChannelImpl(ringName.c_str(), &m_PfRingDescriptors[i]);
Copy link
Collaborator Author

@Dimi1010 Dimi1010 Mar 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@seladb Can you please check this code?

Why is the implementation opening multiple Rx channels in non-reentrant mode here, when the other multiple channel function opens them in reentrant mode?

Copy link

codecov bot commented Mar 23, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.20%. Comparing base (614ea49) to head (cc59707).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #1738      +/-   ##
==========================================
- Coverage   83.21%   83.20%   -0.01%     
==========================================
  Files         282      282              
  Lines       48732    48732              
  Branches    10354    10552     +198     
==========================================
- Hits        40550    40548       -2     
- Misses       7052     7056       +4     
+ Partials     1130     1128       -2     
Flag Coverage Δ
alpine320 75.19% <ø> (ø)
fedora40 75.24% <ø> (ø)
macos-13 80.71% <ø> (-0.01%) ⬇️
macos-14 80.71% <ø> (ø)
macos-15 80.68% <ø> (ø)
mingw32 70.75% <ø> (-0.13%) ⬇️
mingw64 70.80% <ø> (-0.04%) ⬇️
npcap 85.29% <ø> (-0.03%) ⬇️
rhel94 75.09% <ø> (-0.01%) ⬇️
ubuntu2004 58.61% <ø> (ø)
ubuntu2004-zstd 58.73% <ø> (+<0.01%) ⬆️
ubuntu2204 74.98% <ø> (ø)
ubuntu2204-icpx 61.36% <ø> (ø)
ubuntu2404 75.23% <ø> (+<0.01%) ⬆️
unittest 83.20% <ø> (-0.01%) ⬇️
windows-2019 85.32% <ø> (-0.01%) ⬇️
windows-2022 85.35% <ø> (-0.01%) ⬇️
winpcap 85.32% <ø> (ø)
xdp 50.67% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant