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

unable to run ans #93

Closed dojolabs-ci closed 5 years ago

dojolabs-ci commented 5 years ago

Im trying to run ans under ubuntu 16.04 server(virtual machine on top kvm) with dpdk 17-11 stable, when I try to run the app I got the following: root@ubuntu-16-04-dpdk:~/dpdk-ans/ans# ./build/ans -c 0x2 -n 1 -- -p 0x1 --config="(0,0,1)" EAL: Detected 4 lcore(s) EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles ! EAL: PCI device 0000:01:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio EAL: PCI device 0000:07:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio EAL: PCI device 0000:08:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio param nb 1 ports 2 port id 0

Start to Init port port 0:
port name net_virtio:
max_rx_queues 1: max_tx_queues:1 rx_offload_capa 0x1c: tx_offload_capa:0x2c Creating queues: rx queue number=1 tx queue number=1... MAC Address:52:54:00:C8:6F:19 Deault-- tx pthresh:0, tx hthresh:0, tx wthresh:0, txq_flags:0xf00 lcore id:1, tx queue id:0, socket id:0 Conf-- tx pthresh:0, tx hthresh:0, tx wthresh:0, txq_flags:0x0

Skipping disabled port 1 Allocated mbuf pool on socket 0, mbuf number: 16384

Initializing rx queues on lcore 1 ... Default-- rx pthresh:0, rx hthresh:0, rx wthresh:0 port id:0, rx queue id: 0, socket id:0 Conf-- rx pthresh:8, rx hthresh:8, rx wthresh:4

core mask: 2, sockets number:1, lcore number:1 start to init ans USER8: LCORE[1] lcore mask 0x2 USER8: LCORE[1] lcore id 1 is enable USER8: LCORE[1] lcore number 1 USER1: rte_ip_frag_table_create: allocated of 25165952 bytes at socket 0 USER8: LCORE[1] UDP layer init successfully, Use memory:4194304 bytes USER8: LCORE[1] TCP hash table init successfully, tcp pcb size 448 total size 58720256 USER8: LCORE[1] so shm memory 16777216 bytes, so number 131072, sock shm size 128 bytes USER8: LCORE[1] Sock init successfully, allocated of 41943040 bytes add eth0 device USER8: LCORE[1] Interface eth0 if_capabilities: 0x1c stack smashing detected : ./build/ans terminated Aborted (core dumped)

I dont see some dpdk issues.. testpmd working for example

bluenet13 commented 5 years ago

Support environment

EAL is based on dpdk-18.11; linux version: 4.4.0-45-generic (Ubuntu 16.04.1 LTS). gcc version: gcc version 5.4.0 20160609.

dojolabs-ci commented 5 years ago

i followed the user guide... ubuntu server is ok?

bluenet13 commented 5 years ago

ubuntu server is ok, ans doesn't depend on it. But dpdk vesion shall be 18.11. shall same as ans.

dojolabs-ci commented 5 years ago

now i got:root@ubuntu-16-04-dpdk:~/dpdk-ans/ans# ./build/ans -c 0x2 -n 1 -- -p 0x1 --config="(0,0,1)" EAL: Detected 4 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... EAL: WARNING: cpu flags constant_tsc=yes nonstop_tsc=no -> using unreliable clock cycles ! EAL: PCI device 0000:01:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio EAL: Error: Invalid memory EAL: PCI device 0000:07:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio EAL: PCI device 0000:08:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 1af4:1041 net_virtio

Start to Init port port 0:
port name net_virtio:
max_rx_queues 1: max_tx_queues:1 rx_offload_capa 0x21d: tx_offload_capa:0x802d Creating queues: rx queue number=1 tx queue number=1... Ethdev port_id=0 requested Rx offloads 0xf doesn't match Rx offloads capabilities 0x21d in rte_eth_dev_configure() EAL: Error - exiting with code: 1 Cause: Cannot configure device: err=-22, port=0

bluenet13 commented 5 years ago

Pull the latest ans from github.

dojolabs-ci commented 5 years ago

latest master? if so, I did it..

dojolabs-ci commented 5 years ago
On branch master
Your branch is up-to-date with 'origin/master'.
Untracked files:
  (use "git add <file>..." to include in what will be committed)

    ans/build/
    help-dummy.o
    librte_ans/librte_ans.a
    librte_anscli/librte_anscli.a
    librte_anssock/librte_anssock.a

nothing added to commit but untracked files present (use "git add" to track)
ubuntu@ubuntu-16-04-dpdk:~/dpdk-ans$ git pull
error: cannot open .git/FETCH_HEAD: Permission denied

ubuntu@ubuntu-16-04-dpdk:~/dpdk-ans$ sudo git pull
[sudo] password for ubuntu: 
Already up-to-date.
ubuntu@ubuntu-16-04-dpdk:~/dpdk-ans$ sudo git branch -v
  ans-17.11 7ac8fc8 add more comments before adding acl function
* master    dc97dc8 fix tcp issue
ubuntu@ubuntu-16-04-dpdk:~/dpdk-ans$ 
bluenet13 commented 5 years ago

git pull https://github.com/ansyun/dpdk-ans.git

bluenet13 commented 5 years ago

What is your NIC ? it doesn't support DEV_RX_OFFLOAD_IPV4_CKSUM, but support DEV_RX_OFFLOAD_UDP_CKSUM and DEV_RX_OFFLOAD_TCP_CKSUM?

dojolabs-ci commented 5 years ago

virtio, binded with igb_uio or uio_generic

bluenet13 commented 5 years ago

Fix the issue just now. Please pull the latest ANS code and try it.

Thanks.

dojolabs-ci commented 5 years ago

working Thanks