-
Notifications
You must be signed in to change notification settings - Fork 25
Add benchmark framework #107
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
Conversation
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.
Pull Request Overview
This PR introduces a configurable, module‐based benchmarking framework for wolfHSM that supports a variety of cryptographic operations and configurations (including DMA support and SHE extensions). Key changes include the addition of high‐level benchmark drivers and modules, new configuration files to control benchmark parameters, and documentation updates in the benchmark README.
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| benchmark/wh_bench_data.h | Defines benchmark data buffers; contains duplicate macro definitions |
| benchmark/settings/user_settings.h | Contains configuration settings; minor spelling correction needed |
| benchmark/bench_modules/wh_bench_mod_echo.c | Implements the echo benchmark module with potential output formatting improvements |
| benchmark/others | New benchmark modules and corresponding Makefile configurations supporting various crypto operations |
Comments suppressed due to low confidence (2)
benchmark/settings/user_settings.h:81
- Typo in comment: 'unneded' should be corrected to 'unneeded'.
/* Remove unneded namespace */
benchmark/bench_modules/wh_bench_mod_echo.c:80
- [nitpick] Since the buffers may contain binary data that are not null-terminated, consider printing the output in hexadecimal format rather than as a string to avoid potential misinterpretation of non-printable characters.
WH_BENCH_PRINTF("Echo response mismatch! Expected: %.*s, Received: %.*s\n", send_len, send_buffer, recv_len, recv_buffer);
…id* to match custom case
WOLFHSM_CFG_BENCH_CUSTOM_PRINTF and remove from every module file
billphipps
left a comment
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.
Looks really good. A few notes and minor changes. I initially thought we'd be adding benchmarking to wolfHSM-examples, but I do think it should be in the main library. Consider adding a giant compile-time protection to all of the .c files (WH_CFG_HAVE_BENCH or something) to allow directory wildcard inclusion for IDE's.
|
@billphipps addressed most of your feedback and punted a few things. Please merge if you are okay with it. |
Adds a configurable module-based benchmarking framework to wolfHSM. Tested on POSIX and TC3xx.
Consists of:
Check out benchmark/README.md for more details and docs.
Future work:
WOLFHSM_CFG_NO_CRYPTO