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

consider one vmnet interface per VM, datagram-based interface #77

Open
tamird opened this issue Nov 18, 2024 · 0 comments
Open

consider one vmnet interface per VM, datagram-based interface #77

tamird opened this issue Nov 18, 2024 · 0 comments
Labels
enhancement New feature or request kind/performance

Comments

@tamird
Copy link

tamird commented Nov 18, 2024

Currently socket_vmnet spawns a single vmnet_interface

socket_vmnet/main.c

Lines 263 to 272 in f486d47

iface = vmnet_start_interface(
dict, q, ^(vmnet_return_t x_status, xpc_object_t x_param) {
status = x_status;
if (x_status == VMNET_SUCCESS) {
print_vmnet_start_param(x_param);
max_bytes =
xpc_dictionary_get_uint64(x_param, vmnet_max_packet_size_key);
}
dispatch_semaphore_signal(sem);
});

and takes on the responsibility of flooding all clients with all other clients' packets. This leads to #58.

We should consider an alternative design where the client-server interface is comprised of a file descriptor and metadata that allows the server to create a VM per client. This would remove the need to flood with packets, allow some VMs to be isolated from others, and generally expose the full generality of vmnet with better performance.

We should also move to datagram sockets as part of this redesign as they do not employ a framing protocol that requires 2 read calls per packet and makes it impossible to use vectorized reads.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request kind/performance
Projects
None yet
Development

No branches or pull requests

2 participants