Skip to content

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

Open
@tamird

Description

@tamird

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions