Page MenuHomeFreeBSD

bhyve: Generalize the IPC thread
Needs ReviewPublic

Authored by bnovkov on Sun, Jan 11, 1:32 PM.
Tags
None
Referenced Files
F143042755: D54650.id169470.diff
Sun, Jan 25, 11:18 AM
Unknown Object (File)
Sat, Jan 24, 9:10 AM
Unknown Object (File)
Sat, Jan 24, 9:10 AM
Unknown Object (File)
Mon, Jan 19, 6:12 PM
Unknown Object (File)
Mon, Jan 19, 12:05 AM
Unknown Object (File)
Sun, Jan 18, 10:45 PM
Unknown Object (File)
Sun, Jan 18, 10:22 PM
Unknown Object (File)
Sun, Jan 18, 10:07 PM

Details

Reviewers
None
Group Reviewers
bhyve
Summary

Move the code for the snapshotting IPC thread into a separate file
and define macros for adding new IPC commands.
No functional change intended.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 69799
Build 66682: arc lint + arc unit

Event Timeline

only suggestions, not a request

usr.sbin/bhyve/ipc.c
60–74

what do you think about each ipc command constructing their own nvlist as a reply?

and then let handle_message() destroy the passed in nvl list?

there are two different class errors that can occur here, one is that the requested command is not supported and the second class is the handler encountered an error...might be worth being able to differentiate between those two different types of errors...only mentioning, your decision

98–110

looking at the suggested edit...then handle_message() would be responsible for destroying nvl and constructing the reply message.

Address @rew 's comments - change IPC command return type to nvlist_t.

bnovkov added inline comments.
usr.sbin/bhyve/ipc.c
60–74

Yeah, having the handler return a "reply" object makes more sense than reusing the one passed as an argument.
Thank you for the suggestion!

  • constify command nvlist_t argument
  • adapt vm_do_checkpoint to use the new return type