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.17k stars 325 forks source link

TCP problem on real server #6

Closed hiepnm closed 8 years ago

hiepnm commented 8 years ago

I have 2 real server. I installed opendp, nginx to one with NIC

0000:01:00.1 'Ethernet Controller 10-Gigabit X540-AT2' if=em2 drv=ixgbe

I get IP 2.2.2.2 with opendp app. But I cannot ping it. After researching, I found that the reseason is checksum offload feature of NIC card. I fixed it with the following script:

cd dpdk-odp/opendp sed -i -e 's/NETDP_HW_CHKSUM_DISABLE/NETDP_HW_CHKSUM_DISABLE/g' odp_main.c make

OK, I can ping the server. But, I cannot still complete tcp request to it. I monitored network packet using wireshark and found that the connection step is OK (three step handshake with 3 packets), after connection step, client send http request to nginx server, and the sending is OK, but server seemed not to handle the request ( or it handled but the request had been dropped before; or the response from nginx was dropped by lower modules like dpdk, opendp; or ...), so the client cannot get the response, and it retransmissed the request.

Can you help me about this problem?

PS: some pcap files with http request with curl: https://drive.google.com/open?id=0B8RSLiwE-PAxZjE4VnRjT3ZfLUk with telnet: https://drive.google.com/open?id=0B8RSLiwE-PAxQzlLNVRBSVRwdFU https://drive.google.com/open?id=0B8RSLiwE-PAxejZrTEdmdlJuZ0E

jiakai1000 commented 8 years ago

Can you show me the Nginx log?

hiepnm commented 8 years ago

Here is my nginx.log file after running:

sudo ./objs/nginx > nginx.log 2>&1 &

and on client I ran

curl http://2.2.2.2

and I waited 1 min on client, server didn't return. So I pressed "Ctrl-C" to break the client. https://drive.google.com/open?id=0B8RSLiwE-PAxdmthYnFGSy13Yjg

hiepnm commented 8 years ago

And here is opendp log.

https://drive.google.com/open?id=0B8RSLiwE-PAxRV9QRzFsWjN5VTA