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

zephyr-dom0-xt: Add vchan simple echo server #30

Merged
merged 1 commit into from
Jul 22, 2024

Conversation

dsemenets
Copy link

Add vchan simple echo server. Server opens channel and all incoming data will be send back.

Kconfig Outdated Show resolved Hide resolved
src/vchan_cmds.c Show resolved Hide resolved
Kconfig Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
src/vchan_cmds.c Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
src/vchan_cmds.c Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
@dsemenets dsemenets force-pushed the echo_srv branch 2 times, most recently from 36de73a to 02889cb Compare June 19, 2024 10:32
@dsemenets
Copy link
Author

Fixed comments

@GrygiriiS
Copy link

There should readme update with full example as from dom0 side as from doimu side

@dsemenets
Copy link
Author

Updated README.rst

Copy link

@GrygiriiS GrygiriiS left a comment

Choose a reason for hiding this comment

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

Thank you . I have few minor comments.

src/vchan_cmds.c Outdated Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
src/vchan_cmds.c Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
README.rst Outdated Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
@GrygiriiS
Copy link

Reviewed-by: Grygorii Strashko <[email protected]>

src/vchan_cmds.c Outdated Show resolved Hide resolved
src/vchan_cmds.c Outdated Show resolved Hide resolved
vchan_server_stop = 1;
if (k_thread_join(pecho_thread, K_MSEC(1000))) {
shell_error(sh, "Killing thread");
k_thread_abort(pecho_thread);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could you please confirm that functions used in peacho_thread does not use dynamic allocation? Otherwise, we will get resource leak here.

Copy link
Author

@dsemenets dsemenets Jun 21, 2024

Choose a reason for hiding this comment

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

pecho_thread is pointer to echo_thread static structure or NULL (line 74)

README.rst Show resolved Hide resolved
@dsemenets dsemenets force-pushed the echo_srv branch 2 times, most recently from 2a0234d to 1c4c046 Compare June 21, 2024 16:32
@oleksiimoisieiev
Copy link

LGTM Acked-by: Oleksii Moisieiev <[email protected]>

@dsemenets dsemenets force-pushed the echo_srv branch 2 times, most recently from 3d8638d to 4b63643 Compare July 1, 2024 11:05
@dsemenets
Copy link
Author

Rebased to main

Copy link
Collaborator

@lorc lorc left a comment

Choose a reason for hiding this comment

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

LGTM

Acked-by: Volodymyr Babchuk <[email protected]>

Copy link
Collaborator

@firscity firscity left a comment

Choose a reason for hiding this comment

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

Acked-by: Dmytro Firsov <[email protected]>

Also, @klogg can you please re-check?

@klogg
Copy link

klogg commented Jul 22, 2024

Reviewed-by: Artem Mygaiev <[email protected]>

Add vchan simple echo server. Server opens channel and all incoming
data will be send back. Server will be enabled with option
CONFIG_VCHAN_SHELL_CMDS. Server introduces 2 commands:
    vchan start [domid]
      Start echo server. domid - The peer domain that will be connecting
      (0 by default)
    vchan stop
      Stop server
Updated README.rst with information about vchan echo server

Signed-off-by: Dmytro Semenets <[email protected]>
Reviewed-by: Grygorii Strashko <[email protected]>
Acked-by: Oleksii Moisieiev <[email protected]>
Acked-by: Volodymyr Babchuk <[email protected]>
Acked-by: Dmytro Firsov <[email protected]>
Reviewed-by: Artem Mygaiev <[email protected]>
@firscity firscity merged commit 706075f into xen-troops:rpi5_dom0_dev Jul 22, 2024
@dsemenets dsemenets deleted the echo_srv branch July 22, 2024 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants