ryanmiao / netmap

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

Netmap on CentOS 7 work abnormally #40

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I installed CentOS 7 in a VMware hypervisor. I used this 
http://wiki.centos.org/HowTos/I_need_the_Kernel_Source link to get the CentOS 
source.
Then when I install netmap, I get 2 errors:

if [ -f patches/diff--virtio_net.c--30800--30b00 ]; then patch --posix --quiet 
--force -p1 < patches/diff--virtio_net.c--30800--30b00; fi
1 out of 7 hunks FAILED -- saving rejects to file virtio_net.c.rej
make: *** [get-virtio_net.c] Error 1

cp -Rp 
/home/liuwf/rpmbuild/BUILD/kernel-3.10.0-123.13.2.el7/linux-3.10.0-123.13.2.el7.
x86_64/drivers/net/ethernet/intel/igb .
if [ -f patches/diff--igb--30800--30b00 ]; then patch --posix --quiet --force 
-p1 < patches/diff--igb--30800--30b00; fi
3 out of 10 hunks FAILED -- saving rejects to file igb/igb_main.c.rej
make: *** [get-igb] Error 1

I removed those two patches and then compiled successfully.

Then I rmmod and insmod the proper modules, the lsmod output is:
e1000                 149676  0 
netmap                114630  1 e1000

When I use 'sudo ./pkt-gen -i ens33 -f rx -v' to test the performance, I get 
this output:
843.396558 main [1649] interface is ens33
843.396886 extract_ip_range [239] extract IP range from 10.0.0.1
843.396918 extract_ip_range [287] range is 10.0.0.1:0 to 10.0.0.1:0
843.396926 extract_ip_range [239] extract IP range from 10.1.0.1
843.396933 extract_ip_range [287] range is 10.1.0.1:0 to 10.1.0.1:0
843.396941 extract_mac_range [295] extract MAC range from 00:00:00:00:00:00
843.396957 extract_mac_range [311] 00:00:00:00:00:00 starts at 0:0:0:0:0:0
843.396967 extract_mac_range [295] extract MAC range from ff:ff:ff:ff:ff:ff
843.396972 extract_mac_range [311] ff:ff:ff:ff:ff:ff starts at ff:ff:ff:ff:ff:ff
860.190305 main [1840] mapped 334980KB at 0x7f13a1b64000
860.190326 main [1860] nifp at offset 0, 1 tx 1 rx region 1
860.190329 main [1864]    TX0 at 0x0x19000 slots 256
860.190332 main [1864]    TX1 at 0x0x22000 slots 256
860.190336 main [1869]    RX0 at 0x0x2b000 slots 256
860.190338 main [1869]    RX1 at 0x0x34000 slots 256
Receiving from netmap:ens33: 1 queues, 1 threads and 1 cpus.
860.190359 main [1926] Wait 2 secs for phy reset
862.190472 main [1928] Ready...
862.190626 nm_open [456] overriding ifname ens33 ringid 0x0 flags 0x1
886.024061 receiver_body [1183] reading from netmap:ens33 fd 4 main_fd 3

then I lost the ssh connection, the dmesg shows:
[  292.869866] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.870083] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.870301] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.870535] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.870756] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.870974] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.871193] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.871427] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.871648] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.871867] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.872085] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.872304] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.872538] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.872767] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.872987] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.873206] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.873448] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.873683] DMA: Out of SW-IOMMU space for 2048 bytes at device 0000:02:01.0
[  292.886834] DMA: Out of SW-IOMMU space for 246 bytes at device 0000:02:00.0
[  292.886945] e1000 0000:02:00.0: TX DMA map failed

Any help will be appreciated.

Original issue reported on code.google.com by 266...@gmail.com on 24 Dec 2014 at 4:40

GoogleCodeExporter commented 9 years ago
The kernel parameters as belows:
BOOT_IMAGE=/vmlinuz-3.10.0-123.el7.x86_64 
root=UUID=3c2a89de-712d-4cfe-a255-a2bd776e6c3b ro rd.lvm.lv=centos/swap 
vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root crashkernel=auto 
intel_iommu=off vconsole.keymap=us rhgb quiet

Original comment by 266...@gmail.com on 24 Dec 2014 at 4:44