-
Notifications
You must be signed in to change notification settings - Fork 208
qat, initcontainer: add enablement of auto_reset #1852
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.
I'll propose a bit different structure:
- Change
check_config
to return true/false depending on the check result. - Drop
is_found
- Would remove some of the intermediate variables like AUTORESET_ENABLED_FOUND
- Write the sriov and auto_reset activations like:
check_config "ServicesEnabled" "$SERVICES_LIST" && sysfs_config && enable_sriov
check_config "AutoresetEnabled" "$AUTORESET_OPTIONS_LIST" && enable_auto_reset
- Separate "options check" into its own function
Those would make the code much more readable.
our target has been to eventually align with qatlib's |
@mythi Thanks!
Umm... would it be better to make totally independent script? Or another function in qat-init.sh? @tkatila Thank you for your comments
That was my first attempt, but unfortunately
Thanks. Let me consider if we can "go further" from the qatlib's script. I need to wait what Mikko says about the the script... |
the reason is we want to follow their work as much as possible and provide the exact same experience for users with and without k8s. |
So,, what do you think it's better? Just.. another function (but will be basically copy and paste of |
it could be a simple add-on, e.g., using |
b28f908
to
b830430
Compare
Then, I think it is even better to not make qat-init.sh be related to qat-autoreset.sh |
Idk if we would want to add more things in the future for the initcontainer part. If it happens, we may consider changing the name of |
d731ee4
to
c0fcaab
Compare
c594d38
to
be6c426
Compare
Is the origin this script: https://github.com/intel/qatlib/blob/main/quickassist/utilities/service/qat_init.sh.in ? |
The check_config function previously only considered the ServicesEnabled variable. Improve the logic of the function so that other variables can also be set through the qat.conf file. Signed-off-by: Hyeongju Johannes Lee <[email protected]>
be6c426
to
88c3685
Compare
@tkatila Yes! |
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.
Seems fine. I kinda dislike the script as it could be written in a more prettier way. But I understand why the style is as it is.
@tkatila Yeah... I have not liked the script either since I made a qat-initcontainer..! 😅 😅 |
Signed-off-by: Hyeongju Johannes Lee <[email protected]>
88c3685
to
51b7745
Compare
@mythi Could you merge this if it looks good to you? |
For some reason, the previous pr #1838 is closed.
I make another pr.