Lowrisc Summer of Code TCP/IP Offload to Minion Cores Using Rump Kernels
Total Page:16
File Type:pdf, Size:1020Kb
lowRISC Summer of Code TCP/IP Offload to Minion Cores using Rump Kernels Sebastian Wicki Mentored by: Justin Cormack, Antti Kantee Or ani!er: Ale" Bradbury, lowRISC 1 %e want an open com&utin eco-system: comprehensible, le!ible and reusable Operating System Processor Peripherals $ )ardware platform I+O shims 1 &ins lo"RISC minion cores RISC#$ RISC#$ a&&lication a&&lication ● small, dedicated RISC#$ RISC#$ RISC#$ cores cores minion minion % minion RISC'V cores coherent network I+O network ● s&ecialized for I+O &rocessin 0$ cache ● &rotocols in so,ware ‒e- . SPI, I2C, SDIO off-chip memory ( so,ware platform rump kernels ● dri3er container ‒ file systems, network, audio ● run anywhere ‒ users&ace, )y&er3isors, bare-metal ‒ inte rate into own system ● based on Net#SD 2 project proposal I+O shims 1 &ins ● rump kernels on RISC#$ minion cores a&&lication RISC#$ RISC#$ cores minion % minion ● process I/O using rump drivers coherent network I+O network ‒ e- . TCP+I. 0$ cache ● traditional OS on application cores off-chip memory 5 rump &ernels 7 rump kernels: not an operating system ● no processes or application user s&ace threading ● no virtual memory system calls interrupts management net vfs dev paging signals bt tcp smb ext2 cgd usb vm processes ● no privilege levels ip blk ums scheduling ● no interrupt handling if kernel hardware 8 rump kernels: not an operating system ● hypercall interface application ‒ t)read sc)edulin host process ‒ memory allocation system calls net vfs dev ‒ console output bt tcp smb ext2 cgd usb ‒ I/O hypercalls ip blk ums if rump hypercall interface )ost platform 9 rump kernels: run anywhere user space client ser)er uni&ernel client a&& client a&&lication client rump kernel client clientrump libc libc codea&& code kernelcode hypercall)ypercall hijack rump kernel libc rumpclient hypercall hypercall interface posi! posi! posi! hard"areposi! ● client code is aware of ● unmodified client code ● unmodified client code rump kernel ● interce&t libc calls ● rump kernel aware libc ● forward o3er network : rump kernels on minion cores ● hypercalls for bare-metal ISC-" rump kernel ‒ based on t)e rum&run unikernel user a&plication ethernet sysproxy ● drivers running on rump server tcp/ip ‒ custom et)ernet driver rump hijack I+O libc net ‒ 6C./IPrump stack client from 4et#S/ ● syscall proxy server hypercall implementation linu" kernel ‒ rewritten to run on bare'metal minion core application core ‒ uses serial line instead of network 10 rump kernels on minion cores # e$uest: syscall “send=, data % e$uest: co&yin, data.buf rump kernel # esponse: co&yin, data % esponse: syscall, ret3al user a&&lication ethernet @t)ernet Frame sysproxy send>fd, “?@6 / H66./1-1=, .--B open><+etc/passwd=B tcp/ip server rump hijack I+O serial libc net rump client syscall open rump_sys_send>fd, …B hypercall implementation linu" kernel minion core application core 11 Limitations ● currently only runs in Spike ‒ wrote virtual network card ‒ simulates minion core ‒ )ost offloads into Spike ● system requirements ● everything over serial protocol ‒ use DMA en ine for copy{in,out} ● code needs some cleanup 12 Conclusions ● rump kernels are flexible http://rumpkernel(org ‒ not limited to TCP+IP offload )rumpkernel ‒ no need to use syscall pro"y *rumpkernel irc.freenode.net ‒ run your own apps on minion cores ● code is reusable Contact: )gandro2+ 13.