ansyun / dpdk-ans

ANS(Accelerated Network Stack) on DPDK, DPDK native TCP/IP stack.
https://ansyun.com
BSD 3-Clause "New" or "Revised" License
1.16k stars 324 forks source link

Cannot run example TCP client or server #109

Closed goliaro closed 5 years ago

goliaro commented 5 years ago

Hi! I am running into some errors when trying to run either the TCP server or the TCP client. This is what I am getting: EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes PANIC in rte_eal_config_attach(): Cannot open '/run/user/1000/dpdk/rte/config' for rte_mem_config 7: [./dpdk_tcp_server(_start+0x2a) [0x564a08025bea]] 6: [/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f65af2e0b97]] 5: [./dpdk_tcp_server(main+0x37) [0x564a0801c2c7]] 4: [./dpdk_tcp_server(anssock_init+0x1a2) [0x564a0802a2b2]] 3: [./dpdk_tcp_server(rte_eal_init+0xd47) [0x564a08118f17]] 2: [./dpdk_tcp_server(__rte_panic+0xc5) [0x564a0800c6ec]] 1: [./dpdk_tcp_server(rte_dump_stack+0x2e) [0x564a0812605e]] Aborted (core dumped)

On the other hand, when I run the ans executable using the sample command from the user guide, it seems to go smoothly: `root@ubuntu:~/Desktop/dpdk-ans/ans# ./build/ans -c 0x4 -n 1 -- -p 0x1 --config="(0,0,2)" EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Probing VFIO support... EAL: PCI device 0000:02:01.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:100f net_e1000_em EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 15ad:7b0 net_vmxnet3

Start to Init port port 0:
port name net_vmxnet3:
max_rx_queues 16: max_tx_queues:8 rx_offload_capa 0x2a1f: tx_offload_capa:0x802f Creating queues: rx queue number=1 tx queue number=1... MAC Address:00:0C:29:2F:35:AF Deault-- tx pthresh:0, tx hthresh:0, tx wthresh:0, tx offloads:0x0 lcore id:2, tx queue id:0, socket id:0 Conf-- tx pthresh:0, tx hthresh:0, tx wthresh:0, tx offloads:0x2e

Allocated mbuf pool on socket 0, mbuf number: 32768

Initializing rx queues on lcore 2 ... Default-- rx pthresh:0, rx hthresh:0, rx wthresh:0, rx offloads:0x0
Conf-- rx pthresh:0, rx hthresh:0, rx wthresh:0, rx offloads:0xf
port id:0, rx queue id: 0, socket id:0

rx core: 1, worker core: 0, sockets number:1, lcore number:1 start to init ans USER8: LCORE[2] lcore number 1 USER1: rte_ip_frag_table_create: allocated of 25165952 bytes at socket 0 add veth0 device, kni id 0 USER8: LCORE[2] Interface veth0 if_capabilities: 0x802f add IP a000002 on device veth0 show all IPs:

veth0: mtu 1500 link/ether 00:0c:29:2f:35:af inet addr: 10.0.0.2/24

add static route

ANS IP routing table 10.0.0.0/24 via dev veth0 src 10.0.0.2 10.10.0.0/24 via 10.0.0.5 dev veth0

Checking link status done Port 0 Link Up - speed 10000 Mbps - full-duplex USER8: main loop on lcore 2 USER8: -- lcoreid=2 portid=0 rxqueueid=0 hz: 2593164741 `

Can you help me figure out what's going wrong? Thanks a bunch!!

goliaro commented 5 years ago

never mind, I figured it out. I just needed to run the server with sudo or root priviledges.