-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
dpdk: add initial unittests for DPDK codebase v6 #12083
base: master
Are you sure you want to change the base?
Conversation
To better control the values within the variables and to prepare for the follow-up unit tests, the variable was moved into global scope and should accessed only by functions. This allows reinstantination of the variable value - needed for unit tests.
The function would incorrectly perform XOR operation. While it worked when the worker cores were occupying all cores, it is still not correct operation. The example might be when a core would be affined to only management and not worker threads. With the XOR operation it would set affinity to also worker set. (1 XOR 0 -> 1 where in fact the desired outcome is 0)
For the upcoming changes, skipping a unit test might be beneficial when testing a function that retrieves hardware data. This can e.g. depend on the number of CPU cores and systems that does not meet the required test criteria will need to omit the tests. The tests should always target minimal system requirements
… requirements of tests
…gnment Ticket: 6927
DPDK Bonding API has been changed in DPDK version 23.11 where the old *slave* API was marked as deprecated and the new *member* API was marked as experimental. This was unfortunately executed by marking both API variants at the same time. The deprecated version is removed from the follow up versions while the experimental version will become stable in the next DPDK releases. This is based on a policy in DPDK where an API change needs to merged in main for 1 stable release before removing the experimental flag. The patch request to do is ACKed: https://patches.dpdk.org/project/dpdk/patch/20241029204416.392274-1-sismis@cesnet.cz/
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #12083 +/- ##
==========================================
+ Coverage 83.37% 83.39% +0.01%
==========================================
Files 910 910
Lines 257556 257852 +296
==========================================
+ Hits 214748 215045 +297
+ Misses 42808 42807 -1
Flags with carried forward coverage won't be shown. Click here to find out more. |
Information: QA ran without warnings. Pipeline 23245 |
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.
see inline comments
@@ -52,7 +52,10 @@ uint16_t BondingMemberDevicesGet( | |||
{ | |||
#ifdef HAVE_DPDK_BOND | |||
#if RTE_VERSION >= RTE_VERSION_NUM(23, 11, 0, 0) | |||
#pragma GCC diagnostic push |
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.
git message should reference https://redmine.openinfosecfoundation.org/issues/7009
* \brief Verify that the CPU requirement is met | ||
* \retval 0 if the requirement is met, 2 if the test is skipped, negative number otherwise | ||
*/ | ||
int UnitTestsUtilAffinityVerifyCPURequirement(void) |
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.
this seems very much dpdk test specific, should it go into runmode-dpdk.c as a static helper func?
@@ -786,6 +786,7 @@ jobs: | |||
ccache \ | |||
clang \ | |||
diffutils \ | |||
dpdk-devel \ |
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.
commit does 2 related but different things:
- expand CI dpdk coverage
- add tests
Feel this should be split.
.github/workflows/builds.yml
Outdated
@@ -2530,7 +2530,7 @@ jobs: | |||
needs: [ prepare-deps, prepare-cbindgen ] | |||
strategy: | |||
matrix: | |||
dpdk_version: [ 22.11.4, 21.11.6, 20.11.10, 19.11.14 ] | |||
dpdk_version: [ 23.11.2, 22.11.4, 21.11.6, 20.11.10, 19.11.14 ] |
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.
git message should reference https://redmine.openinfosecfoundation.org/issues/6382 (please check other commits for missing ticket references too)
Redmine ticket: https://redmine.openinfosecfoundation.org/issues/6927
Follow-up of: #12081
Describe changes:
v6:
v5:
v4
v3
v2
v1