marty90 / DPDK-Replay

This tool can replay a pcap capture at wire speed on several 10Gbps links.
GNU General Public License v2.0
67 stars 34 forks source link

install dpdk-replay w/ error. #2

Closed markc0303 closed 7 years ago

markc0303 commented 9 years ago

hi,

i'm trying to install dpdk-replay in ubuntu 14.0.4 (3.16.0-49-generic), i following steps, but got error when enter "make" command.

can you please kindly tell? log below.

BR,

Mark

mark@Dell-T110:~/DPDK-Replay$ more complie.sh

!/bin/sh

export RTE_SDK=${HOME}/handson/dpdk-2.0.0 export RTE_TARGET=x86_64-native-linuxapp-gcc make

mark@Dell-T110:~/DPDK-Replay$ vim complie.sh mark@Dell-T110:~/DPDK-Replay$ ./complie.sh CC src/main_replay_copy_2_cores.o In file included from /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:17:0: /home/mark/DPDK-Replay/src/main.h:113:15: error: ‘ETH_RSS_IPV4_TCP’ undeclared here (not in a function) .rss_hf = (ETH_RSS_IPV4_TCP | ETH_RSSUDP) , /* Set the mask of protocols RSS will be applied to / ^ In file included from /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:17:0: /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c: In function ‘main’: /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:93:225: error: ‘E_RTE_NO_TAILQ’ undeclared (first use in this function) if (pktmbuf_pool == NULL) FATAL_ERROR("Cannot create cluster_mem_pool. Errno: %d [ENOMEM: %d, ENOSPC: %d, E_RTE_NO_TAILQ: %d, E_RTE_NO_CONFIG: %d, E_RTE_SECONDARY: %d, EINVAL: %d, EEXIST: %d]\n", rte_errno, ENOMEM, ENOSPC, E_RTE_NO_TAILQ, E_RTE_NO_CONFIG, E_RTE_SECONDARY, EINVAL, EEXIST ); ^ /home/mark/DPDK-Replay/src/main.h:64:76: note: in definition of macro ‘FATAL_ERROR’

define FATAL_ERROR(fmt, args...) rte_exit(EXIT_FAILURE, fmt "\n", ##args)

                                                                        ^

/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:93:225: note: each undeclared identifier is reported only once for each function it appears in if (pktmbuf_pool == NULL) FATAL_ERROR("Cannot create cluster_mem_pool. Errno: %d [ENOMEM: %d, ENOSPC: %d, E_RTE_NO_TAILQ: %d, E_RTE_NO_CONFIG: %d, E_RTE_SECONDARY: %d, EINVAL: %d, EEXIST: %d]\n", rte_errno, ENOMEM, ENOSPC, E_RTE_NO_TAILQ, E_RTE_NO_CONFIG, E_RTE_SECONDARY, EINVAL, EEXIST ); ^ /home/mark/DPDK-Replay/src/main.h:64:76: note: in definition of macro ‘FATAL_ERROR’

define FATAL_ERROR(fmt, args...) rte_exit(EXIT_FAILURE, fmt "\n", ##args)

                                                                        ^

/home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c: In function ‘print_stats’: /home/mark/DPDK-Replay/src/main_replay_copy_2_cores.c:315:2: warning: too many arguments for format [-Wformat-extra-args] printf("Packets read speed: %8.3fus\n", (double)avg/nb/rte_get_timer_hz()_1000000, max); ^ make[1]: * [src/main_replay_copy_2_cores.o] Error 1 make: * [all] Error 2

marty90 commented 9 years ago

Hi mark! You must use DPDK 1.8 (you can download it from here: http://dpdk.org/browse/dpdk/snapshot/dpdk-1.8.0.tar.gz).

markc0303 commented 9 years ago

Hi sir,

i reinstall dpdk-1.8.0 and install dpdk-replay as well.

but another error comes, when i enter " sudo ./build/dpdk-replay -c 0X3 -n 2 -- -f /home/mark/DPDK-Replay/tmp_PCAP/fake.pcap" command, i got "EAL: Error - exiting with code: 1".

can you kindly advise!! thanks mark

error log below:

mark@Dell-T110:~/DPDK-Replay$ ./install-dpdk.sh [sudo] password for mark:

Network devices using DPDK-compatible driver

0000:01:00.0 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused= 0000:01:00.1 '82599ES 10-Gigabit SFI/SFP+ Network Connection' drv=igb_uio unused=

Network devices using kernel driver

0000:02:00.0 '82571EB Gigabit Ethernet Controller' if=p1p1 drv=e1000e unused=igb_uio 0000:02:00.1 '82571EB Gigabit Ethernet Controller' if=p1p2 drv=e1000e unused=igb_uio 0000:03:00.0 '82571EB Gigabit Ethernet Controller' if=p3p1 drv=e1000e unused=igb_uio 0000:03:00.1 '82571EB Gigabit Ethernet Controller' if=p3p2 drv=e1000e unused=igb_uio 0000:04:00.0 'NetXtreme BCM5722 Gigabit Ethernet PCI Express' if=em1 drv=tg3 unused=igb_uio 0000:05:00.0 '82574L Gigabit Network Connection' if=p4p1 drv=e1000e unused=igb_uio Active

Other network devices

Set hugepagesize=2048 of 2MB page Creating /mnt/huge and mounting as hugetlbfs mark@Dell-T110:~/DPDK-Replay$ sudo ./build/dpdk-replay -c 0X3 -n 2 -- -f /home/mark/DPDK-Replay/tmp_PCAP/fake.pcap EAL: Detected lcore 0 as core 0 on socket 0 EAL: Detected lcore 1 as core 1 on socket 0 EAL: Detected lcore 2 as core 2 on socket 0 EAL: Detected lcore 3 as core 3 on socket 0 EAL: Support maximum 128 logical core(s) by configuration. EAL: Detected 4 lcore(s) EAL: Setting up memory... EAL: Ask a virtual area of 0x1200000 bytes EAL: Virtual area found at 0x7f74d0200000 (size = 0x1200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f74cfe00000 (size = 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f74cfa00000 (size = 0x200000) EAL: Ask a virtual area of 0x1c000000 bytes EAL: Virtual area found at 0x7f74b3800000 (size = 0x1c000000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f74b3400000 (size = 0x200000) EAL: Ask a virtual area of 0x29400000 bytes EAL: Virtual area found at 0x7f7489e00000 (size = 0x29400000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f7489a00000 (size = 0x200000) EAL: Ask a virtual area of 0x63c00000 bytes EAL: Virtual area found at 0x7f7425c00000 (size = 0x63c00000) EAL: Ask a virtual area of 0x55000000 bytes EAL: Virtual area found at 0x7f73d0a00000 (size = 0x55000000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f73d0600000 (size = 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f73d0200000 (size = 0x200000) EAL: Ask a virtual area of 0x200000 bytes EAL: Virtual area found at 0x7f73cfe00000 (size = 0x200000) EAL: Requesting 2048 pages of size 2MB from socket 0 EAL: TSC frequency is ~2393985 KHz EAL: Master core 0 is ready (tid=d3f79840) PMD: ENICPMD trace: rte_enic_pmd_init EAL: Core 1 is ready (tid=cfdff700) EAL: PCI device 0000:01:00.0 on NUMA socket -1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: 0000:01:00.0 not managed by VFIO driver, skipping EAL: PCI memory mapped at 0x7f74d1400000 EAL: PCI memory mapped at 0x7f74d1480000 PMD: eth_ixgbe_dev_init(): MAC: 2, PHY: 17, SFP+: 5 PMD: eth_ixgbe_dev_init(): port 0 vendorID=0x8086 deviceID=0x10fb EAL: PCI device 0000:01:00.1 on NUMA socket -1 EAL: probe driver: 8086:10fb rte_ixgbe_pmd EAL: 0000:01:00.1 not managed by VFIO driver, skipping EAL: PCI memory mapped at 0x7f74d1484000 EAL: PCI memory mapped at 0x7f74d1504000 PMD: eth_ixgbe_dev_init(): MAC: 2, PHY: 17, SFP+: 6 PMD: eth_ixgbe_dev_init(): port 1 vendorID=0x8086 deviceID=0x10fb EAL: PCI device 0000:02:00.0 on NUMA socket -1 EAL: probe driver: 8086:105e rte_em_pmd EAL: 0000:02:00.0 not managed by VFIO driver, skipping EAL: 0000:02:00.0 not managed by UIO driver, skipping EAL: PCI device 0000:02:00.1 on NUMA socket -1 EAL: probe driver: 8086:105e rte_em_pmd EAL: 0000:02:00.1 not managed by VFIO driver, skipping EAL: 0000:02:00.1 not managed by UIO driver, skipping EAL: PCI device 0000:03:00.0 on NUMA socket -1 EAL: probe driver: 8086:105e rte_em_pmd EAL: 0000:03:00.0 not managed by VFIO driver, skipping EAL: 0000:03:00.0 not managed by UIO driver, skipping EAL: PCI device 0000:03:00.1 on NUMA socket -1 EAL: probe driver: 8086:105e rte_em_pmd EAL: 0000:03:00.1 not managed by VFIO driver, skipping EAL: 0000:03:00.1 not managed by UIO driver, skipping EAL: PCI device 0000:05:00.0 on NUMA socket -1 EAL: probe driver: 8086:10d3 rte_em_pmd EAL: 0000:05:00.0 not managed by VFIO driver, skipping EAL: 0000:05:00.0 not managed by UIO driver, skipping EAL: Error - exiting with code: 1 Cause: Cannot create cluster_mem_pool. Errno: 12 [ENOMEM: 12, ENOSPC: 28, E_RTE_NO_TAILQ: 1003, E_RTE_NO_CONFIG: 1002, E_RTE_SECONDARY: 1001, EINVAL: 22, EEXIST: 17] #
marty90 commented 9 years ago

To have best performance, the default buffer size is 2GB. If you don't have enough RAM or you didn't allocate enough hugepages, the program will not execute. To solve this there are two ways:

  1. Decrease the buffer size with "-B" option
  2. Increase the number of hugepages in the system (if you have enough RAM).
markc0303 commented 9 years ago

adjust huge pages size to 4096, and works well. :)

one more question, can i play pcap repeatedly? i tried -t or -T options, doesn't work.

Thanks mark

marty90 commented 9 years ago

Currently it is not possible. the "-t" option is to repeat each packet inside a trace multiple times. It could be one of the future features ;)