ryanmiao / netmap

Automatically exported from code.google.com/p/netmap
0 stars 0 forks source link

running netmap-libpcap linked tcpdump slows pkt-gen and drops packets #44

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Ubuntu 3.13.0-32 x64 virtual machine running on ESXi 5.5, which is running 
on a Dell R720 with a 2 port Intel X540-AT2 10Gig network card directly 
attached to the VM with DirectPath I/O.

2. I have git cloned netmap and netmap-libpcap and built both successfully. 
Downloaded tcpdump-4.6.2 and linked it to the netmap-libpcap, verified by:
./tcpdump -V
tcpdump version 4.6.2
libpcap version 1.6.0-PRE-GIT_2015_02_19

I have turned off flow control with:

ethtool -A eth1 autoneg off rx off
ethtool -A eth2 autoneg off rx off

3. In 1 terminal I run: 

./pkt-gen -i eth1 -f tx -l 60 -S <mac of eth1> -D <mac of eth2> -n 500111222

In another terminal I run:

./tcpdump -ni eth2 -s 0 -w test.cap

What is the expected output? What do you see instead?

pkt-gen output averages around 7Mpps. During pkt-gen sending packets I 
terminate the tcpdump process, and pkt-gen output changes to around 12Mpps 
(around the limit for the ixgbe driver as I understand).  The output of the 
cancelled tcpdump command states lots of packets dropped by kernel and lots of 
packets dropped by interface.

I would expect, for tcpdump linked with netmap-libpcap to drop minimal or no 
packets.
Any help gratefully received.

Please provide any additional information below.

I run top during this process and pkt-gen cpu usage goes between 10-50%, 
tcpdump is constantly around 70%.

Original issue reported on code.google.com by budede...@gmail.com on 19 Feb 2015 at 8:11