Networking UIO driver to libvmm to allow creation of Ethernet driver VMs (maybe WiFi/Cellular in the future?)
A patched echo server example that uses an Ethernet driver VM.
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.
Supersedes #136.
This PR adds:
The basic idea is:
There are two issues to be aware of though:
TCP performance: Requested_Throughput,Receive_Throughput,Send_Throughput,Packet_Size,Minimum_RTT,Average_RTT,Maximum_RTT,Stdev_RTT,Median_RTT,Idle_Cycles,Total_Cycles 1000000000,145529249,145506692,1460,56336,63790,71432,1489.88,63770,0,0,0
UDP performance: Requested_Throughput,Receive_Throughput,Send_Throughput,Packet_Size,Minimum_RTT,Average_RTT,Maximum_RTT,Stdev_RTT,Median_RTT,Idle_Cycles,Total_Cycles 200000000,176977185,200000147,1472,6615,8719,10681,1077.98,9053,0,0,0
Note that this performance depends on an unmerged sDDF network queue library that has compiler barriers.