Skip to content
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

mgmt: hawkbit: autohandler and shell optimize #71037

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

maass-hamburg
Copy link
Collaborator

@maass-hamburg maass-hamburg commented Apr 3, 2024

also use the workqueue for the run of hawkBit, when requested via the shell. This way the run via the shell will use the same thread as the autohandler run. We also can eliminate redundant code.

This has mainly the benefit of not having to extend the stack size of the shell threads. Explicitly when having multiple shell instances, then the stack of every instance has to be bigger.

This is needed for #70787 as it moves the buffers from global to the stack.

include/zephyr/mgmt/hawkbit.h Outdated Show resolved Hide resolved
subsys/mgmt/hawkbit/hawkbit.c Outdated Show resolved Hide resolved
subsys/mgmt/hawkbit/shell.c Outdated Show resolved Hide resolved
@zephyrbot zephyrbot added the area: Samples Samples label Apr 10, 2024
@zephyrbot zephyrbot requested a review from nashif April 10, 2024 10:26
@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 4 times, most recently from 3a04bdf to d7fcf8c Compare April 10, 2024 11:06
subsys/mgmt/hawkbit/hawkbit.c Show resolved Hide resolved
subsys/mgmt/hawkbit/shell.c Show resolved Hide resolved
@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 2 times, most recently from 01155a7 to 12df207 Compare April 19, 2024 16:44
subsys/mgmt/hawkbit/hawkbit.c Show resolved Hide resolved
subsys/mgmt/hawkbit/shell.c Show resolved Hide resolved
include/zephyr/mgmt/hawkbit.h Outdated Show resolved Hide resolved
include/zephyr/mgmt/hawkbit.h Outdated Show resolved Hide resolved
include/zephyr/mgmt/hawkbit.h Outdated Show resolved Hide resolved
@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 2 times, most recently from f946939 to 0cba492 Compare April 29, 2024 08:19
@zephyrbot zephyrbot added the Release Notes To be mentioned in the release notes label Apr 29, 2024
@zephyrbot zephyrbot requested a review from aescolar April 29, 2024 08:19
@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 3 times, most recently from 9a6f7ec to 84783a7 Compare May 2, 2024 18:15
@maass-hamburg
Copy link
Collaborator Author

Rebased to resolve conflicts.

@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 2 times, most recently from e25718f to d3ed06d Compare May 7, 2024 06:08
Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok'ish for the release notes and migration guide.
Just a minor suggestion for improvement.
Though, if it were me, I would probably be less verbose and just list which new APIs have been added and rely on the link to their doxygen generated docs, instead of reexplaining it in the release notes.

doc/releases/release-notes-3.7.rst Outdated Show resolved Hide resolved
@maass-hamburg maass-hamburg force-pushed the hawkbit_shell_optimize branch 4 times, most recently from 83cfa48 to 5527168 Compare May 7, 2024 10:36
staticly init hawkbit_work_handle

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add option for autohandler to only run once.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Add hawkbit_autohandler_wait() to be able
to wait for the autohandler to finish.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Also use a workqueue, when execution of
hawkBit is requested via shell.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
If the run of the autohandler is started from shell,
it will be logged.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Be able to delay the next run of
the hawkbit autohandler.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
Mention change of hawkbit autohandler and shell in the
migration guide and the release notes.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
@maass-hamburg
Copy link
Collaborator Author

ping @ycsin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: hawkBit area: Samples Samples Release Notes To be mentioned in the release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants