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

Add networking UIO driver #136

Closed
wants to merge 19 commits into from
Closed

Add networking UIO driver #136

wants to merge 19 commits into from

Conversation

dreamliner787-9
Copy link
Contributor

@dreamliner787-9 dreamliner787-9 commented Oct 30, 2024

This PR adds networking UIO driver to libvmm to allow creation of Ethernet driver VMs (maybe WiFi in the future?)

The basic idea is:

  • The sDDF network control, data regions and notification from virtualisers are mapped into Linux userspace via UIO.
  • A promiscuous socket is opened to sniff all incoming frames. When a frame comes through from the socket, we enqueue the data into the appropriate sDDF queues and fault on a pre-determined address so the VMM can notify the RX virtualiser.
  • When a client wants to transmit data, we will get TX virt notifications via UIO, then we simply write the data out into the socket.

There are two issues to be aware of though:

  • When a frame is received, it is written into a buffer in the driver then byte-by-byte copied into the sDDF data region. If we recv() directly into the data region (which is mapped in via UIO), sometimes it fails on an invalid address.
  • Currently the event loop blocks on an epoll, we should make it asynchronous instead.

Ivan-Velickovic and others added 19 commits October 10, 2024 11:12
* Renaming regarding block:
  size -> capacity
  config -> storage info
* Renaming regarding serial:
  size -> capacity

Signed-off-by: Ivan-Velickovic <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
… longer for the interface to come up

Signed-off-by: Bill Nguyen <[email protected]>
Signed-off-by: Bill Nguyen <[email protected]>
@dreamliner787-9 dreamliner787-9 marked this pull request as draft October 31, 2024 03:24
@dreamliner787-9
Copy link
Contributor Author

Marking as draft because we need an example to prevent bitrot

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.

2 participants