The document discusses the evolution of OSv from running on BitVisor (OSb) to running directly on hardware (OSp). It provides details on implementing a 10GbE network driver for the Intel X540 NIC in OSp. The driver implementation covers initialization, TX and RX operations using descriptor rings, and the interface with OSv. Performance is improved over OSb but there is still work needed on interrupts and advanced features. Additional scripts are discussed that allow OSv to directly access PCI devices when running on KVM/Linux for further optimization.
33. RX Interface
(Driver => OSv)
• struct ifnet *_ifn = if_alloc (IFT_ETHER);
• On init., driver creates ifnet and…
• ether_ifattach(_ifn, macaddr);
• …passes it to the upper layer. (Then, the upper
layer puts an callback function on ifnet.if_input)
• (*_ifn->if_input)(_ifn, mbuf);
• On packet reception, driver calls the callback
function (if_input) by passing mbuf as an
argument.
34. Under improvement
(A lot of TODOs)
• No interrupts… (bad polling impl.)
• No TSO, LRO, checksum assist…
• No advanced descriptor… (legacy
descriptor seems slow)
• …