bpf: runtime config for KERNEL_HZ and ENABLE_JIFFIES#43112
Conversation
328db49 to
7931b7f
Compare
|
/test |
1 similar comment
|
/test |
ab68b88 to
c0f3ae4
Compare
|
/test |
4288917 to
8276cb4
Compare
|
/test |
ti-mo
left a comment
There was a problem hiding this comment.
Thanks for taking this on! I've left some comments for small potential improvements to our time API.
8276cb4 to
c7b9151
Compare
|
/test |
c7b9151 to
e247d92
Compare
|
/test |
1 similar comment
|
/test |
|
Hi @viktor-kurchenko, should probably go directly to NODE_CONFIG in this commit |
Hi @harsimran-pabla, do you mean to squash the following commits: |
Yes that's right. |
ce822d1 to
cfe1571
Compare
|
/test |
Done! |
ti-mo
left a comment
There was a problem hiding this comment.
Thanks, this cleans up the API nicely! Left a few comments.
cfe1571 to
fa32443
Compare
|
/test |
2f8dc9b to
0232d9e
Compare
|
/test |
|
@viktor-kurchenko Looks like I introduced a merge conflict, would you be able to rebase? Please squash this down to 2 commits, one being the config migration and the other the header cleanups. |
We have just a few time-helper macros that are spread across time and mono headers. The commit moves all macros from the mono header into the time header and removes the mono header. The motivation here is to keep all time helper code in a single header file. The `ENABLE_JIFFIES` and `KERNEL_HZ` have been migrated to runtime configuration. The helper time macros were converted into regular C functions to be able to use read `enable_jiffies` and `kernel_hz` runtime properties using `CONFIG` macro. The `ktime_get_ns` and `jiffies` (translates to `jiffies64`) macros are overwritten into conntrack_test. To make it work properly, they must be defined before the time header getd included, otherwise preprocessor statements can be out of order. Also, dead code removed. Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
The `jiffies` macro is used only in a single place in the time header. Let's remove it and use the `jiffies64` function as is. Also, `kernel_hz` sentinel value: 1 removed. This should be fine now because `kernel_hz` property has been migrated to runtime configuration and `division by zero` error can be caught at compile time. Signed-off-by: viktor-kurchenko <viktor.kurchenko@isovalent.com>
0232d9e to
679a228
Compare
|
/test |
Done! |
Please see description per commit.
Related to: #38370