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.
This PR adds networking UIO driver to libvmm to allow creation of Ethernet driver VMs (maybe WiFi in the future?)
The basic idea is:
There are two issues to be aware of though:
recv()
directly into the data region (which is mapped in via UIO), sometimes it fails on an invalid address.