sys/random/fortuna: change interval ressed to ms#16594
sys/random/fortuna: change interval ressed to ms#16594leandrolanzieri merged 2 commits intoRIOT-OS:masterfrom
Conversation
|
Though I doubt a 100ms reseed interval is reasonable for us (not a decision of this PR), moving to a ms resolution is fine. The new variable name Side note: Moving the order in |
63b8496 to
53a344d
Compare
@PeterKietzmann renamed the variable as suggested, the xtimer/ztimer change was merged a while ago, so unrelated to this PR now. |
|
@leandrolanzieri might be able to take a look as well? |
|
I think I've addressed your changes @leandrolanzieri! |
| CONFIG_MODULE_EMBUNIT=y | ||
| CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=y | ||
| CONFIG_MODULE_XTIMER=y |
There was a problem hiding this comment.
| CONFIG_MODULE_EMBUNIT=y | |
| CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=y | |
| CONFIG_MODULE_XTIMER=y | |
| CONFIG_MODULE_ATOMIC_UTILS=y | |
| CONFIG_MODULE_TEST_UTILS_INTERACTIVE_SYNC=y | |
| CONFIG_MODULE_XTIMER=y |
There was a problem hiding this comment.
I think this change got lost
|
@leandrolanzieri murdock is green, OK to squash? |
0c4c80f to
7c215d2
Compare
sys/random/fortuna/fortuna.h
Outdated
| #ifndef FORTUNA_RESEED_INTERVAL | ||
| #define FORTUNA_RESEED_INTERVAL (0) | ||
| #ifndef FORTUNA_RESEED_INTERVAL_MS | ||
| #define FORTUNA_RESEED_INTERVAL_MS 0 |
There was a problem hiding this comment.
Now that we have the pseudomodule as the extra switch for this feature, I'd say let's set the recommended value of 100 ms as default.
There was a problem hiding this comment.
Hmm seems I bodged the rebase
|
Addressed changes redid the testing procedur: |
leandrolanzieri
left a comment
There was a problem hiding this comment.
Changes look good, @fjmolinas provided test results. ACK!
Please squash @fjmolinas
5412d46 to
c14313d
Compare
c14313d to
f4db917
Compare
|
Hmm I bodged the rebase |
Use a timer to required a reseed, enable use of plain ztimer (no now64)
f4db917 to
c307cad
Compare
|
Should be back on track |
|
All green finally :) |
Then let's go! |
Contribution description
fortunasuggests a 100ms reseed interval, therefore msec resolution should be enough for the reseed value which. This PR also uses a timer to set a flag when a reseed is necessary this allows usingztimerwithout the need of includingnow64and ticks an item off #13667.To do that I realized that Fortuna is actually relying on an xtimer call before the module is initialized, therefore I had to move timer initialization up, I'll split this part out.
Testing procedure
I applied the following patch:
make -C examples/hello-world/ all termIssues/PRs references
Ticks an item in #13667