Conversation
- Add SystemCore::getShortCoreMask() to generate the old 32-bit CoreMask, if the CoreId < 32. - Deprecate SystemCore::Mask field, to be replaced by getShortCoreMask(). Reason for this is that SystemCores > 32 can't have short masks. - Add overload to createCoreVectorFromCoreMask that uses return value instead of out param.
…moving Mask field.
…ying on predefinied IdToSystemCore.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev #2197 +/- ##
==========================================
+ Coverage 79.79% 84.11% +4.32%
==========================================
Files 332 319 -13
Lines 54066 58512 +4446
Branches 12864 12420 -444
==========================================
+ Hits 43140 49217 +6077
+ Misses 8887 8076 -811
+ Partials 2039 1219 -820
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
- Support for equality operators ==, != on pairs: - LongCoreMask and LongCoreMask - LongCoreMask and SystemCore - LongCoreMask and CoreMask - Support for bitwise operators AND, OR, XOR on pairs: - LongCoreMask and LongCoreMask - LongCoreMask and SystemCore - LongCoreMask and CoreMask
Fixes false positive error.
Dimi1010
commented
Jul 30, 2026
Collaborator
Author
There was a problem hiding this comment.
Bumped cppcheck version to 2.21.0 due to false positive during the pre-commit checks:
https://github.com/seladb/PcapPlusPlus/actions/runs/30527830962/job/90822810175#step:6:90
Also, updated the GH repository URL, since it has been moved.
This reverts commit c47cdc9.
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.
Summary
Adds infrastructure for extended core mask that allows addressing up to 256 machine cores.
Part of #1717
Proposal
Current server grade processors frequently exceed 32 cores. The current core mask implementation cannot address these cores as it is limited to 32 bits. The PR proposes adding a new mask object
LongCoreMaskthat is based onstd::bitmaskinstead ofuint32_tthat can accommodate up to 256 machine cores. The maximum of 256 was chosen as it is the highest available count that would not require changingSystemCore::CoreIddata type fromuint8_ttouint16_t. Further expansion can happen in a future PR.Changes
LongCoreMaskto support larger machine core count.SystemCore::Maskhas been deprecated to disambiguate between the short and long core masks. The field would also be unsafe for system cores with IDs over 32, as they can't be represented. It has been replaced bySystemCore::getShortCoreMask()which dynamically computes the mask from the currentSystemCore::CoreId.createCoreVectorFromCoreMaskwhich uses return value instead of out parameter.createCoreMaskFromCoreVectorandcreateCoreMaskFromCoreIds. They will now throwstd::out_of_rangeexception if they encounterCoreId >= 32.@briefdid not have their documentation added as short documentation.Not planned in this PR
LongCoreMaskinPfRingDevice.LongCoreMaskinDpdkDevice.