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.15k stars 322 forks source link

dpdk-udp to linux-udp is not working between devices #103

Closed jihwanseo closed 5 years ago

jihwanseo commented 5 years ago

Hi. ANS Team.

I'm facing some issue about UDP test. I'm trying to test udp between dpdk_udp_stability and linux-udp. When i try to run these in the same device. it's working fine. However it seems like it is not working between other devices. dpdk_udp_stability can receive data from linux-udp app. but linux-udp can't receive response data from dpdk_udp_stability. (I use ip address 10.113.174.184 in the test apps) Anyone who know what i miss something?

please refer below setup


dpdk-ans/ans/build# ./ans -c 0x2 -n 1 -- -p 0x1 --config="(0,0,1)" EAL: Detected 8 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:03:00.0 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1563 net_ixgbe EAL: PCI device 0000:03:00.1 on NUMA socket -1 EAL: Invalid NUMA socket, default to 0 EAL: probe driver: 8086:1563 net_ixgbe

Start to Init port port 0:
port name net_ixgbe:
max_rx_queues 128: max_tx_queues:64 rx_offload_capa 0x12e5f: tx_offload_capa:0x80bf Creating queues: rx queue number=1 tx queue number=1... MAC Address:00:0A:CD:30:CC:BB Deault-- tx pthresh:32, tx hthresh:0, tx wthresh:0, tx offloads:0x0 lcore id:1, tx queue id:0, socket id:0 Conf-- tx pthresh:32, tx hthresh:0, tx wthresh:0, tx offloads:0x2e

Allocated mbuf pool on socket 0, mbuf number: 32768

Initializing rx queues on lcore 1 ... Default-- rx pthresh:8, rx hthresh:8, rx wthresh:0, rx offloads:0x0
Conf-- rx pthresh:8, rx hthresh:8, 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[1] lcore number 1 USER1: rte_ip_frag_table_create: allocated of 25165952 bytes at socket 0 add veth0 device, kni id 0 USER8: LCORE[1] Interface veth0 if_capabilities: 0x80bf add IP a000002 on device veth0 show all IPs:

veth0: mtu 1500 link/ether 00:0a:cd:30:cc:bb 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 1000 Mbps - full-duplex USER8: main loop on lcore 1 USER8: -- lcoreid=1 portid=0 rxqueueid=0 hz: 3392304360


dpdk-ans/cli/build# ./anscli ans> ip addr add 10.113.174.184/24 dev veth0 Add IP address successfully ans> ip addr show

veth0: mtu 1500 link/ether 00:0a:cd:30:cc:bb inet addr: 10.0.0.2/24 inet addr: 10.113.174.184/24 ans> quit Quit ans command

bluenet13 commented 5 years ago

If you use different IP, you shall change the hardcode IP in dpdk_udp_stability. By the way, what IP is used in linux-udp? if it is in different subnet, you shall also configue the default route.

jihwanseo commented 5 years ago

Yes. I changed hardcode IP in dpdk_udp_stability (10.113.174.184) 10.113.175.70 is used in linux-udp. Can you tell me how to config the default route?

bluenet13 commented 5 years ago

anscli> ip route add 0.0.0.0/0 via x.x.x.x

jihwanseo commented 5 years ago

thanks~!