log on adding net stack on rcore - oscourse-tsinghua/rcore_plus GitHub Wiki

plan

  • long term: a parallel tcpip stack (like zygos/IX/mTCP)
  • short term: a tcpip stack support real NICs and apps.

Topology

network speed test

all tested using make runnet mode=release.

arch environ rcore -> linux linux -> rcore
x86_64 pci ixgbe passthru 1.40Gb/s 2.47Gb/s
x86_64 qemu e1000e emulation 150Mb/s 50Mb/s

how to test

  • make runnet arch=x86_64, add an ip to the newly created TAP interface e.g. ip a add 10.0.0.1/24 dev tap0, then you may try:
    • arping -I tap0
    • ping 10.0.0.2
    • curl http://10.0.0.2
    • nc -u 10.0.0.2 6969
    • in vm, try busybox pscan 10.0.0.1 and busybox ping -c1 10.0.0.1.
    • start a tftp server in host, create a file called test, and try busybox tftp -l test -g 10.0.0.1 in vm.

2019.03.07

  • cjj: multiple fixes, and implement sys_select. busybox nc is working in both directions.

2019.03.06

  • cjj: implement support for sys_bind, sys_connect, sys_listen and sys_accept. implement sys_poll supporting stdin and sockets with lots of deadlock bugs.

2019.03.05

  • cjj: implement support for udp sockets, and tftp is working now. the panic comes from fs.

2019.03.04

  • cjj: implement blocking connect, read and recvfrom calls using MSI interrupt and Condvar.

2019.03.03

  • cjj: implement raw socket for ping4.

2019.03.01

  • cjj: specialise sys_close for socket.

2019.02.28

  • cjj: implement syscalls connect and write.

2019.02.21

  • zqy: 写了一个简单的网络程序echoserver, 可以用于测试网络协议栈的性能,只使用了pthread和network的api,目前跑在linux上,未来希望可以移植到 lit.c上. server端只是简单的将收到的数据返回给client端,client目前有两个版本, sender和recver异步的版本可以直接跑到最大带宽,但是不能控制速率,同步的版本可以通过控制线程数和buf_size来控制速率. 代码在https://github.com/deltavoid/echoserver
  • cy: 根据lxy的论文, 内核态/用户态的动态内存分配与回收, 中断在高速网络传输中占了很大的开销. 也许smoltcp的特征适合高速网络的测试. 有空也看看ixy的论文吧.

2019.02.19

before 2019.02.19

  • cjj: ported smoltcp on rcore
  • cjj: added virtio net deivce driver on rcore

related project