F-Stack / f-stack

F-Stack is an user space network development kit with high performance based on DPDK, FreeBSD TCP/IP stack and coroutine API.
http://www.f-stack.org
Other
3.86k stars 898 forks source link

example/helloworld doesn't work: Invalid NUMA socket #427

Closed hirrolot closed 5 years ago

hirrolot commented 5 years ago

Trying to compile and execute the example:

root@gymmasssorla-desktop:/data/f-stack/example# make
cc -O -gdwarf-2  -I../lib -o "helloworld" main.c -L../lib -Wl,--whole-archive,-lfstack,--no-whole-archive -L../dpdk/x86_64-native-linuxapp-gcc/lib -Wl,--whole-archive,-ldpdk,--no-whole-archive -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -pthread -lnuma
cc -O -gdwarf-2  -I../lib -o "helloworld"_epoll main_epoll.c -L../lib -Wl,--whole-archive,-lfstack,--no-whole-archive -L../dpdk/x86_64-native-linuxapp-gcc/lib -Wl,--whole-archive,-ldpdk,--no-whole-archive -Wl,--no-whole-archive -lrt -lm -ldl -lcrypto -pthread -lnuma

root@gymmasssorla-desktop:/data/f-stack/example# ./helloworld --conf=/etc/f-stack.conf
invalid proc_id:-1, use default 0
[dpdk]: lcore_mask=1
[dpdk]: channel=4
[dpdk]: promiscuous=1
[dpdk]: numa_on=1
[dpdk]: tso=0
[dpdk]: vlan_strip=1
[dpdk]: idle_sleep=0
[dpdk]: pkt_tx_delay=100
[dpdk]: port_list=0
[dpdk]: nb_vdev=0
[port0]: addr=192.168.1.2
[port0]: netmask=255.255.225.0
[port0]: broadcast=192.168.1.255
[port0]: gateway=192.168.1.1
[freebsd.boot]: hz=100
[freebsd.boot]: fd_reserve=1024
[freebsd.boot]: kern.ipc.maxsockets=262144
[freebsd.boot]: net.inet.tcp.syncache.hashsize=4096
[freebsd.boot]: net.inet.tcp.syncache.bucketlimit=100
[freebsd.boot]: net.inet.tcp.tcbhashsize=65536
[freebsd.boot]: kern.ncallout=262144
[freebsd.boot]: kern.features.inet6=1
[freebsd.boot]: net.inet6.ip6.auto_linklocal=1
[freebsd.boot]: net.inet6.ip6.accept_rtadv=2
[freebsd.boot]: net.inet6.icmp6.rediraccept=1
[freebsd.boot]: net.inet6.ip6.forwarding=0
[freebsd.sysctl]: kern.ipc.somaxconn=32768
[freebsd.sysctl]: kern.ipc.maxsockbuf=16777216
[freebsd.sysctl]: net.link.ether.inet.maxhold=5
[freebsd.sysctl]: net.inet.tcp.fast_finwait2_recycle=1
[freebsd.sysctl]: net.inet.tcp.sendspace=16384
[freebsd.sysctl]: net.inet.tcp.recvspace=8192
[freebsd.sysctl]: net.inet.tcp.cc.algorithm=cubic
[freebsd.sysctl]: net.inet.tcp.sendbuf_max=16777216
[freebsd.sysctl]: net.inet.tcp.recvbuf_max=16777216
[freebsd.sysctl]: net.inet.tcp.sendbuf_auto=1
[freebsd.sysctl]: net.inet.tcp.recvbuf_auto=1
[freebsd.sysctl]: net.inet.tcp.sendbuf_inc=16384
[freebsd.sysctl]: net.inet.tcp.recvbuf_inc=524288
[freebsd.sysctl]: net.inet.tcp.sack.enable=1
[freebsd.sysctl]: net.inet.tcp.blackhole=1
[freebsd.sysctl]: net.inet.tcp.msl=2000
[freebsd.sysctl]: net.inet.tcp.delayed_ack=0
[freebsd.sysctl]: net.inet.udp.blackhole=1
[freebsd.sysctl]: net.inet.ip.redirect=0
EAL: Detected 8 lcore(s)
EAL: Detected 1 NUMA nodes
EAL: Auto-detected process type: PRIMARY
EAL: Multi-process socket /var/run/dpdk/rte/mp_socket
f-stack -c1 -n4 --proc-type=auto EAL: Probing VFIO support...
EAL: PCI device 0000:00:1f.6 on NUMA socket -1
EAL:   Invalid NUMA socket, default to 0
EAL:   probe driver: 8086:15b8 net_e1000_em
EAL: Error - exiting with code: 1
  Cause: No probed ethernet devices

My system:

                          ./+o+-       root@gymmasssorla-desktop
                  yyyyy- -yyyyyy+      OS: Ubuntu 18.04 bionic
               ://+//////-yyyyyyo      Kernel: x86_64 Linux 4.15.0-58-generic
           .++ .:/++++++/-.+sss/`      Uptime: 11m
         .:++o:  /++++++++/:--:/-      Packages: 2353
        o:+o+:++.`..```.-/oo+++++/     Shell: bash 4.4.20
       .:+o:+o/.          `+sssoo+/    Resolution: 1920x1080
  .++/+:+oo+o:`             /sssooo.   WM: GNOME Shell
 /+++//+:`oo+o               /::--:.   WM Theme: Adwaita
 \+/+o+++`o++o               ++////.   CPU: Intel Core i7-6700 @ 8x 4GHz [36.5°C]
  .++.o+++oo+:`             /dddhhh.   GPU: NV136
       .+.o+oo:.          `oddhhhh+    RAM: 4712MiB / 7927MiB
        \+.++o+o``-````.:ohdhhhhh+    
         `:o+++ `ohhhhhhhhyo++os:     
           .o:`.syhhhhhhh/.oo++o`     
               /osyyyyyyo++ooo+++/    
                   ````` +oo+++o\:    
                          `oo++.      

My NIC:

root@gymmasssorla-desktop:/data/f-stack/example# lspci | awk '/[Nn]et/ {print $1}' | xargs -i% lspci -ks %
00:1f.6 Ethernet controller: Intel Corporation Ethernet Connection (2) I219-V (rev 31)
    Subsystem: ASRock Incorporation Ethernet Connection (2) I219-V
    Kernel driver in use: e1000e
    Kernel modules: e1000e

How to fix this error?

jfb8856606 commented 5 years ago

DPDK can't find a NIC bind to igb_uio, show the info of command

python dpdk/usertools/dpdk-devbind.py --status

I suppose you run F-Stack in a VM, and see the build guide

hirrolot commented 5 years ago

Thank you, I've recompiled F-Stack under VirtualBox according to this guide and all works fine.